generated-configure.sh revision 1372:09e4660d7815
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
635SJAVAC_SERVER_DIR
636ENABLE_SJAVAC
637SJAVAC_SERVER_JAVA_FLAGS
638SJAVAC_SERVER_JAVA
639JAVA_TOOL_FLAGS_SMALL
640JAVA_FLAGS_SMALL
641JAVA_FLAGS_BIG
642JAVA_FLAGS
643JOBS
644MEMORY_SIZE
645NUM_CORES
646ENABLE_INTREE_EC
647SALIB_NAME
648HOTSPOT_MAKE_ARGS
649MSVCP_DLL
650MSVCR_DLL
651LIBCXX
652LLVM_LIBS
653LLVM_LDFLAGS
654LLVM_CFLAGS
655LLVM_CONFIG
656LIBFFI_LIBS
657LIBFFI_CFLAGS
658STATIC_CXX_SETTING
659LIBDL
660LIBM
661LIBZIP_CAN_USE_MMAP
662USE_EXTERNAL_LIBZ
663USE_EXTERNAL_LIBPNG
664PNG_LIBS
665PNG_CFLAGS
666USE_EXTERNAL_LCMS
667LCMS_LIBS
668LCMS_CFLAGS
669USE_EXTERNAL_LIBGIF
670USE_EXTERNAL_LIBJPEG
671ALSA_LIBS
672ALSA_CFLAGS
673FREETYPE_BUNDLE_LIB_PATH
674FREETYPE_LIBS
675FREETYPE_CFLAGS
676CUPS_CFLAGS
677X_EXTRA_LIBS
678X_LIBS
679X_PRE_LIBS
680X_CFLAGS
681XMKMF
682FIXPATH
683GCOV_ENABLED
684ZIP_DEBUGINFO_FILES
685ENABLE_DEBUG_SYMBOLS
686CFLAGS_WARNINGS_ARE_ERRORS
687DISABLE_WARNING_PREFIX
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_OPTIONS
722CFLAGS_DEBUG_OPTIONS
723CXXFLAGS_DEBUG_SYMBOLS
724CFLAGS_DEBUG_SYMBOLS
725CXX_FLAG_DEPS
726C_FLAG_DEPS
727SET_SHARED_LIBRARY_MAPFILE
728SET_SHARED_LIBRARY_NAME
729SET_SHARED_LIBRARY_ORIGIN
730SET_EXECUTABLE_ORIGIN
731SHARED_LIBRARY_FLAGS
732CXX_FLAG_REORDER
733C_FLAG_REORDER
734SYSROOT_LDFLAGS
735SYSROOT_CFLAGS
736RC_FLAGS
737AR_OUT_OPTION
738LD_OUT_OPTION
739EXE_OUT_OPTION
740CC_OUT_OPTION
741POST_MCS_CMD
742POST_STRIP_CMD
743ARFLAGS
744COMPILER_TARGET_BITS_FLAG
745JT_HOME
746JTREGEXE
747USING_BROKEN_SUSE_LD
748PACKAGE_PATH
749LDEXECXX
750LDEXE
751USE_CLANG
752HOTSPOT_LD
753HOTSPOT_CXX
754HOTSPOT_RC
755HOTSPOT_MT
756BUILD_LD
757BUILD_CXX
758BUILD_CC
759ac_ct_OBJDUMP
760OBJDUMP
761ac_ct_OBJCOPY
762OBJCOPY
763ac_ct_NM
764ac_ct_STRIP
765MCS
766GNM
767NM
768STRIP
769MSBUILD
770DUMPBIN
771RC
772MT
773LIPO
774ac_ct_AR
775AR
776AS
777LDCXX
778LD
779CXXCPP
780CPP
781ac_ct_CXX
782CXXFLAGS
783CXX
784ac_ct_PROPER_COMPILER_CXX
785PROPER_COMPILER_CXX
786TOOLCHAIN_PATH_CXX
787POTENTIAL_CXX
788OBJEXT
789EXEEXT
790ac_ct_CC
791CPPFLAGS
792LDFLAGS
793CFLAGS
794CC
795ac_ct_PROPER_COMPILER_CC
796PROPER_COMPILER_CC
797TOOLCHAIN_PATH_CC
798POTENTIAL_CC
799VS_LIB
800VS_INCLUDE
801VS_PATH
802CYGWIN_LINK
803EXE_SUFFIX
804OBJ_SUFFIX
805STATIC_LIBRARY
806SHARED_LIBRARY
807STATIC_LIBRARY_SUFFIX
808SHARED_LIBRARY_SUFFIX
809LIBRARY_PREFIX
810TOOLCHAIN_TYPE
811BUILD_HOTSPOT
812HOTSPOT_DIST
813BUILD_OUTPUT
814OVERRIDE_SRC_ROOT
815ADD_SRC_ROOT
816JDK_TOPDIR
817NASHORN_TOPDIR
818HOTSPOT_TOPDIR
819JAXWS_TOPDIR
820JAXP_TOPDIR
821CORBA_TOPDIR
822LANGTOOLS_TOPDIR
823JAVAC_FLAGS
824BOOT_JDK_SOURCETARGET
825JARSIGNER
826NATIVE2ASCII
827JAR
828JAVAH
829JAVAC
830JAVA
831BOOT_JDK
832JAVA_CHECK
833JAVAC_CHECK
834COOKED_BUILD_NUMBER
835JDK_VERSION
836COPYRIGHT_YEAR
837MACOSX_BUNDLE_ID_BASE
838MACOSX_BUNDLE_NAME_BASE
839COMPANY_NAME
840JDK_RC_PLATFORM_NAME
841PRODUCT_SUFFIX
842PRODUCT_NAME
843LAUNCHER_NAME
844MILESTONE
845JDK_BUILD_NUMBER
846JDK_UPDATE_VERSION
847JDK_MICRO_VERSION
848JDK_MINOR_VERSION
849JDK_MAJOR_VERSION
850USER_RELEASE_SUFFIX
851COMPRESS_JARS
852RMICONNECTOR_IIOP
853UNLIMITED_CRYPTO
854CACERTS_FILE
855TEST_IN_BUILD
856BUILD_HEADLESS
857SUPPORT_HEADFUL
858SUPPORT_HEADLESS
859BDEPS_FTP
860BDEPS_UNZIP
861OS_VERSION_MICRO
862OS_VERSION_MINOR
863OS_VERSION_MAJOR
864PKG_CONFIG
865BASH_ARGS
866CODESIGN
867XATTR
868DSYMUTIL
869IS_GNU_TIME
870TIME
871STAT
872HG
873READELF
874OTOOL
875LDD
876ZIP
877UNZIP
878FIND_DELETE
879OUTPUT_SYNC
880OUTPUT_SYNC_SUPPORTED
881MAKE
882CHECK_TOOLSDIR_MAKE
883CHECK_TOOLSDIR_GMAKE
884CHECK_MAKE
885CHECK_GMAKE
886PKGHANDLER
887OUTPUT_ROOT
888CONF_NAME
889SPEC
890SDKROOT
891XCODEBUILD
892BUILD_VARIANT_RELEASE
893DEBUG_CLASSFILES
894FASTDEBUG
895VARIANT
896DEBUG_LEVEL
897MACOSX_UNIVERSAL
898INCLUDE_SA
899JVM_VARIANT_CORE
900JVM_VARIANT_ZEROSHARK
901JVM_VARIANT_ZERO
902JVM_VARIANT_KERNEL
903JVM_VARIANT_MINIMAL1
904JVM_VARIANT_CLIENT
905JVM_VARIANT_SERVER
906JVM_VARIANTS
907JVM_INTERPRETER
908JDK_VARIANT
909SET_OPENJDK
910BUILD_LOG_WRAPPER
911BUILD_LOG_PREVIOUS
912BUILD_LOG
913TOPDIR
914PATH_SEP
915ZERO_ARCHDEF
916DEFINE_CROSS_COMPILE_ARCH
917LP64
918OPENJDK_TARGET_OS_EXPORT_DIR
919OPENJDK_TARGET_CPU_JLI_CFLAGS
920OPENJDK_TARGET_CPU_OSARCH
921OPENJDK_TARGET_CPU_ISADIR
922OPENJDK_TARGET_CPU_LIBDIR
923OPENJDK_TARGET_CPU_LEGACY_LIB
924OPENJDK_TARGET_CPU_LEGACY
925REQUIRED_OS_VERSION
926REQUIRED_OS_NAME
927COMPILE_TYPE
928OPENJDK_TARGET_CPU_ENDIAN
929OPENJDK_TARGET_CPU_BITS
930OPENJDK_TARGET_CPU_ARCH
931OPENJDK_TARGET_CPU
932OPENJDK_TARGET_OS_ENV
933OPENJDK_TARGET_OS_TYPE
934OPENJDK_TARGET_OS
935OPENJDK_BUILD_CPU_ENDIAN
936OPENJDK_BUILD_CPU_BITS
937OPENJDK_BUILD_CPU_ARCH
938OPENJDK_BUILD_CPU
939OPENJDK_BUILD_OS_ENV
940OPENJDK_BUILD_OS_TYPE
941OPENJDK_BUILD_OS
942OPENJDK_BUILD_AUTOCONF_NAME
943OPENJDK_TARGET_AUTOCONF_NAME
944target_os
945target_vendor
946target_cpu
947target
948host_os
949host_vendor
950host_cpu
951host
952build_os
953build_vendor
954build_cpu
955build
956CPIO
957SETFILE
958DF
959READLINK
960CYGPATH
961SED
962FGREP
963EGREP
964GREP
965AWK
966XARGS
967WHICH
968WC
969UNIQ
970UNAME
971TR
972TOUCH
973TEE
974TAR
975TAIL
976SORT
977SH
978RM
979PRINTF
980NAWK
981MV
982MKTEMP
983MKDIR
984LS
985LN
986HEAD
987FIND
988FILE
989EXPR
990ECHO
991DIRNAME
992DIFF
993DATE
994CUT
995CP
996COMM
997CMP
998CHMOD
999CAT
1000BASH
1001BASENAME
1002DATE_WHEN_CONFIGURED
1003ORIGINAL_PATH
1004CONFIGURE_COMMAND_LINE
1005target_alias
1006host_alias
1007build_alias
1008LIBS
1009ECHO_T
1010ECHO_N
1011ECHO_C
1012DEFS
1013mandir
1014localedir
1015libdir
1016psdir
1017pdfdir
1018dvidir
1019htmldir
1020infodir
1021docdir
1022oldincludedir
1023includedir
1024localstatedir
1025sharedstatedir
1026sysconfdir
1027datadir
1028datarootdir
1029libexecdir
1030sbindir
1031bindir
1032program_transform_name
1033prefix
1034exec_prefix
1035PACKAGE_URL
1036PACKAGE_BUGREPORT
1037PACKAGE_STRING
1038PACKAGE_VERSION
1039PACKAGE_TARNAME
1040PACKAGE_NAME
1041PATH_SEPARATOR
1042SHELL'
1043ac_subst_files=''
1044ac_user_opts='
1045enable_option_checking
1046with_target_bits
1047enable_openjdk_only
1048with_custom_make_dir
1049with_jdk_variant
1050with_jvm_interpreter
1051with_jvm_variants
1052enable_debug
1053with_debug_level
1054with_devkit
1055with_sys_root
1056with_sysroot
1057with_tools_dir
1058with_toolchain_path
1059with_extra_path
1060with_sdk_name
1061with_conf_name
1062with_output_sync
1063with_builddeps_conf
1064with_builddeps_server
1065with_builddeps_dir
1066with_builddeps_group
1067enable_headful
1068enable_hotspot_test_in_build
1069with_cacerts_file
1070enable_unlimited_crypto
1071enable_rmiconnector_iiop
1072with_milestone
1073with_update_version
1074with_user_release_suffix
1075with_build_number
1076with_copyright_year
1077with_boot_jdk
1078with_add_source_root
1079with_override_source_root
1080with_adds_and_overrides
1081with_override_langtools
1082with_override_corba
1083with_override_jaxp
1084with_override_jaxws
1085with_override_hotspot
1086with_override_nashorn
1087with_override_jdk
1088with_import_hotspot
1089with_toolchain_type
1090with_toolchain_version
1091with_jtreg
1092with_extra_cflags
1093with_extra_cxxflags
1094with_extra_ldflags
1095enable_debug_symbols
1096enable_zip_debug_info
1097enable_native_coverage
1098with_x
1099with_cups
1100with_cups_include
1101with_freetype
1102with_freetype_include
1103with_freetype_lib
1104with_freetype_src
1105enable_freetype_bundling
1106with_alsa
1107with_alsa_include
1108with_alsa_lib
1109with_libjpeg
1110with_giflib
1111with_lcms
1112with_libpng
1113with_zlib
1114with_stdc__lib
1115with_msvcr_dll
1116with_msvcp_dll
1117with_dxsdk
1118with_dxsdk_lib
1119with_dxsdk_include
1120with_num_cores
1121with_memory_size
1122with_jobs
1123with_boot_jdk_jvmargs
1124with_sjavac_server_java
1125enable_sjavac
1126enable_precompiled_headers
1127enable_ccache
1128with_ccache_dir
1129'
1130      ac_precious_vars='build_alias
1131host_alias
1132target_alias
1133BASENAME
1134BASH
1135CAT
1136CHMOD
1137CMP
1138COMM
1139CP
1140CUT
1141DATE
1142DIFF
1143DIRNAME
1144ECHO
1145EXPR
1146FILE
1147FIND
1148HEAD
1149LN
1150LS
1151MKDIR
1152MKTEMP
1153MV
1154NAWK
1155PRINTF
1156RM
1157SH
1158SORT
1159TAIL
1160TAR
1161TEE
1162TOUCH
1163TR
1164UNAME
1165UNIQ
1166WC
1167WHICH
1168XARGS
1169AWK
1170GREP
1171EGREP
1172FGREP
1173SED
1174CYGPATH
1175READLINK
1176DF
1177SETFILE
1178CPIO
1179UNZIP
1180ZIP
1181LDD
1182OTOOL
1183READELF
1184HG
1185STAT
1186TIME
1187DSYMUTIL
1188XATTR
1189CODESIGN
1190PKG_CONFIG
1191JAVA
1192JAVAC
1193JAVAH
1194JAR
1195NATIVE2ASCII
1196JARSIGNER
1197CC
1198CFLAGS
1199LDFLAGS
1200LIBS
1201CPPFLAGS
1202CXX
1203CXXFLAGS
1204CCC
1205CPP
1206CXXCPP
1207AS
1208AR
1209LIPO
1210STRIP
1211NM
1212GNM
1213MCS
1214OBJCOPY
1215OBJDUMP
1216BUILD_CC
1217BUILD_CXX
1218BUILD_LD
1219JTREGEXE
1220XMKMF
1221FREETYPE_CFLAGS
1222FREETYPE_LIBS
1223ALSA_CFLAGS
1224ALSA_LIBS
1225LCMS_CFLAGS
1226LCMS_LIBS
1227PNG_CFLAGS
1228PNG_LIBS
1229LIBFFI_CFLAGS
1230LIBFFI_LIBS
1231CCACHE'
1232
1233
1234# Initialize some variables set by options.
1235ac_init_help=
1236ac_init_version=false
1237ac_unrecognized_opts=
1238ac_unrecognized_sep=
1239# The variables have the same names as the options, with
1240# dashes changed to underlines.
1241cache_file=/dev/null
1242exec_prefix=NONE
1243no_create=
1244no_recursion=
1245prefix=NONE
1246program_prefix=NONE
1247program_suffix=NONE
1248program_transform_name=s,x,x,
1249silent=
1250site=
1251srcdir=
1252verbose=
1253x_includes=NONE
1254x_libraries=NONE
1255
1256# Installation directory options.
1257# These are left unexpanded so users can "make install exec_prefix=/foo"
1258# and all the variables that are supposed to be based on exec_prefix
1259# by default will actually change.
1260# Use braces instead of parens because sh, perl, etc. also accept them.
1261# (The list follows the same order as the GNU Coding Standards.)
1262bindir='${exec_prefix}/bin'
1263sbindir='${exec_prefix}/sbin'
1264libexecdir='${exec_prefix}/libexec'
1265datarootdir='${prefix}/share'
1266datadir='${datarootdir}'
1267sysconfdir='${prefix}/etc'
1268sharedstatedir='${prefix}/com'
1269localstatedir='${prefix}/var'
1270includedir='${prefix}/include'
1271oldincludedir='/usr/include'
1272docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1273infodir='${datarootdir}/info'
1274htmldir='${docdir}'
1275dvidir='${docdir}'
1276pdfdir='${docdir}'
1277psdir='${docdir}'
1278libdir='${exec_prefix}/lib'
1279localedir='${datarootdir}/locale'
1280mandir='${datarootdir}/man'
1281
1282ac_prev=
1283ac_dashdash=
1284for ac_option
1285do
1286  # If the previous option needs an argument, assign it.
1287  if test -n "$ac_prev"; then
1288    eval $ac_prev=\$ac_option
1289    ac_prev=
1290    continue
1291  fi
1292
1293  case $ac_option in
1294  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1295  *=)   ac_optarg= ;;
1296  *)    ac_optarg=yes ;;
1297  esac
1298
1299  # Accept the important Cygnus configure options, so we can diagnose typos.
1300
1301  case $ac_dashdash$ac_option in
1302  --)
1303    ac_dashdash=yes ;;
1304
1305  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1306    ac_prev=bindir ;;
1307  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1308    bindir=$ac_optarg ;;
1309
1310  -build | --build | --buil | --bui | --bu)
1311    ac_prev=build_alias ;;
1312  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1313    build_alias=$ac_optarg ;;
1314
1315  -cache-file | --cache-file | --cache-fil | --cache-fi \
1316  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1317    ac_prev=cache_file ;;
1318  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1319  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1320    cache_file=$ac_optarg ;;
1321
1322  --config-cache | -C)
1323    cache_file=config.cache ;;
1324
1325  -datadir | --datadir | --datadi | --datad)
1326    ac_prev=datadir ;;
1327  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1328    datadir=$ac_optarg ;;
1329
1330  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1331  | --dataroo | --dataro | --datar)
1332    ac_prev=datarootdir ;;
1333  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1334  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1335    datarootdir=$ac_optarg ;;
1336
1337  -disable-* | --disable-*)
1338    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1339    # Reject names that are not valid shell variable names.
1340    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1341      as_fn_error $? "invalid feature name: $ac_useropt"
1342    ac_useropt_orig=$ac_useropt
1343    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1344    case $ac_user_opts in
1345      *"
1346"enable_$ac_useropt"
1347"*) ;;
1348      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1349	 ac_unrecognized_sep=', ';;
1350    esac
1351    eval enable_$ac_useropt=no ;;
1352
1353  -docdir | --docdir | --docdi | --doc | --do)
1354    ac_prev=docdir ;;
1355  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1356    docdir=$ac_optarg ;;
1357
1358  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1359    ac_prev=dvidir ;;
1360  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1361    dvidir=$ac_optarg ;;
1362
1363  -enable-* | --enable-*)
1364    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1365    # Reject names that are not valid shell variable names.
1366    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1367      as_fn_error $? "invalid feature name: $ac_useropt"
1368    ac_useropt_orig=$ac_useropt
1369    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1370    case $ac_user_opts in
1371      *"
1372"enable_$ac_useropt"
1373"*) ;;
1374      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1375	 ac_unrecognized_sep=', ';;
1376    esac
1377    eval enable_$ac_useropt=\$ac_optarg ;;
1378
1379  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1380  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1381  | --exec | --exe | --ex)
1382    ac_prev=exec_prefix ;;
1383  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1384  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1385  | --exec=* | --exe=* | --ex=*)
1386    exec_prefix=$ac_optarg ;;
1387
1388  -gas | --gas | --ga | --g)
1389    # Obsolete; use --with-gas.
1390    with_gas=yes ;;
1391
1392  -help | --help | --hel | --he | -h)
1393    ac_init_help=long ;;
1394  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1395    ac_init_help=recursive ;;
1396  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1397    ac_init_help=short ;;
1398
1399  -host | --host | --hos | --ho)
1400    ac_prev=host_alias ;;
1401  -host=* | --host=* | --hos=* | --ho=*)
1402    host_alias=$ac_optarg ;;
1403
1404  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1405    ac_prev=htmldir ;;
1406  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1407  | --ht=*)
1408    htmldir=$ac_optarg ;;
1409
1410  -includedir | --includedir | --includedi | --included | --include \
1411  | --includ | --inclu | --incl | --inc)
1412    ac_prev=includedir ;;
1413  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1414  | --includ=* | --inclu=* | --incl=* | --inc=*)
1415    includedir=$ac_optarg ;;
1416
1417  -infodir | --infodir | --infodi | --infod | --info | --inf)
1418    ac_prev=infodir ;;
1419  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1420    infodir=$ac_optarg ;;
1421
1422  -libdir | --libdir | --libdi | --libd)
1423    ac_prev=libdir ;;
1424  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1425    libdir=$ac_optarg ;;
1426
1427  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1428  | --libexe | --libex | --libe)
1429    ac_prev=libexecdir ;;
1430  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1431  | --libexe=* | --libex=* | --libe=*)
1432    libexecdir=$ac_optarg ;;
1433
1434  -localedir | --localedir | --localedi | --localed | --locale)
1435    ac_prev=localedir ;;
1436  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1437    localedir=$ac_optarg ;;
1438
1439  -localstatedir | --localstatedir | --localstatedi | --localstated \
1440  | --localstate | --localstat | --localsta | --localst | --locals)
1441    ac_prev=localstatedir ;;
1442  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1443  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1444    localstatedir=$ac_optarg ;;
1445
1446  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1447    ac_prev=mandir ;;
1448  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1449    mandir=$ac_optarg ;;
1450
1451  -nfp | --nfp | --nf)
1452    # Obsolete; use --without-fp.
1453    with_fp=no ;;
1454
1455  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1456  | --no-cr | --no-c | -n)
1457    no_create=yes ;;
1458
1459  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1460  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1461    no_recursion=yes ;;
1462
1463  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1464  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1465  | --oldin | --oldi | --old | --ol | --o)
1466    ac_prev=oldincludedir ;;
1467  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1468  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1469  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1470    oldincludedir=$ac_optarg ;;
1471
1472  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1473    ac_prev=prefix ;;
1474  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1475    prefix=$ac_optarg ;;
1476
1477  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1478  | --program-pre | --program-pr | --program-p)
1479    ac_prev=program_prefix ;;
1480  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1481  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1482    program_prefix=$ac_optarg ;;
1483
1484  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1485  | --program-suf | --program-su | --program-s)
1486    ac_prev=program_suffix ;;
1487  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1488  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1489    program_suffix=$ac_optarg ;;
1490
1491  -program-transform-name | --program-transform-name \
1492  | --program-transform-nam | --program-transform-na \
1493  | --program-transform-n | --program-transform- \
1494  | --program-transform | --program-transfor \
1495  | --program-transfo | --program-transf \
1496  | --program-trans | --program-tran \
1497  | --progr-tra | --program-tr | --program-t)
1498    ac_prev=program_transform_name ;;
1499  -program-transform-name=* | --program-transform-name=* \
1500  | --program-transform-nam=* | --program-transform-na=* \
1501  | --program-transform-n=* | --program-transform-=* \
1502  | --program-transform=* | --program-transfor=* \
1503  | --program-transfo=* | --program-transf=* \
1504  | --program-trans=* | --program-tran=* \
1505  | --progr-tra=* | --program-tr=* | --program-t=*)
1506    program_transform_name=$ac_optarg ;;
1507
1508  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1509    ac_prev=pdfdir ;;
1510  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1511    pdfdir=$ac_optarg ;;
1512
1513  -psdir | --psdir | --psdi | --psd | --ps)
1514    ac_prev=psdir ;;
1515  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1516    psdir=$ac_optarg ;;
1517
1518  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1519  | -silent | --silent | --silen | --sile | --sil)
1520    silent=yes ;;
1521
1522  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1523    ac_prev=sbindir ;;
1524  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1525  | --sbi=* | --sb=*)
1526    sbindir=$ac_optarg ;;
1527
1528  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1529  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1530  | --sharedst | --shareds | --shared | --share | --shar \
1531  | --sha | --sh)
1532    ac_prev=sharedstatedir ;;
1533  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1534  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1535  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1536  | --sha=* | --sh=*)
1537    sharedstatedir=$ac_optarg ;;
1538
1539  -site | --site | --sit)
1540    ac_prev=site ;;
1541  -site=* | --site=* | --sit=*)
1542    site=$ac_optarg ;;
1543
1544  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1545    ac_prev=srcdir ;;
1546  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1547    srcdir=$ac_optarg ;;
1548
1549  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1550  | --syscon | --sysco | --sysc | --sys | --sy)
1551    ac_prev=sysconfdir ;;
1552  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1553  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1554    sysconfdir=$ac_optarg ;;
1555
1556  -target | --target | --targe | --targ | --tar | --ta | --t)
1557    ac_prev=target_alias ;;
1558  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1559    target_alias=$ac_optarg ;;
1560
1561  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1562    verbose=yes ;;
1563
1564  -version | --version | --versio | --versi | --vers | -V)
1565    ac_init_version=: ;;
1566
1567  -with-* | --with-*)
1568    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1569    # Reject names that are not valid shell variable names.
1570    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1571      as_fn_error $? "invalid package name: $ac_useropt"
1572    ac_useropt_orig=$ac_useropt
1573    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1574    case $ac_user_opts in
1575      *"
1576"with_$ac_useropt"
1577"*) ;;
1578      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1579	 ac_unrecognized_sep=', ';;
1580    esac
1581    eval with_$ac_useropt=\$ac_optarg ;;
1582
1583  -without-* | --without-*)
1584    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1585    # Reject names that are not valid shell variable names.
1586    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1587      as_fn_error $? "invalid package name: $ac_useropt"
1588    ac_useropt_orig=$ac_useropt
1589    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1590    case $ac_user_opts in
1591      *"
1592"with_$ac_useropt"
1593"*) ;;
1594      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1595	 ac_unrecognized_sep=', ';;
1596    esac
1597    eval with_$ac_useropt=no ;;
1598
1599  --x)
1600    # Obsolete; use --with-x.
1601    with_x=yes ;;
1602
1603  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1604  | --x-incl | --x-inc | --x-in | --x-i)
1605    ac_prev=x_includes ;;
1606  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1607  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1608    x_includes=$ac_optarg ;;
1609
1610  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1611  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1612    ac_prev=x_libraries ;;
1613  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1614  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1615    x_libraries=$ac_optarg ;;
1616
1617  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1618Try \`$0 --help' for more information"
1619    ;;
1620
1621  *=*)
1622    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1623    # Reject names that are not valid shell variable names.
1624    case $ac_envvar in #(
1625      '' | [0-9]* | *[!_$as_cr_alnum]* )
1626      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1627    esac
1628    eval $ac_envvar=\$ac_optarg
1629    export $ac_envvar ;;
1630
1631  *)
1632    # FIXME: should be removed in autoconf 3.0.
1633    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1634    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1635      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1636    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1637    ;;
1638
1639  esac
1640done
1641
1642if test -n "$ac_prev"; then
1643  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1644  as_fn_error $? "missing argument to $ac_option"
1645fi
1646
1647if test -n "$ac_unrecognized_opts"; then
1648  case $enable_option_checking in
1649    no) ;;
1650    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1651    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1652  esac
1653fi
1654
1655# Check all directory arguments for consistency.
1656for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1657		datadir sysconfdir sharedstatedir localstatedir includedir \
1658		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1659		libdir localedir mandir
1660do
1661  eval ac_val=\$$ac_var
1662  # Remove trailing slashes.
1663  case $ac_val in
1664    */ )
1665      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1666      eval $ac_var=\$ac_val;;
1667  esac
1668  # Be sure to have absolute directory names.
1669  case $ac_val in
1670    [\\/$]* | ?:[\\/]* )  continue;;
1671    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1672  esac
1673  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1674done
1675
1676# There might be people who depend on the old broken behavior: `$host'
1677# used to hold the argument of --host etc.
1678# FIXME: To remove some day.
1679build=$build_alias
1680host=$host_alias
1681target=$target_alias
1682
1683# FIXME: To remove some day.
1684if test "x$host_alias" != x; then
1685  if test "x$build_alias" = x; then
1686    cross_compiling=maybe
1687  elif test "x$build_alias" != "x$host_alias"; then
1688    cross_compiling=yes
1689  fi
1690fi
1691
1692ac_tool_prefix=
1693test -n "$host_alias" && ac_tool_prefix=$host_alias-
1694
1695test "$silent" = yes && exec 6>/dev/null
1696
1697
1698ac_pwd=`pwd` && test -n "$ac_pwd" &&
1699ac_ls_di=`ls -di .` &&
1700ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1701  as_fn_error $? "working directory cannot be determined"
1702test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1703  as_fn_error $? "pwd does not report name of working directory"
1704
1705
1706# Find the source files, if location was not specified.
1707if test -z "$srcdir"; then
1708  ac_srcdir_defaulted=yes
1709  # Try the directory containing this script, then the parent directory.
1710  ac_confdir=`$as_dirname -- "$as_myself" ||
1711$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1712	 X"$as_myself" : 'X\(//\)[^/]' \| \
1713	 X"$as_myself" : 'X\(//\)$' \| \
1714	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1715$as_echo X"$as_myself" |
1716    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1717	    s//\1/
1718	    q
1719	  }
1720	  /^X\(\/\/\)[^/].*/{
1721	    s//\1/
1722	    q
1723	  }
1724	  /^X\(\/\/\)$/{
1725	    s//\1/
1726	    q
1727	  }
1728	  /^X\(\/\).*/{
1729	    s//\1/
1730	    q
1731	  }
1732	  s/.*/./; q'`
1733  srcdir=$ac_confdir
1734  if test ! -r "$srcdir/$ac_unique_file"; then
1735    srcdir=..
1736  fi
1737else
1738  ac_srcdir_defaulted=no
1739fi
1740if test ! -r "$srcdir/$ac_unique_file"; then
1741  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1742  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1743fi
1744ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1745ac_abs_confdir=`(
1746	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1747	pwd)`
1748# When building in place, set srcdir=.
1749if test "$ac_abs_confdir" = "$ac_pwd"; then
1750  srcdir=.
1751fi
1752# Remove unnecessary trailing slashes from srcdir.
1753# Double slashes in file names in object file debugging info
1754# mess up M-x gdb in Emacs.
1755case $srcdir in
1756*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1757esac
1758for ac_var in $ac_precious_vars; do
1759  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1760  eval ac_env_${ac_var}_value=\$${ac_var}
1761  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1762  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1763done
1764
1765#
1766# Report the --help message.
1767#
1768if test "$ac_init_help" = "long"; then
1769  # Omit some internal or obsolete options to make the list less imposing.
1770  # This message is too long to be a string in the A/UX 3.1 sh.
1771  cat <<_ACEOF
1772\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1773
1774Usage: $0 [OPTION]... [VAR=VALUE]...
1775
1776To assign environment variables (e.g., CC, CFLAGS...), specify them as
1777VAR=VALUE.  See below for descriptions of some of the useful variables.
1778
1779Defaults for the options are specified in brackets.
1780
1781Configuration:
1782  -h, --help              display this help and exit
1783      --help=short        display options specific to this package
1784      --help=recursive    display the short help of all the included packages
1785  -V, --version           display version information and exit
1786  -q, --quiet, --silent   do not print \`checking ...' messages
1787      --cache-file=FILE   cache test results in FILE [disabled]
1788  -C, --config-cache      alias for \`--cache-file=config.cache'
1789  -n, --no-create         do not create output files
1790      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1791
1792Installation directories:
1793  --prefix=PREFIX         install architecture-independent files in PREFIX
1794                          [$ac_default_prefix]
1795  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1796                          [PREFIX]
1797
1798By default, \`make install' will install all the files in
1799\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1800an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1801for instance \`--prefix=\$HOME'.
1802
1803For better control, use the options below.
1804
1805Fine tuning of the installation directories:
1806  --bindir=DIR            user executables [EPREFIX/bin]
1807  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1808  --libexecdir=DIR        program executables [EPREFIX/libexec]
1809  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1810  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1811  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1812  --libdir=DIR            object code libraries [EPREFIX/lib]
1813  --includedir=DIR        C header files [PREFIX/include]
1814  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1815  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1816  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1817  --infodir=DIR           info documentation [DATAROOTDIR/info]
1818  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1819  --mandir=DIR            man documentation [DATAROOTDIR/man]
1820  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1821  --htmldir=DIR           html documentation [DOCDIR]
1822  --dvidir=DIR            dvi documentation [DOCDIR]
1823  --pdfdir=DIR            pdf documentation [DOCDIR]
1824  --psdir=DIR             ps documentation [DOCDIR]
1825_ACEOF
1826
1827  cat <<\_ACEOF
1828
1829X features:
1830  --x-includes=DIR    X include files are in DIR
1831  --x-libraries=DIR   X library files are in DIR
1832
1833System types:
1834  --build=BUILD     configure for building on BUILD [guessed]
1835  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1836  --target=TARGET   configure for building compilers for TARGET [HOST]
1837_ACEOF
1838fi
1839
1840if test -n "$ac_init_help"; then
1841  case $ac_init_help in
1842     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1843   esac
1844  cat <<\_ACEOF
1845
1846Optional Features:
1847  --disable-option-checking  ignore unrecognized --enable/--with options
1848  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1849  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1850  --enable-openjdk-only   suppress building custom source even if present
1851                          [disabled]
1852  --enable-debug          set the debug level to fastdebug (shorthand for
1853                          --with-debug-level=fastdebug) [disabled]
1854  --disable-headful       disable building headful support (graphical UI
1855                          support) [enabled]
1856  --enable-hotspot-test-in-build
1857                          run the Queens test after Hotspot build [disabled]
1858  --enable-unlimited-crypto
1859                          Enable unlimited crypto policy [disabled]
1860  --enable-rmiconnector-iiop
1861                          enable the JMX RMIConnector iiop transport
1862                          [disabled]
1863  --disable-debug-symbols disable generation of debug symbols [enabled]
1864  --disable-zip-debug-info
1865                          disable zipping of debug-info files [enabled]
1866  --enable-native-coverage
1867                          enable native compilation with code coverage
1868                          data[disabled]
1869  --disable-freetype-bundling
1870                          disable bundling of the freetype library with the
1871                          build result [enabled on Windows or when using
1872                          --with-freetype, disabled otherwise]
1873  --enable-sjavac         use sjavac to do fast incremental compiles
1874                          [disabled]
1875  --disable-precompiled-headers
1876                          disable using precompiled headers when compiling C++
1877                          [enabled]
1878  --enable-ccache         enable using ccache to speed up recompilations
1879                          [disabled]
1880
1881Optional Packages:
1882  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1883  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1884  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1885                          support it), e.g. --with-target-bits=32 [guessed]
1886  --with-custom-make-dir  Deprecated. Option is kept for backwards
1887                          compatibility and is ignored
1888  --with-jdk-variant      JDK variant to build (normal) [normal]
1889  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1890  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1891                          client, minimal1, kernel, zero, zeroshark, core)
1892                          [server]
1893  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1894                          optimized (HotSpot build only)) [release]
1895  --with-devkit           use this devkit for compilers, tools and resources
1896  --with-sys-root         alias for --with-sysroot for backwards compatability
1897  --with-sysroot          use this directory as sysroot
1898  --with-tools-dir        alias for --with-toolchain-path for backwards
1899                          compatibility
1900  --with-toolchain-path   prepend these directories when searching for
1901                          toolchain binaries (compilers etc)
1902  --with-extra-path       prepend these directories to the default path
1903  --with-sdk-name         use the platform SDK of the given name. [macosx]
1904  --with-conf-name        use this as the name of the configuration [generated
1905                          from important configuration options]
1906  --with-output-sync      set make output sync type if supported by make.
1907                          [recurse]
1908  --with-builddeps-conf   use this configuration file for the builddeps
1909  --with-builddeps-server download and use build dependencies from this server
1910                          url
1911  --with-builddeps-dir    store downloaded build dependencies here
1912                          [/localhome/builddeps]
1913  --with-builddeps-group  chgrp the downloaded build dependencies to this
1914                          group
1915  --with-cacerts-file     specify alternative cacerts file
1916  --with-milestone        Set milestone value for build [internal]
1917  --with-update-version   Set update version value for build [b00]
1918  --with-user-release-suffix
1919                          Add a custom string to the version string if build
1920                          number is not set.[username_builddateb00]
1921  --with-build-number     Set build number value for build [b00]
1922  --with-copyright-year   Set copyright year value for build [current year]
1923  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1924  --with-add-source-root  for each and every source directory, look in this
1925                          additional source root for the same directory; if it
1926                          exists and have files in it, include it in the build
1927  --with-override-source-root
1928                          for each and every source directory, look in this
1929                          override source root for the same directory; if it
1930                          exists, use that directory instead and ignore the
1931                          directory in the original source root
1932  --with-adds-and-overrides
1933                          use the subdirs 'adds' and 'overrides' in the
1934                          specified directory as add-source-root and
1935                          override-source-root
1936  --with-override-langtools
1937                          use this langtools dir for the build
1938  --with-override-corba   use this corba dir for the build
1939  --with-override-jaxp    use this jaxp dir for the build
1940  --with-override-jaxws   use this jaxws dir for the build
1941  --with-override-hotspot use this hotspot dir for the build
1942  --with-override-nashorn use this nashorn dir for the build
1943  --with-override-jdk     use this jdk dir for the build
1944  --with-import-hotspot   import hotspot binaries from this jdk image or
1945                          hotspot build dist dir instead of building from
1946                          source
1947  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1948                          to show possible values [platform dependent]
1949  --with-toolchain-version
1950                          the version of the toolchain to look for, use
1951                          '--help' to show possible values [platform
1952                          dependent]
1953  --with-jtreg            Regression Test Harness [probed]
1954  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1955  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1956  --with-extra-ldflags    extra flags to be used when linking jdk
1957  --with-x                use the X Window System
1958  --with-cups             specify prefix directory for the cups package
1959                          (expecting the headers under PATH/include)
1960  --with-cups-include     specify directory for the cups include files
1961  --with-freetype         specify prefix directory for the freetype package
1962                          (expecting the libraries under PATH/lib and the
1963                          headers under PATH/include)
1964  --with-freetype-include specify directory for the freetype include files
1965  --with-freetype-lib     specify directory for the freetype library
1966  --with-freetype-src     specify directory with freetype sources to
1967                          automatically build the library (experimental,
1968                          Windows-only)
1969  --with-alsa             specify prefix directory for the alsa package
1970                          (expecting the libraries under PATH/lib and the
1971                          headers under PATH/include)
1972  --with-alsa-include     specify directory for the alsa include files
1973  --with-alsa-lib         specify directory for the alsa library
1974  --with-libjpeg          use libjpeg from build system or OpenJDK source
1975                          (system, bundled) [bundled]
1976  --with-giflib           use giflib from build system or OpenJDK source
1977                          (system, bundled) [bundled]
1978  --with-lcms             use lcms2 from build system or OpenJDK source
1979                          (system, bundled) [bundled]
1980  --with-libpng           use libpng from build system or OpenJDK source
1981                          (system, bundled) [bundled]
1982  --with-zlib             use zlib from build system or OpenJDK source
1983                          (system, bundled) [bundled]
1984  --with-stdc++lib=<static>,<dynamic>,<default>
1985                          force linking of the C++ runtime on Linux to either
1986                          static or dynamic, default is static with dynamic as
1987                          fallback
1988  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
1989                          (Windows only) [probed]
1990  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
1991                          (Windows only) [probed]
1992  --with-dxsdk            Deprecated. Option is kept for backwards
1993                          compatibility and is ignored
1994  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1995                          compatibility and is ignored
1996  --with-dxsdk-include    Deprecated. Option is kept for backwards
1997                          compatibility and is ignored
1998  --with-num-cores        number of cores in the build system, e.g.
1999                          --with-num-cores=8 [probed]
2000  --with-memory-size      memory (in MB) available in the build system, e.g.
2001                          --with-memory-size=1024 [probed]
2002  --with-jobs             number of parallel jobs to let make run [calculated
2003                          based on cores and memory]
2004  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2005                          invocations of boot JDK, overriding the default
2006                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2007                          -enableassertions"
2008  --with-sjavac-server-java
2009                          use this java binary for running the sjavac
2010                          background server [Boot JDK java]
2011  --with-ccache-dir       where to store ccache files [~/.ccache]
2012
2013Some influential environment variables:
2014  BASENAME    Override default value for BASENAME
2015  BASH        Override default value for BASH
2016  CAT         Override default value for CAT
2017  CHMOD       Override default value for CHMOD
2018  CMP         Override default value for CMP
2019  COMM        Override default value for COMM
2020  CP          Override default value for CP
2021  CUT         Override default value for CUT
2022  DATE        Override default value for DATE
2023  DIFF        Override default value for DIFF
2024  DIRNAME     Override default value for DIRNAME
2025  ECHO        Override default value for ECHO
2026  EXPR        Override default value for EXPR
2027  FILE        Override default value for FILE
2028  FIND        Override default value for FIND
2029  HEAD        Override default value for HEAD
2030  LN          Override default value for LN
2031  LS          Override default value for LS
2032  MKDIR       Override default value for MKDIR
2033  MKTEMP      Override default value for MKTEMP
2034  MV          Override default value for MV
2035  NAWK        Override default value for NAWK
2036  PRINTF      Override default value for PRINTF
2037  RM          Override default value for RM
2038  SH          Override default value for SH
2039  SORT        Override default value for SORT
2040  TAIL        Override default value for TAIL
2041  TAR         Override default value for TAR
2042  TEE         Override default value for TEE
2043  TOUCH       Override default value for TOUCH
2044  TR          Override default value for TR
2045  UNAME       Override default value for UNAME
2046  UNIQ        Override default value for UNIQ
2047  WC          Override default value for WC
2048  WHICH       Override default value for WHICH
2049  XARGS       Override default value for XARGS
2050  AWK         Override default value for AWK
2051  GREP        Override default value for GREP
2052  EGREP       Override default value for EGREP
2053  FGREP       Override default value for FGREP
2054  SED         Override default value for SED
2055  CYGPATH     Override default value for CYGPATH
2056  READLINK    Override default value for READLINK
2057  DF          Override default value for DF
2058  SETFILE     Override default value for SETFILE
2059  CPIO        Override default value for CPIO
2060  UNZIP       Override default value for UNZIP
2061  ZIP         Override default value for ZIP
2062  LDD         Override default value for LDD
2063  OTOOL       Override default value for OTOOL
2064  READELF     Override default value for READELF
2065  HG          Override default value for HG
2066  STAT        Override default value for STAT
2067  TIME        Override default value for TIME
2068  DSYMUTIL    Override default value for DSYMUTIL
2069  XATTR       Override default value for XATTR
2070  CODESIGN    Override default value for CODESIGN
2071  PKG_CONFIG  path to pkg-config utility
2072  JAVA        Override default value for JAVA
2073  JAVAC       Override default value for JAVAC
2074  JAVAH       Override default value for JAVAH
2075  JAR         Override default value for JAR
2076  NATIVE2ASCII
2077              Override default value for NATIVE2ASCII
2078  JARSIGNER   Override default value for JARSIGNER
2079  CC          C compiler command
2080  CFLAGS      C compiler flags
2081  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2082              nonstandard directory <lib dir>
2083  LIBS        libraries to pass to the linker, e.g. -l<library>
2084  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2085              you have headers in a nonstandard directory <include dir>
2086  CXX         C++ compiler command
2087  CXXFLAGS    C++ compiler flags
2088  CPP         C preprocessor
2089  CXXCPP      C++ preprocessor
2090  AS          Override default value for AS
2091  AR          Override default value for AR
2092  LIPO        Override default value for LIPO
2093  STRIP       Override default value for STRIP
2094  NM          Override default value for NM
2095  GNM         Override default value for GNM
2096  MCS         Override default value for MCS
2097  OBJCOPY     Override default value for OBJCOPY
2098  OBJDUMP     Override default value for OBJDUMP
2099  BUILD_CC    Override default value for BUILD_CC
2100  BUILD_CXX   Override default value for BUILD_CXX
2101  BUILD_LD    Override default value for BUILD_LD
2102  JTREGEXE    Override default value for JTREGEXE
2103  XMKMF       Path to xmkmf, Makefile generator for X Window System
2104  FREETYPE_CFLAGS
2105              C compiler flags for FREETYPE, overriding pkg-config
2106  FREETYPE_LIBS
2107              linker flags for FREETYPE, overriding pkg-config
2108  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2109  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2110  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2111  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2112  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2113  PNG_LIBS    linker flags for PNG, overriding pkg-config
2114  LIBFFI_CFLAGS
2115              C compiler flags for LIBFFI, overriding pkg-config
2116  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2117  CCACHE      Override default value for CCACHE
2118
2119Use these variables to override the choices made by `configure' or to help
2120it to find libraries and programs with nonstandard names/locations.
2121
2122Report bugs to <build-dev@openjdk.java.net>.
2123OpenJDK home page: <http://openjdk.java.net>.
2124_ACEOF
2125ac_status=$?
2126fi
2127
2128if test "$ac_init_help" = "recursive"; then
2129  # If there are subdirs, report their specific --help.
2130  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2131    test -d "$ac_dir" ||
2132      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2133      continue
2134    ac_builddir=.
2135
2136case "$ac_dir" in
2137.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2138*)
2139  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2140  # A ".." for each directory in $ac_dir_suffix.
2141  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2142  case $ac_top_builddir_sub in
2143  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2144  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2145  esac ;;
2146esac
2147ac_abs_top_builddir=$ac_pwd
2148ac_abs_builddir=$ac_pwd$ac_dir_suffix
2149# for backward compatibility:
2150ac_top_builddir=$ac_top_build_prefix
2151
2152case $srcdir in
2153  .)  # We are building in place.
2154    ac_srcdir=.
2155    ac_top_srcdir=$ac_top_builddir_sub
2156    ac_abs_top_srcdir=$ac_pwd ;;
2157  [\\/]* | ?:[\\/]* )  # Absolute name.
2158    ac_srcdir=$srcdir$ac_dir_suffix;
2159    ac_top_srcdir=$srcdir
2160    ac_abs_top_srcdir=$srcdir ;;
2161  *) # Relative name.
2162    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2163    ac_top_srcdir=$ac_top_build_prefix$srcdir
2164    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2165esac
2166ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2167
2168    cd "$ac_dir" || { ac_status=$?; continue; }
2169    # Check for guested configure.
2170    if test -f "$ac_srcdir/configure.gnu"; then
2171      echo &&
2172      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2173    elif test -f "$ac_srcdir/configure"; then
2174      echo &&
2175      $SHELL "$ac_srcdir/configure" --help=recursive
2176    else
2177      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2178    fi || ac_status=$?
2179    cd "$ac_pwd" || { ac_status=$?; break; }
2180  done
2181fi
2182
2183test -n "$ac_init_help" && exit $ac_status
2184if $ac_init_version; then
2185  cat <<\_ACEOF
2186OpenJDK configure jdk9
2187generated by GNU Autoconf 2.69
2188
2189Copyright (C) 2012 Free Software Foundation, Inc.
2190This configure script is free software; the Free Software Foundation
2191gives unlimited permission to copy, distribute and modify it.
2192_ACEOF
2193  exit
2194fi
2195
2196## ------------------------ ##
2197## Autoconf initialization. ##
2198## ------------------------ ##
2199
2200# ac_fn_c_try_compile LINENO
2201# --------------------------
2202# Try to compile conftest.$ac_ext, and return whether this succeeded.
2203ac_fn_c_try_compile ()
2204{
2205  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2206  rm -f conftest.$ac_objext
2207  if { { ac_try="$ac_compile"
2208case "(($ac_try" in
2209  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2210  *) ac_try_echo=$ac_try;;
2211esac
2212eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2213$as_echo "$ac_try_echo"; } >&5
2214  (eval "$ac_compile") 2>conftest.err
2215  ac_status=$?
2216  if test -s conftest.err; then
2217    grep -v '^ *+' conftest.err >conftest.er1
2218    cat conftest.er1 >&5
2219    mv -f conftest.er1 conftest.err
2220  fi
2221  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2222  test $ac_status = 0; } && {
2223	 test -z "$ac_c_werror_flag" ||
2224	 test ! -s conftest.err
2225       } && test -s conftest.$ac_objext; then :
2226  ac_retval=0
2227else
2228  $as_echo "$as_me: failed program was:" >&5
2229sed 's/^/| /' conftest.$ac_ext >&5
2230
2231	ac_retval=1
2232fi
2233  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2234  as_fn_set_status $ac_retval
2235
2236} # ac_fn_c_try_compile
2237
2238# ac_fn_cxx_try_compile LINENO
2239# ----------------------------
2240# Try to compile conftest.$ac_ext, and return whether this succeeded.
2241ac_fn_cxx_try_compile ()
2242{
2243  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2244  rm -f conftest.$ac_objext
2245  if { { ac_try="$ac_compile"
2246case "(($ac_try" in
2247  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2248  *) ac_try_echo=$ac_try;;
2249esac
2250eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2251$as_echo "$ac_try_echo"; } >&5
2252  (eval "$ac_compile") 2>conftest.err
2253  ac_status=$?
2254  if test -s conftest.err; then
2255    grep -v '^ *+' conftest.err >conftest.er1
2256    cat conftest.er1 >&5
2257    mv -f conftest.er1 conftest.err
2258  fi
2259  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2260  test $ac_status = 0; } && {
2261	 test -z "$ac_cxx_werror_flag" ||
2262	 test ! -s conftest.err
2263       } && test -s conftest.$ac_objext; then :
2264  ac_retval=0
2265else
2266  $as_echo "$as_me: failed program was:" >&5
2267sed 's/^/| /' conftest.$ac_ext >&5
2268
2269	ac_retval=1
2270fi
2271  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2272  as_fn_set_status $ac_retval
2273
2274} # ac_fn_cxx_try_compile
2275
2276# ac_fn_c_try_cpp LINENO
2277# ----------------------
2278# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2279ac_fn_c_try_cpp ()
2280{
2281  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2282  if { { ac_try="$ac_cpp conftest.$ac_ext"
2283case "(($ac_try" in
2284  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2285  *) ac_try_echo=$ac_try;;
2286esac
2287eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2288$as_echo "$ac_try_echo"; } >&5
2289  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2290  ac_status=$?
2291  if test -s conftest.err; then
2292    grep -v '^ *+' conftest.err >conftest.er1
2293    cat conftest.er1 >&5
2294    mv -f conftest.er1 conftest.err
2295  fi
2296  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2297  test $ac_status = 0; } > conftest.i && {
2298	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2299	 test ! -s conftest.err
2300       }; then :
2301  ac_retval=0
2302else
2303  $as_echo "$as_me: failed program was:" >&5
2304sed 's/^/| /' conftest.$ac_ext >&5
2305
2306    ac_retval=1
2307fi
2308  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2309  as_fn_set_status $ac_retval
2310
2311} # ac_fn_c_try_cpp
2312
2313# ac_fn_cxx_try_cpp LINENO
2314# ------------------------
2315# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2316ac_fn_cxx_try_cpp ()
2317{
2318  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2319  if { { ac_try="$ac_cpp conftest.$ac_ext"
2320case "(($ac_try" in
2321  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2322  *) ac_try_echo=$ac_try;;
2323esac
2324eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2325$as_echo "$ac_try_echo"; } >&5
2326  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2327  ac_status=$?
2328  if test -s conftest.err; then
2329    grep -v '^ *+' conftest.err >conftest.er1
2330    cat conftest.er1 >&5
2331    mv -f conftest.er1 conftest.err
2332  fi
2333  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2334  test $ac_status = 0; } > conftest.i && {
2335	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2336	 test ! -s conftest.err
2337       }; then :
2338  ac_retval=0
2339else
2340  $as_echo "$as_me: failed program was:" >&5
2341sed 's/^/| /' conftest.$ac_ext >&5
2342
2343    ac_retval=1
2344fi
2345  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2346  as_fn_set_status $ac_retval
2347
2348} # ac_fn_cxx_try_cpp
2349
2350# ac_fn_c_try_link LINENO
2351# -----------------------
2352# Try to link conftest.$ac_ext, and return whether this succeeded.
2353ac_fn_c_try_link ()
2354{
2355  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2356  rm -f conftest.$ac_objext conftest$ac_exeext
2357  if { { ac_try="$ac_link"
2358case "(($ac_try" in
2359  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2360  *) ac_try_echo=$ac_try;;
2361esac
2362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2363$as_echo "$ac_try_echo"; } >&5
2364  (eval "$ac_link") 2>conftest.err
2365  ac_status=$?
2366  if test -s conftest.err; then
2367    grep -v '^ *+' conftest.err >conftest.er1
2368    cat conftest.er1 >&5
2369    mv -f conftest.er1 conftest.err
2370  fi
2371  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2372  test $ac_status = 0; } && {
2373	 test -z "$ac_c_werror_flag" ||
2374	 test ! -s conftest.err
2375       } && test -s conftest$ac_exeext && {
2376	 test "$cross_compiling" = yes ||
2377	 test -x conftest$ac_exeext
2378       }; then :
2379  ac_retval=0
2380else
2381  $as_echo "$as_me: failed program was:" >&5
2382sed 's/^/| /' conftest.$ac_ext >&5
2383
2384	ac_retval=1
2385fi
2386  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2387  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2388  # interfere with the next link command; also delete a directory that is
2389  # left behind by Apple's compiler.  We do this before executing the actions.
2390  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2391  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2392  as_fn_set_status $ac_retval
2393
2394} # ac_fn_c_try_link
2395
2396# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2397# ---------------------------------------------------------
2398# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2399# the include files in INCLUDES and setting the cache variable VAR
2400# accordingly.
2401ac_fn_cxx_check_header_mongrel ()
2402{
2403  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2404  if eval \${$3+:} false; then :
2405  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2406$as_echo_n "checking for $2... " >&6; }
2407if eval \${$3+:} false; then :
2408  $as_echo_n "(cached) " >&6
2409fi
2410eval ac_res=\$$3
2411	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412$as_echo "$ac_res" >&6; }
2413else
2414  # Is the header compilable?
2415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2416$as_echo_n "checking $2 usability... " >&6; }
2417cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418/* end confdefs.h.  */
2419$4
2420#include <$2>
2421_ACEOF
2422if ac_fn_cxx_try_compile "$LINENO"; then :
2423  ac_header_compiler=yes
2424else
2425  ac_header_compiler=no
2426fi
2427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2429$as_echo "$ac_header_compiler" >&6; }
2430
2431# Is the header present?
2432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2433$as_echo_n "checking $2 presence... " >&6; }
2434cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2435/* end confdefs.h.  */
2436#include <$2>
2437_ACEOF
2438if ac_fn_cxx_try_cpp "$LINENO"; then :
2439  ac_header_preproc=yes
2440else
2441  ac_header_preproc=no
2442fi
2443rm -f conftest.err conftest.i conftest.$ac_ext
2444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2445$as_echo "$ac_header_preproc" >&6; }
2446
2447# So?  What about this header?
2448case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2449  yes:no: )
2450    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2451$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2452    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2453$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2454    ;;
2455  no:yes:* )
2456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2457$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2458    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2459$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2460    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2461$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2463$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2465$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2466( $as_echo "## ----------------------------------------- ##
2467## Report this to build-dev@openjdk.java.net ##
2468## ----------------------------------------- ##"
2469     ) | sed "s/^/$as_me: WARNING:     /" >&2
2470    ;;
2471esac
2472  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2473$as_echo_n "checking for $2... " >&6; }
2474if eval \${$3+:} false; then :
2475  $as_echo_n "(cached) " >&6
2476else
2477  eval "$3=\$ac_header_compiler"
2478fi
2479eval ac_res=\$$3
2480	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2481$as_echo "$ac_res" >&6; }
2482fi
2483  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2484
2485} # ac_fn_cxx_check_header_mongrel
2486
2487# ac_fn_cxx_try_run LINENO
2488# ------------------------
2489# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2490# that executables *can* be run.
2491ac_fn_cxx_try_run ()
2492{
2493  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2494  if { { ac_try="$ac_link"
2495case "(($ac_try" in
2496  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2497  *) ac_try_echo=$ac_try;;
2498esac
2499eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2500$as_echo "$ac_try_echo"; } >&5
2501  (eval "$ac_link") 2>&5
2502  ac_status=$?
2503  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2504  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2505  { { case "(($ac_try" in
2506  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2507  *) ac_try_echo=$ac_try;;
2508esac
2509eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2510$as_echo "$ac_try_echo"; } >&5
2511  (eval "$ac_try") 2>&5
2512  ac_status=$?
2513  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2514  test $ac_status = 0; }; }; then :
2515  ac_retval=0
2516else
2517  $as_echo "$as_me: program exited with status $ac_status" >&5
2518       $as_echo "$as_me: failed program was:" >&5
2519sed 's/^/| /' conftest.$ac_ext >&5
2520
2521       ac_retval=$ac_status
2522fi
2523  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2524  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2525  as_fn_set_status $ac_retval
2526
2527} # ac_fn_cxx_try_run
2528
2529# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2530# ---------------------------------------------------------
2531# Tests whether HEADER exists and can be compiled using the include files in
2532# INCLUDES, setting the cache variable VAR accordingly.
2533ac_fn_cxx_check_header_compile ()
2534{
2535  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2536  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2537$as_echo_n "checking for $2... " >&6; }
2538if eval \${$3+:} false; then :
2539  $as_echo_n "(cached) " >&6
2540else
2541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2542/* end confdefs.h.  */
2543$4
2544#include <$2>
2545_ACEOF
2546if ac_fn_cxx_try_compile "$LINENO"; then :
2547  eval "$3=yes"
2548else
2549  eval "$3=no"
2550fi
2551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2552fi
2553eval ac_res=\$$3
2554	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2555$as_echo "$ac_res" >&6; }
2556  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2557
2558} # ac_fn_cxx_check_header_compile
2559
2560# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2561# ----------------------------------------------
2562# Tries to find the compile-time value of EXPR in a program that includes
2563# INCLUDES, setting VAR accordingly. Returns whether the value could be
2564# computed
2565ac_fn_cxx_compute_int ()
2566{
2567  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2568  if test "$cross_compiling" = yes; then
2569    # Depending upon the size, compute the lo and hi bounds.
2570cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2571/* end confdefs.h.  */
2572$4
2573int
2574main ()
2575{
2576static int test_array [1 - 2 * !(($2) >= 0)];
2577test_array [0] = 0;
2578return test_array [0];
2579
2580  ;
2581  return 0;
2582}
2583_ACEOF
2584if ac_fn_cxx_try_compile "$LINENO"; then :
2585  ac_lo=0 ac_mid=0
2586  while :; do
2587    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2588/* end confdefs.h.  */
2589$4
2590int
2591main ()
2592{
2593static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2594test_array [0] = 0;
2595return test_array [0];
2596
2597  ;
2598  return 0;
2599}
2600_ACEOF
2601if ac_fn_cxx_try_compile "$LINENO"; then :
2602  ac_hi=$ac_mid; break
2603else
2604  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2605			if test $ac_lo -le $ac_mid; then
2606			  ac_lo= ac_hi=
2607			  break
2608			fi
2609			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2610fi
2611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2612  done
2613else
2614  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2615/* end confdefs.h.  */
2616$4
2617int
2618main ()
2619{
2620static int test_array [1 - 2 * !(($2) < 0)];
2621test_array [0] = 0;
2622return test_array [0];
2623
2624  ;
2625  return 0;
2626}
2627_ACEOF
2628if ac_fn_cxx_try_compile "$LINENO"; then :
2629  ac_hi=-1 ac_mid=-1
2630  while :; do
2631    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2632/* end confdefs.h.  */
2633$4
2634int
2635main ()
2636{
2637static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2638test_array [0] = 0;
2639return test_array [0];
2640
2641  ;
2642  return 0;
2643}
2644_ACEOF
2645if ac_fn_cxx_try_compile "$LINENO"; then :
2646  ac_lo=$ac_mid; break
2647else
2648  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2649			if test $ac_mid -le $ac_hi; then
2650			  ac_lo= ac_hi=
2651			  break
2652			fi
2653			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2654fi
2655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2656  done
2657else
2658  ac_lo= ac_hi=
2659fi
2660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2661fi
2662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2663# Binary search between lo and hi bounds.
2664while test "x$ac_lo" != "x$ac_hi"; do
2665  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2666  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2667/* end confdefs.h.  */
2668$4
2669int
2670main ()
2671{
2672static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2673test_array [0] = 0;
2674return test_array [0];
2675
2676  ;
2677  return 0;
2678}
2679_ACEOF
2680if ac_fn_cxx_try_compile "$LINENO"; then :
2681  ac_hi=$ac_mid
2682else
2683  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2684fi
2685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2686done
2687case $ac_lo in #((
2688?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2689'') ac_retval=1 ;;
2690esac
2691  else
2692    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2693/* end confdefs.h.  */
2694$4
2695static long int longval () { return $2; }
2696static unsigned long int ulongval () { return $2; }
2697#include <stdio.h>
2698#include <stdlib.h>
2699int
2700main ()
2701{
2702
2703  FILE *f = fopen ("conftest.val", "w");
2704  if (! f)
2705    return 1;
2706  if (($2) < 0)
2707    {
2708      long int i = longval ();
2709      if (i != ($2))
2710	return 1;
2711      fprintf (f, "%ld", i);
2712    }
2713  else
2714    {
2715      unsigned long int i = ulongval ();
2716      if (i != ($2))
2717	return 1;
2718      fprintf (f, "%lu", i);
2719    }
2720  /* Do not output a trailing newline, as this causes \r\n confusion
2721     on some platforms.  */
2722  return ferror (f) || fclose (f) != 0;
2723
2724  ;
2725  return 0;
2726}
2727_ACEOF
2728if ac_fn_cxx_try_run "$LINENO"; then :
2729  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2730else
2731  ac_retval=1
2732fi
2733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2734  conftest.$ac_objext conftest.beam conftest.$ac_ext
2735rm -f conftest.val
2736
2737  fi
2738  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2739  as_fn_set_status $ac_retval
2740
2741} # ac_fn_cxx_compute_int
2742
2743# ac_fn_cxx_try_link LINENO
2744# -------------------------
2745# Try to link conftest.$ac_ext, and return whether this succeeded.
2746ac_fn_cxx_try_link ()
2747{
2748  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2749  rm -f conftest.$ac_objext conftest$ac_exeext
2750  if { { ac_try="$ac_link"
2751case "(($ac_try" in
2752  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2753  *) ac_try_echo=$ac_try;;
2754esac
2755eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2756$as_echo "$ac_try_echo"; } >&5
2757  (eval "$ac_link") 2>conftest.err
2758  ac_status=$?
2759  if test -s conftest.err; then
2760    grep -v '^ *+' conftest.err >conftest.er1
2761    cat conftest.er1 >&5
2762    mv -f conftest.er1 conftest.err
2763  fi
2764  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2765  test $ac_status = 0; } && {
2766	 test -z "$ac_cxx_werror_flag" ||
2767	 test ! -s conftest.err
2768       } && test -s conftest$ac_exeext && {
2769	 test "$cross_compiling" = yes ||
2770	 test -x conftest$ac_exeext
2771       }; then :
2772  ac_retval=0
2773else
2774  $as_echo "$as_me: failed program was:" >&5
2775sed 's/^/| /' conftest.$ac_ext >&5
2776
2777	ac_retval=1
2778fi
2779  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2780  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2781  # interfere with the next link command; also delete a directory that is
2782  # left behind by Apple's compiler.  We do this before executing the actions.
2783  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2784  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2785  as_fn_set_status $ac_retval
2786
2787} # ac_fn_cxx_try_link
2788
2789# ac_fn_cxx_check_func LINENO FUNC VAR
2790# ------------------------------------
2791# Tests whether FUNC exists, setting the cache variable VAR accordingly
2792ac_fn_cxx_check_func ()
2793{
2794  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2796$as_echo_n "checking for $2... " >&6; }
2797if eval \${$3+:} false; then :
2798  $as_echo_n "(cached) " >&6
2799else
2800  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2801/* end confdefs.h.  */
2802/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2803   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2804#define $2 innocuous_$2
2805
2806/* System header to define __stub macros and hopefully few prototypes,
2807    which can conflict with char $2 (); below.
2808    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2809    <limits.h> exists even on freestanding compilers.  */
2810
2811#ifdef __STDC__
2812# include <limits.h>
2813#else
2814# include <assert.h>
2815#endif
2816
2817#undef $2
2818
2819/* Override any GCC internal prototype to avoid an error.
2820   Use char because int might match the return type of a GCC
2821   builtin and then its argument prototype would still apply.  */
2822#ifdef __cplusplus
2823extern "C"
2824#endif
2825char $2 ();
2826/* The GNU C library defines this for functions which it implements
2827    to always fail with ENOSYS.  Some functions are actually named
2828    something starting with __ and the normal name is an alias.  */
2829#if defined __stub_$2 || defined __stub___$2
2830choke me
2831#endif
2832
2833int
2834main ()
2835{
2836return $2 ();
2837  ;
2838  return 0;
2839}
2840_ACEOF
2841if ac_fn_cxx_try_link "$LINENO"; then :
2842  eval "$3=yes"
2843else
2844  eval "$3=no"
2845fi
2846rm -f core conftest.err conftest.$ac_objext \
2847    conftest$ac_exeext conftest.$ac_ext
2848fi
2849eval ac_res=\$$3
2850	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2851$as_echo "$ac_res" >&6; }
2852  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2853
2854} # ac_fn_cxx_check_func
2855
2856# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2857# -------------------------------------------------------
2858# Tests whether HEADER exists and can be compiled using the include files in
2859# INCLUDES, setting the cache variable VAR accordingly.
2860ac_fn_c_check_header_compile ()
2861{
2862  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2863  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2864$as_echo_n "checking for $2... " >&6; }
2865if eval \${$3+:} false; then :
2866  $as_echo_n "(cached) " >&6
2867else
2868  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2869/* end confdefs.h.  */
2870$4
2871#include <$2>
2872_ACEOF
2873if ac_fn_c_try_compile "$LINENO"; then :
2874  eval "$3=yes"
2875else
2876  eval "$3=no"
2877fi
2878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879fi
2880eval ac_res=\$$3
2881	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2882$as_echo "$ac_res" >&6; }
2883  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2884
2885} # ac_fn_c_check_header_compile
2886cat >config.log <<_ACEOF
2887This file contains any messages produced by compilers while
2888running configure, to aid debugging if configure makes a mistake.
2889
2890It was created by OpenJDK $as_me jdk9, which was
2891generated by GNU Autoconf 2.69.  Invocation command line was
2892
2893  $ $0 $@
2894
2895_ACEOF
2896exec 5>>config.log
2897{
2898cat <<_ASUNAME
2899## --------- ##
2900## Platform. ##
2901## --------- ##
2902
2903hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2904uname -m = `(uname -m) 2>/dev/null || echo unknown`
2905uname -r = `(uname -r) 2>/dev/null || echo unknown`
2906uname -s = `(uname -s) 2>/dev/null || echo unknown`
2907uname -v = `(uname -v) 2>/dev/null || echo unknown`
2908
2909/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2910/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2911
2912/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2913/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2914/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2915/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2916/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2917/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2918/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2919
2920_ASUNAME
2921
2922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2923for as_dir in $PATH
2924do
2925  IFS=$as_save_IFS
2926  test -z "$as_dir" && as_dir=.
2927    $as_echo "PATH: $as_dir"
2928  done
2929IFS=$as_save_IFS
2930
2931} >&5
2932
2933cat >&5 <<_ACEOF
2934
2935
2936## ----------- ##
2937## Core tests. ##
2938## ----------- ##
2939
2940_ACEOF
2941
2942
2943# Keep a trace of the command line.
2944# Strip out --no-create and --no-recursion so they do not pile up.
2945# Strip out --silent because we don't want to record it for future runs.
2946# Also quote any args containing shell meta-characters.
2947# Make two passes to allow for proper duplicate-argument suppression.
2948ac_configure_args=
2949ac_configure_args0=
2950ac_configure_args1=
2951ac_must_keep_next=false
2952for ac_pass in 1 2
2953do
2954  for ac_arg
2955  do
2956    case $ac_arg in
2957    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2958    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2959    | -silent | --silent | --silen | --sile | --sil)
2960      continue ;;
2961    *\'*)
2962      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2963    esac
2964    case $ac_pass in
2965    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2966    2)
2967      as_fn_append ac_configure_args1 " '$ac_arg'"
2968      if test $ac_must_keep_next = true; then
2969	ac_must_keep_next=false # Got value, back to normal.
2970      else
2971	case $ac_arg in
2972	  *=* | --config-cache | -C | -disable-* | --disable-* \
2973	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2974	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2975	  | -with-* | --with-* | -without-* | --without-* | --x)
2976	    case "$ac_configure_args0 " in
2977	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2978	    esac
2979	    ;;
2980	  -* ) ac_must_keep_next=true ;;
2981	esac
2982      fi
2983      as_fn_append ac_configure_args " '$ac_arg'"
2984      ;;
2985    esac
2986  done
2987done
2988{ ac_configure_args0=; unset ac_configure_args0;}
2989{ ac_configure_args1=; unset ac_configure_args1;}
2990
2991# When interrupted or exit'd, cleanup temporary files, and complete
2992# config.log.  We remove comments because anyway the quotes in there
2993# would cause problems or look ugly.
2994# WARNING: Use '\'' to represent an apostrophe within the trap.
2995# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2996trap 'exit_status=$?
2997  # Save into config.log some information that might help in debugging.
2998  {
2999    echo
3000
3001    $as_echo "## ---------------- ##
3002## Cache variables. ##
3003## ---------------- ##"
3004    echo
3005    # The following way of writing the cache mishandles newlines in values,
3006(
3007  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3008    eval ac_val=\$$ac_var
3009    case $ac_val in #(
3010    *${as_nl}*)
3011      case $ac_var in #(
3012      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3013$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3014      esac
3015      case $ac_var in #(
3016      _ | IFS | as_nl) ;; #(
3017      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3018      *) { eval $ac_var=; unset $ac_var;} ;;
3019      esac ;;
3020    esac
3021  done
3022  (set) 2>&1 |
3023    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3024    *${as_nl}ac_space=\ *)
3025      sed -n \
3026	"s/'\''/'\''\\\\'\'''\''/g;
3027	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3028      ;; #(
3029    *)
3030      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3031      ;;
3032    esac |
3033    sort
3034)
3035    echo
3036
3037    $as_echo "## ----------------- ##
3038## Output variables. ##
3039## ----------------- ##"
3040    echo
3041    for ac_var in $ac_subst_vars
3042    do
3043      eval ac_val=\$$ac_var
3044      case $ac_val in
3045      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3046      esac
3047      $as_echo "$ac_var='\''$ac_val'\''"
3048    done | sort
3049    echo
3050
3051    if test -n "$ac_subst_files"; then
3052      $as_echo "## ------------------- ##
3053## File substitutions. ##
3054## ------------------- ##"
3055      echo
3056      for ac_var in $ac_subst_files
3057      do
3058	eval ac_val=\$$ac_var
3059	case $ac_val in
3060	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3061	esac
3062	$as_echo "$ac_var='\''$ac_val'\''"
3063      done | sort
3064      echo
3065    fi
3066
3067    if test -s confdefs.h; then
3068      $as_echo "## ----------- ##
3069## confdefs.h. ##
3070## ----------- ##"
3071      echo
3072      cat confdefs.h
3073      echo
3074    fi
3075    test "$ac_signal" != 0 &&
3076      $as_echo "$as_me: caught signal $ac_signal"
3077    $as_echo "$as_me: exit $exit_status"
3078  } >&5
3079  rm -f core *.core core.conftest.* &&
3080    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3081    exit $exit_status
3082' 0
3083for ac_signal in 1 2 13 15; do
3084  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3085done
3086ac_signal=0
3087
3088# confdefs.h avoids OS command line length limits that DEFS can exceed.
3089rm -f -r conftest* confdefs.h
3090
3091$as_echo "/* confdefs.h */" > confdefs.h
3092
3093# Predefined preprocessor variables.
3094
3095cat >>confdefs.h <<_ACEOF
3096#define PACKAGE_NAME "$PACKAGE_NAME"
3097_ACEOF
3098
3099cat >>confdefs.h <<_ACEOF
3100#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3101_ACEOF
3102
3103cat >>confdefs.h <<_ACEOF
3104#define PACKAGE_VERSION "$PACKAGE_VERSION"
3105_ACEOF
3106
3107cat >>confdefs.h <<_ACEOF
3108#define PACKAGE_STRING "$PACKAGE_STRING"
3109_ACEOF
3110
3111cat >>confdefs.h <<_ACEOF
3112#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3113_ACEOF
3114
3115cat >>confdefs.h <<_ACEOF
3116#define PACKAGE_URL "$PACKAGE_URL"
3117_ACEOF
3118
3119
3120# Let the site file select an alternate cache file if it wants to.
3121# Prefer an explicitly selected file to automatically selected ones.
3122ac_site_file1=NONE
3123ac_site_file2=NONE
3124if test -n "$CONFIG_SITE"; then
3125  # We do not want a PATH search for config.site.
3126  case $CONFIG_SITE in #((
3127    -*)  ac_site_file1=./$CONFIG_SITE;;
3128    */*) ac_site_file1=$CONFIG_SITE;;
3129    *)   ac_site_file1=./$CONFIG_SITE;;
3130  esac
3131elif test "x$prefix" != xNONE; then
3132  ac_site_file1=$prefix/share/config.site
3133  ac_site_file2=$prefix/etc/config.site
3134else
3135  ac_site_file1=$ac_default_prefix/share/config.site
3136  ac_site_file2=$ac_default_prefix/etc/config.site
3137fi
3138for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3139do
3140  test "x$ac_site_file" = xNONE && continue
3141  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3142    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3143$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3144    sed 's/^/| /' "$ac_site_file" >&5
3145    . "$ac_site_file" \
3146      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3148as_fn_error $? "failed to load site script $ac_site_file
3149See \`config.log' for more details" "$LINENO" 5; }
3150  fi
3151done
3152
3153if test -r "$cache_file"; then
3154  # Some versions of bash will fail to source /dev/null (special files
3155  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3156  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3157    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3158$as_echo "$as_me: loading cache $cache_file" >&6;}
3159    case $cache_file in
3160      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3161      *)                      . "./$cache_file";;
3162    esac
3163  fi
3164else
3165  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3166$as_echo "$as_me: creating cache $cache_file" >&6;}
3167  >$cache_file
3168fi
3169
3170# Check that the precious variables saved in the cache have kept the same
3171# value.
3172ac_cache_corrupted=false
3173for ac_var in $ac_precious_vars; do
3174  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3175  eval ac_new_set=\$ac_env_${ac_var}_set
3176  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3177  eval ac_new_val=\$ac_env_${ac_var}_value
3178  case $ac_old_set,$ac_new_set in
3179    set,)
3180      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3181$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3182      ac_cache_corrupted=: ;;
3183    ,set)
3184      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3185$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3186      ac_cache_corrupted=: ;;
3187    ,);;
3188    *)
3189      if test "x$ac_old_val" != "x$ac_new_val"; then
3190	# differences in whitespace do not lead to failure.
3191	ac_old_val_w=`echo x $ac_old_val`
3192	ac_new_val_w=`echo x $ac_new_val`
3193	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3194	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3195$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3196	  ac_cache_corrupted=:
3197	else
3198	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3199$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3200	  eval $ac_var=\$ac_old_val
3201	fi
3202	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3203$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3204	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3205$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3206      fi;;
3207  esac
3208  # Pass precious variables to config.status.
3209  if test "$ac_new_set" = set; then
3210    case $ac_new_val in
3211    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3212    *) ac_arg=$ac_var=$ac_new_val ;;
3213    esac
3214    case " $ac_configure_args " in
3215      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3216      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3217    esac
3218  fi
3219done
3220if $ac_cache_corrupted; then
3221  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3222$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3223  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3224$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3225  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3226fi
3227## -------------------- ##
3228## Main body of script. ##
3229## -------------------- ##
3230
3231ac_ext=c
3232ac_cpp='$CPP $CPPFLAGS'
3233ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3234ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3235ac_compiler_gnu=$ac_cv_c_compiler_gnu
3236
3237
3238
3239ac_aux_dir=
3240for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3241  if test -f "$ac_dir/install-sh"; then
3242    ac_aux_dir=$ac_dir
3243    ac_install_sh="$ac_aux_dir/install-sh -c"
3244    break
3245  elif test -f "$ac_dir/install.sh"; then
3246    ac_aux_dir=$ac_dir
3247    ac_install_sh="$ac_aux_dir/install.sh -c"
3248    break
3249  elif test -f "$ac_dir/shtool"; then
3250    ac_aux_dir=$ac_dir
3251    ac_install_sh="$ac_aux_dir/shtool install -c"
3252    break
3253  fi
3254done
3255if test -z "$ac_aux_dir"; then
3256  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
3257fi
3258
3259# These three variables are undocumented and unsupported,
3260# and are intended to be withdrawn in a future Autoconf release.
3261# They can cause serious problems if a builder's source tree is in a directory
3262# whose full name contains unusual characters.
3263ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3264ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3265ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3266
3267
3268# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3269
3270#
3271# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3272# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3273#
3274# This code is free software; you can redistribute it and/or modify it
3275# under the terms of the GNU General Public License version 2 only, as
3276# published by the Free Software Foundation.  Oracle designates this
3277# particular file as subject to the "Classpath" exception as provided
3278# by Oracle in the LICENSE file that accompanied this code.
3279#
3280# This code is distributed in the hope that it will be useful, but WITHOUT
3281# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3282# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3283# version 2 for more details (a copy is included in the LICENSE file that
3284# accompanied this code).
3285#
3286# You should have received a copy of the GNU General Public License version
3287# 2 along with this work; if not, write to the Free Software Foundation,
3288# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3289#
3290# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3291# or visit www.oracle.com if you need additional information or have any
3292# questions.
3293#
3294
3295#
3296# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3297#
3298# This program is free software; you can redistribute it and/or modify
3299# it under the terms of the GNU General Public License as published by
3300# the Free Software Foundation; either version 2 of the License, or
3301# (at your option) any later version.
3302#
3303# This program is distributed in the hope that it will be useful, but
3304# WITHOUT ANY WARRANTY; without even the implied warranty of
3305# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3306# General Public License for more details.
3307#
3308# You should have received a copy of the GNU General Public License
3309# along with this program; if not, write to the Free Software
3310# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3311#
3312# As a special exception to the GNU General Public License, if you
3313# distribute this file as part of a program that contains a
3314# configuration script generated by Autoconf, you may include it under
3315# the same distribution terms that you use for the rest of that program.
3316
3317# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3318# ----------------------------------
3319# PKG_PROG_PKG_CONFIG
3320
3321# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3322#
3323# Check to see whether a particular set of modules exists.  Similar
3324# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3325#
3326#
3327# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3328# this or PKG_CHECK_MODULES is called, or make sure to call
3329# PKG_CHECK_EXISTS manually
3330# --------------------------------------------------------------
3331
3332
3333
3334# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3335# ---------------------------------------------
3336# _PKG_CONFIG
3337
3338# _PKG_SHORT_ERRORS_SUPPORTED
3339# -----------------------------
3340# _PKG_SHORT_ERRORS_SUPPORTED
3341
3342
3343# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3344# [ACTION-IF-NOT-FOUND])
3345#
3346#
3347# Note that if there is a possibility the first call to
3348# PKG_CHECK_MODULES might not happen, you should be sure to include an
3349# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3350#
3351#
3352# --------------------------------------------------------------
3353# PKG_CHECK_MODULES
3354
3355
3356# Include these first...
3357#
3358# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3359# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3360#
3361# This code is free software; you can redistribute it and/or modify it
3362# under the terms of the GNU General Public License version 2 only, as
3363# published by the Free Software Foundation.  Oracle designates this
3364# particular file as subject to the "Classpath" exception as provided
3365# by Oracle in the LICENSE file that accompanied this code.
3366#
3367# This code is distributed in the hope that it will be useful, but WITHOUT
3368# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3369# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3370# version 2 for more details (a copy is included in the LICENSE file that
3371# accompanied this code).
3372#
3373# You should have received a copy of the GNU General Public License version
3374# 2 along with this work; if not, write to the Free Software Foundation,
3375# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3376#
3377# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3378# or visit www.oracle.com if you need additional information or have any
3379# questions.
3380#
3381
3382# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3383# If so, then append $1 to $2 \
3384# Also set JVM_ARG_OK to true/false depending on outcome.
3385
3386
3387# Appends a string to a path variable, only adding the : when needed.
3388
3389
3390# Prepends a string to a path variable, only adding the : when needed.
3391
3392
3393# This will make sure the given variable points to a full and proper
3394# path. This means:
3395# 1) There will be no spaces in the path. On unix platforms,
3396#    spaces in the path will result in an error. On Windows,
3397#    the path will be rewritten using short-style to be space-free.
3398# 2) The path will be absolute, and it will be in unix-style (on
3399#     cygwin).
3400# $1: The name of the variable to fix
3401
3402
3403# This will make sure the given variable points to a executable
3404# with a full and proper path. This means:
3405# 1) There will be no spaces in the path. On unix platforms,
3406#    spaces in the path will result in an error. On Windows,
3407#    the path will be rewritten using short-style to be space-free.
3408# 2) The path will be absolute, and it will be in unix-style (on
3409#     cygwin).
3410# Any arguments given to the executable is preserved.
3411# If the input variable does not have a directory specification, then
3412# it need to be in the PATH.
3413# $1: The name of the variable to fix
3414
3415
3416
3417
3418# Register a --with argument but mark it as deprecated
3419# $1: The name of the with argument to deprecate, not including --with-
3420
3421
3422# Register a --enable argument but mark it as deprecated
3423# $1: The name of the with argument to deprecate, not including --enable-
3424# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3425
3426
3427
3428
3429# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3430# $1: variable to check
3431
3432
3433# Check that there are no unprocessed overridden variables left.
3434# If so, they are an incorrect argument and we will exit with an error.
3435
3436
3437# Setup a tool for the given variable. If correctly specified by the user,
3438# use that value, otherwise search for the tool using the supplied code snippet.
3439# $1: variable to set
3440# $2: code snippet to call to look for the tool
3441
3442
3443# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3444# $1: variable to set
3445# $2: executable name (or list of names) to look for
3446
3447
3448# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3449# $1: variable to set
3450# $2: executable name (or list of names) to look for
3451
3452
3453# Like BASIC_PATH_PROGS but fails if no tool was found.
3454# $1: variable to set
3455# $2: executable name (or list of names) to look for
3456
3457
3458# Like BASIC_SETUP_TOOL but fails if no tool was found.
3459# $1: variable to set
3460# $2: autoconf macro to call to look for the special tool
3461
3462
3463# Setup the most fundamental tools that relies on not much else to set up,
3464# but is used by much of the early bootstrap code.
3465
3466
3467# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477#%%% Simple tools %%%
3478
3479# Check if we have found a usable version of make
3480# $1: the path to a potential make binary (or empty)
3481# $2: the description on how we found this
3482
3483
3484
3485
3486# Goes looking for a usable version of GNU make.
3487
3488
3489
3490
3491
3492
3493# Check if build directory is on local disk. If not possible to determine,
3494# we prefer to claim it's local.
3495# Argument 1: directory to test
3496# Argument 2: what to do if it is on local disk
3497# Argument 3: what to do otherwise (remote disk or failure)
3498
3499
3500# Check that source files have basic read permissions set. This might
3501# not be the case in cygwin in certain conditions.
3502
3503
3504
3505
3506# Check for support for specific options in bash
3507
3508
3509#
3510# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3511# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3512#
3513# This code is free software; you can redistribute it and/or modify it
3514# under the terms of the GNU General Public License version 2 only, as
3515# published by the Free Software Foundation.  Oracle designates this
3516# particular file as subject to the "Classpath" exception as provided
3517# by Oracle in the LICENSE file that accompanied this code.
3518#
3519# This code is distributed in the hope that it will be useful, but WITHOUT
3520# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3521# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3522# version 2 for more details (a copy is included in the LICENSE file that
3523# accompanied this code).
3524#
3525# You should have received a copy of the GNU General Public License version
3526# 2 along with this work; if not, write to the Free Software Foundation,
3527# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3528#
3529# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3530# or visit www.oracle.com if you need additional information or have any
3531# questions.
3532#
3533
3534
3535
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# Helper function which possibly converts a path using DOS-style short mode.
3544# If so, the updated path is stored in $new_path.
3545# $1: The path to check
3546
3547
3548# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3549# and could probably be heavily simplified. However, all changes in this
3550# area tend to need lot of testing in different scenarios, and in lack of
3551# proper unit testing, cleaning this up has not been deemed worth the effort
3552# at the moment.
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3563
3564
3565
3566
3567#
3568# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3569# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3570#
3571# This code is free software; you can redistribute it and/or modify it
3572# under the terms of the GNU General Public License version 2 only, as
3573# published by the Free Software Foundation.  Oracle designates this
3574# particular file as subject to the "Classpath" exception as provided
3575# by Oracle in the LICENSE file that accompanied this code.
3576#
3577# This code is distributed in the hope that it will be useful, but WITHOUT
3578# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3579# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3580# version 2 for more details (a copy is included in the LICENSE file that
3581# accompanied this code).
3582#
3583# You should have received a copy of the GNU General Public License version
3584# 2 along with this work; if not, write to the Free Software Foundation,
3585# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3586#
3587# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3588# or visit www.oracle.com if you need additional information or have any
3589# questions.
3590#
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602# ... then the rest
3603#
3604# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3605# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3606#
3607# This code is free software; you can redistribute it and/or modify it
3608# under the terms of the GNU General Public License version 2 only, as
3609# published by the Free Software Foundation.  Oracle designates this
3610# particular file as subject to the "Classpath" exception as provided
3611# by Oracle in the LICENSE file that accompanied this code.
3612#
3613# This code is distributed in the hope that it will be useful, but WITHOUT
3614# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3615# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3616# version 2 for more details (a copy is included in the LICENSE file that
3617# accompanied this code).
3618#
3619# You should have received a copy of the GNU General Public License version
3620# 2 along with this work; if not, write to the Free Software Foundation,
3621# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3622#
3623# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3624# or visit www.oracle.com if you need additional information or have any
3625# questions.
3626#
3627
3628########################################################################
3629# This file handles detection of the Boot JDK. The Boot JDK detection
3630# process has been developed as a response to solve a complex real-world
3631# problem. Initially, it was simple, but it has grown as platform after
3632# platform, idiosyncracy after idiosyncracy has been supported.
3633#
3634# The basic idea is this:
3635# 1) You need an acceptable *) JDK to use as a Boot JDK
3636# 2) There are several ways to locate a JDK, that are mostly platform
3637#    dependent **)
3638# 3) You can have multiple JDKs installed
3639# 4) If possible, configure should try to dig out an acceptable JDK
3640#    automatically, without having to resort to command-line options
3641#
3642# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3643#     javac) and not a JRE, etc.
3644#
3645# **) On Windows we typically use a well-known path.
3646#     On MacOSX we typically use the tool java_home.
3647#     On Linux we typically find javac in the $PATH, and then follow a
3648#     chain of symlinks that often ends up in a real JDK.
3649#
3650# This leads to the code where we check in different ways to locate a
3651# JDK, and if one is found, check if it is acceptable. If not, we print
3652# our reasons for rejecting it (useful when debugging non-working
3653# configure situations) and continue checking the next one.
3654########################################################################
3655
3656# Execute the check given as argument, and verify the result
3657# If the Boot JDK was previously found, do nothing
3658# $1 A command line (typically autoconf macro) to execute
3659
3660
3661# Test: Is bootjdk explicitely set by command line arguments?
3662
3663
3664# Test: Is bootjdk available from builddeps?
3665
3666
3667# Test: Is $JAVA_HOME set?
3668
3669
3670# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3671
3672
3673# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3674# $1: Argument to the java_home binary (optional)
3675
3676
3677# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3678
3679
3680# Look for a jdk in the given path. If there are multiple, try to select the newest.
3681# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3682# $1 = Path to directory containing jdk installations.
3683# $2 = String to append to the found JDK directory to get the proper JDK home
3684
3685
3686# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3687# environmental variable as base for where to look.
3688# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3689
3690
3691# Test: Is there a JDK installed in default, well-known locations?
3692
3693
3694# Check that a command-line tool in the Boot JDK is correct
3695# $1 = name of variable to assign
3696# $2 = name of binary
3697
3698
3699###############################################################################
3700#
3701# We need a Boot JDK to bootstrap the build.
3702#
3703
3704
3705
3706
3707
3708#
3709# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3710# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3711#
3712# This code is free software; you can redistribute it and/or modify it
3713# under the terms of the GNU General Public License version 2 only, as
3714# published by the Free Software Foundation.  Oracle designates this
3715# particular file as subject to the "Classpath" exception as provided
3716# by Oracle in the LICENSE file that accompanied this code.
3717#
3718# This code is distributed in the hope that it will be useful, but WITHOUT
3719# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3720# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3721# version 2 for more details (a copy is included in the LICENSE file that
3722# accompanied this code).
3723#
3724# You should have received a copy of the GNU General Public License version
3725# 2 along with this work; if not, write to the Free Software Foundation,
3726# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3727#
3728# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3729# or visit www.oracle.com if you need additional information or have any
3730# questions.
3731#
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752#
3753# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3754# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3755#
3756# This code is free software; you can redistribute it and/or modify it
3757# under the terms of the GNU General Public License version 2 only, as
3758# published by the Free Software Foundation.  Oracle designates this
3759# particular file as subject to the "Classpath" exception as provided
3760# by Oracle in the LICENSE file that accompanied this code.
3761#
3762# This code is distributed in the hope that it will be useful, but WITHOUT
3763# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3764# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3765# version 2 for more details (a copy is included in the LICENSE file that
3766# accompanied this code).
3767#
3768# You should have received a copy of the GNU General Public License version
3769# 2 along with this work; if not, write to the Free Software Foundation,
3770# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3771#
3772# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3773# or visit www.oracle.com if you need additional information or have any
3774# questions.
3775#
3776
3777
3778
3779
3780
3781# Documentation on common flags used for solstudio in HIGHEST.
3782#
3783# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3784#          done with care, there are some assumptions below that need to
3785#          be understood about the use of pointers, and IEEE behavior.
3786#
3787# -fns: Use non-standard floating point mode (not IEEE 754)
3788# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3789# -fsingle: Use single precision floating point with 'float'
3790# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3791#   (Source with excessing pointer casting and data access with mixed
3792#    pointer types are not recommended)
3793# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3794#   (If you expect perfect errno behavior, do not use this)
3795# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3796# -xrestrict: Pointer parameters to functions do not overlap
3797#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3798#    If you pass in multiple pointers to the same data, do not use this)
3799# -xlibmil: Inline some library routines
3800#   (If you expect perfect errno behavior, do not use this)
3801# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3802#   (If you expect perfect errno behavior, do not use this)
3803#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3804
3805    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3806    # Bug?
3807    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3808    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3809    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3810    #fi
3811
3812
3813
3814
3815
3816# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3817#                                   [RUN-IF-FALSE])
3818# ------------------------------------------------------------
3819# Check that the c and c++ compilers support an argument
3820
3821
3822# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3823#                                    [RUN-IF-FALSE])
3824# ------------------------------------------------------------
3825# Check that the linker support an argument
3826
3827
3828
3829
3830#
3831# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3832# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3833#
3834# This code is free software; you can redistribute it and/or modify it
3835# under the terms of the GNU General Public License version 2 only, as
3836# published by the Free Software Foundation.  Oracle designates this
3837# particular file as subject to the "Classpath" exception as provided
3838# by Oracle in the LICENSE file that accompanied this code.
3839#
3840# This code is distributed in the hope that it will be useful, but WITHOUT
3841# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3842# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3843# version 2 for more details (a copy is included in the LICENSE file that
3844# accompanied this code).
3845#
3846# You should have received a copy of the GNU General Public License version
3847# 2 along with this work; if not, write to the Free Software Foundation,
3848# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3849#
3850# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3851# or visit www.oracle.com if you need additional information or have any
3852# questions.
3853#
3854
3855
3856
3857
3858
3859cygwin_help() {
3860  case $1 in
3861    unzip)
3862      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3863      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3864      ;;
3865    zip)
3866      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3867      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3868      ;;
3869    make)
3870      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3871      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3872      ;;
3873    freetype)
3874      HELP_MSG="
3875The freetype library can now be build during the configure process.
3876Download the freetype sources and unpack them into an arbitrary directory:
3877
3878wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
3879tar -xzf freetype-2.5.3.tar.gz
3880
3881Then run configure with '--with-freetype-src=<freetype_src>'. This will
3882automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
3883builds or into '<freetype_src>/lib32' for 32-bit builds.
3884Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
3885and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds."
3886      ;;
3887  esac
3888}
3889
3890msys_help() {
3891  PKGHANDLER_COMMAND=""
3892}
3893
3894apt_help() {
3895  case $1 in
3896    devkit)
3897      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3898    openjdk)
3899      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3900    alsa)
3901      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3902    cups)
3903      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3904    freetype)
3905      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3906    pulse)
3907      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3908    x11)
3909      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3910    ccache)
3911      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3912  esac
3913}
3914
3915yum_help() {
3916  case $1 in
3917    devkit)
3918      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3919    openjdk)
3920      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3921    alsa)
3922      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3923    cups)
3924      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3925    freetype)
3926      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3927    pulse)
3928      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3929    x11)
3930      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
3931    ccache)
3932      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3933  esac
3934}
3935
3936port_help() {
3937  PKGHANDLER_COMMAND=""
3938}
3939
3940pkgutil_help() {
3941  PKGHANDLER_COMMAND=""
3942}
3943
3944pkgadd_help() {
3945  PKGHANDLER_COMMAND=""
3946}
3947
3948# This function will check if we're called from the "configure" wrapper while
3949# printing --help. If so, we will print out additional information that can
3950# only be extracted within the autoconf script, and then exit. This must be
3951# called at the very beginning in configure.ac.
3952
3953
3954
3955
3956
3957
3958#
3959# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3960# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3961#
3962# This code is free software; you can redistribute it and/or modify it
3963# under the terms of the GNU General Public License version 2 only, as
3964# published by the Free Software Foundation.  Oracle designates this
3965# particular file as subject to the "Classpath" exception as provided
3966# by Oracle in the LICENSE file that accompanied this code.
3967#
3968# This code is distributed in the hope that it will be useful, but WITHOUT
3969# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3970# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3971# version 2 for more details (a copy is included in the LICENSE file that
3972# accompanied this code).
3973#
3974# You should have received a copy of the GNU General Public License version
3975# 2 along with this work; if not, write to the Free Software Foundation,
3976# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3977#
3978# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3979# or visit www.oracle.com if you need additional information or have any
3980# questions.
3981#
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992###############################################################################
3993#
3994# Should we build only OpenJDK even if closed sources are present?
3995#
3996
3997
3998
3999
4000###############################################################################
4001#
4002# Setup version numbers
4003#
4004
4005
4006
4007
4008
4009
4010################################################################################
4011#
4012# Gcov coverage data for hotspot
4013#
4014
4015
4016#
4017# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4018# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4019#
4020# This code is free software; you can redistribute it and/or modify it
4021# under the terms of the GNU General Public License version 2 only, as
4022# published by the Free Software Foundation.  Oracle designates this
4023# particular file as subject to the "Classpath" exception as provided
4024# by Oracle in the LICENSE file that accompanied this code.
4025#
4026# This code is distributed in the hope that it will be useful, but WITHOUT
4027# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4028# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4029# version 2 for more details (a copy is included in the LICENSE file that
4030# accompanied this code).
4031#
4032# You should have received a copy of the GNU General Public License version
4033# 2 along with this work; if not, write to the Free Software Foundation,
4034# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4035#
4036# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4037# or visit www.oracle.com if you need additional information or have any
4038# questions.
4039#
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061#
4062# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4063# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4064#
4065# This code is free software; you can redistribute it and/or modify it
4066# under the terms of the GNU General Public License version 2 only, as
4067# published by the Free Software Foundation.  Oracle designates this
4068# particular file as subject to the "Classpath" exception as provided
4069# by Oracle in the LICENSE file that accompanied this code.
4070#
4071# This code is distributed in the hope that it will be useful, but WITHOUT
4072# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4073# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4074# version 2 for more details (a copy is included in the LICENSE file that
4075# accompanied this code).
4076#
4077# You should have received a copy of the GNU General Public License version
4078# 2 along with this work; if not, write to the Free Software Foundation,
4079# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4080#
4081# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4082# or visit www.oracle.com if you need additional information or have any
4083# questions.
4084#
4085
4086# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4087# Converts autoconf style CPU name to OpenJDK style, into
4088# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4089
4090
4091# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4092# Converts autoconf style OS name to OpenJDK style, into
4093# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4094
4095
4096# Expects $host_os $host_cpu $build_os and $build_cpu
4097# and $with_target_bits to have been setup!
4098#
4099# Translate the standard triplet(quadruplet) definition
4100# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4101# OPENJDK_BUILD_OS, etc.
4102
4103
4104# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4105# accordingly. Must be done after setting up build and target system, but before
4106# doing anything else with these values.
4107
4108
4109# Setup the legacy variables, for controlling the old makefiles.
4110#
4111
4112
4113
4114
4115#%%% Build and target systems %%%
4116
4117
4118
4119
4120# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4121# Add -mX to various FLAGS variables.
4122
4123
4124
4125
4126
4127
4128#
4129# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4130# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4131#
4132# This code is free software; you can redistribute it and/or modify it
4133# under the terms of the GNU General Public License version 2 only, as
4134# published by the Free Software Foundation.  Oracle designates this
4135# particular file as subject to the "Classpath" exception as provided
4136# by Oracle in the LICENSE file that accompanied this code.
4137#
4138# This code is distributed in the hope that it will be useful, but WITHOUT
4139# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4140# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4141# version 2 for more details (a copy is included in the LICENSE file that
4142# accompanied this code).
4143#
4144# You should have received a copy of the GNU General Public License version
4145# 2 along with this work; if not, write to the Free Software Foundation,
4146# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4147#
4148# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4149# or visit www.oracle.com if you need additional information or have any
4150# questions.
4151#
4152
4153
4154
4155
4156
4157
4158
4159
4160#
4161# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4162# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4163#
4164# This code is free software; you can redistribute it and/or modify it
4165# under the terms of the GNU General Public License version 2 only, as
4166# published by the Free Software Foundation.  Oracle designates this
4167# particular file as subject to the "Classpath" exception as provided
4168# by Oracle in the LICENSE file that accompanied this code.
4169#
4170# This code is distributed in the hope that it will be useful, but WITHOUT
4171# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4172# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4173# version 2 for more details (a copy is included in the LICENSE file that
4174# accompanied this code).
4175#
4176# You should have received a copy of the GNU General Public License version
4177# 2 along with this work; if not, write to the Free Software Foundation,
4178# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4179#
4180# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4181# or visit www.oracle.com if you need additional information or have any
4182# questions.
4183#
4184
4185########################################################################
4186# This file is responsible for detecting, verifying and setting up the
4187# toolchain, i.e. the compiler, linker and related utilities. It will setup
4188# proper paths to the binaries, but it will not setup any flags.
4189#
4190# The binaries used is determined by the toolchain type, which is the family of
4191# compilers and related tools that are used.
4192########################################################################
4193
4194
4195# All valid toolchains, regardless of platform (used by help.m4)
4196VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4197
4198# These toolchains are valid on different platforms
4199VALID_TOOLCHAINS_linux="gcc clang"
4200VALID_TOOLCHAINS_solaris="solstudio"
4201VALID_TOOLCHAINS_macosx="gcc clang"
4202VALID_TOOLCHAINS_aix="xlc"
4203VALID_TOOLCHAINS_windows="microsoft"
4204
4205# Toolchain descriptions
4206TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4207TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4208TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4209TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4210TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4211
4212# Setup a number of variables describing how native output files are
4213# named on this platform/toolchain.
4214
4215
4216# Determine which toolchain type to use, and make sure it is valid for this
4217# platform. Setup various information about the selected toolchain.
4218
4219
4220# Before we start detecting the toolchain executables, we might need some
4221# special setup, e.g. additional paths etc.
4222
4223
4224# Restore path, etc
4225
4226
4227# Check if a compiler is of the toolchain type we expect, and save the version
4228# information from it. If the compiler does not match the expected type,
4229# this function will abort using AC_MSG_ERROR. If it matches, the version will
4230# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4231# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4232#
4233# $1 = compiler to test (CC or CXX)
4234# $2 = human readable name of compiler (C or C++)
4235
4236
4237# Try to locate the given C or C++ compiler in the path, or otherwise.
4238#
4239# $1 = compiler to test (CC or CXX)
4240# $2 = human readable name of compiler (C or C++)
4241# $3 = list of compiler names to search for
4242
4243
4244# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4245# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4246# archiver (AR). Verify that the compilers are correct according to the
4247# toolchain type.
4248
4249
4250# Setup additional tools that is considered a part of the toolchain, but not the
4251# core part. Many of these are highly platform-specific and do not exist,
4252# and/or are not needed on all platforms.
4253
4254
4255# Setup the build tools (i.e, the compiler and linker used to build programs
4256# that should be run on the build platform, not the target platform, as a build
4257# helper). Since the non-cross-compile case uses the normal, target compilers
4258# for this, we can only do this after these have been setup.
4259
4260
4261# Setup legacy variables that are still needed as alternative ways to refer to
4262# parts of the toolchain.
4263
4264
4265# Do some additional checks on the detected tools.
4266
4267
4268# Setup the JTReg Regression Test Harness.
4269
4270
4271#
4272# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4273# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4274#
4275# This code is free software; you can redistribute it and/or modify it
4276# under the terms of the GNU General Public License version 2 only, as
4277# published by the Free Software Foundation.  Oracle designates this
4278# particular file as subject to the "Classpath" exception as provided
4279# by Oracle in the LICENSE file that accompanied this code.
4280#
4281# This code is distributed in the hope that it will be useful, but WITHOUT
4282# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4283# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4284# version 2 for more details (a copy is included in the LICENSE file that
4285# accompanied this code).
4286#
4287# You should have received a copy of the GNU General Public License version
4288# 2 along with this work; if not, write to the Free Software Foundation,
4289# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4290#
4291# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4292# or visit www.oracle.com if you need additional information or have any
4293# questions.
4294#
4295
4296################################################################################
4297
4298VALID_VS_VERSIONS="2010 2012 2013"
4299
4300VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
4301VS_VERSION_INTERNAL_2010=100
4302VS_MSVCR_2010=msvcr100.dll
4303# We don't use msvcp on Visual Studio 2010
4304#VS_MSVCP_2010=msvcp100.dll
4305VS_ENVVAR_2010="VS100COMNTOOLS"
4306VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
4307VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
4308VS_VS_PLATFORM_NAME_2010="v100"
4309VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
4310
4311VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
4312VS_VERSION_INTERNAL_2012=110
4313VS_MSVCR_2012=msvcr110.dll
4314VS_MSVCP_2012=msvcp110.dll
4315VS_ENVVAR_2012="VS110COMNTOOLS"
4316VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
4317VS_SDK_INSTALLDIR_2012=
4318VS_VS_PLATFORM_NAME_2012="v110"
4319VS_SDK_PLATFORM_NAME_2012=
4320
4321VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
4322VS_VERSION_INTERNAL_2013=120
4323VS_MSVCR_2013=msvcr120.dll
4324VS_MSVCP_2013=msvcp120.dll
4325VS_ENVVAR_2013="VS120COMNTOOLS"
4326VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
4327VS_SDK_INSTALLDIR_2013=
4328VS_VS_PLATFORM_NAME_2013="v120"
4329VS_SDK_PLATFORM_NAME_2013=
4330
4331################################################################################
4332
4333
4334
4335################################################################################
4336
4337
4338
4339################################################################################
4340# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
4341# build environment and assigns it to VS_ENV_CMD
4342
4343
4344################################################################################
4345
4346
4347
4348################################################################################
4349# Check if the VS env variables were setup prior to running configure.
4350# If not, then find vcvarsall.bat and run it automatically, and integrate
4351# the set env variables into the spec file.
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365# This line needs to be here, verbatim, after all includes and the dummy hook
4366# definitions. It is replaced with custom functionality when building
4367# custom sources.
4368#CUSTOM_AUTOCONF_INCLUDE
4369
4370# Do not change or remove the following line, it is needed for consistency checks:
4371DATE_WHEN_GENERATED=1425994551
4372
4373###############################################################################
4374#
4375# Initialization / Boot-strapping
4376#
4377# The bootstrapping process needs to solve the "chicken or the egg" problem,
4378# thus it jumps back and forth, each time gaining something needed later on.
4379#
4380###############################################################################
4381
4382# If we are requested to print additional help, do that and then exit.
4383# This must be the very first call.
4384
4385  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4386    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4387    $PRINTF "Which are valid to use depends on the build platform.\n"
4388    for toolchain in $VALID_TOOLCHAINS_all; do
4389      # Use indirect variable referencing
4390      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4391      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4392      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4393    done
4394
4395    # And now exit directly
4396    exit 0
4397  fi
4398
4399
4400# Basic initialization that must happen first of all in the normal process.
4401
4402  # Save the original command line. This is passed to us by the wrapper configure script.
4403
4404  # Save the path variable before it gets changed
4405  ORIGINAL_PATH="$PATH"
4406
4407  DATE_WHEN_CONFIGURED=`LANG=C date`
4408
4409  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4410$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4411  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4412$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4413
4414
4415  # Start with tools that do not need have cross compilation support
4416  # and can be expected to be found in the default PATH. These tools are
4417  # used by configure. Nor are these tools expected to be found in the
4418  # devkit from the builddeps server either, since they are
4419  # needed to download the devkit.
4420
4421  # First are all the simple required tools.
4422
4423
4424
4425  # Publish this variable in the help.
4426
4427
4428  if test "x$BASENAME" = x; then
4429    # The variable is not set by user, try to locate tool using the code snippet
4430    for ac_prog in basename
4431do
4432  # Extract the first word of "$ac_prog", so it can be a program name with args.
4433set dummy $ac_prog; ac_word=$2
4434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4435$as_echo_n "checking for $ac_word... " >&6; }
4436if ${ac_cv_path_BASENAME+:} false; then :
4437  $as_echo_n "(cached) " >&6
4438else
4439  case $BASENAME in
4440  [\\/]* | ?:[\\/]*)
4441  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4442  ;;
4443  *)
4444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4445for as_dir in $PATH
4446do
4447  IFS=$as_save_IFS
4448  test -z "$as_dir" && as_dir=.
4449    for ac_exec_ext in '' $ac_executable_extensions; do
4450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4451    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4453    break 2
4454  fi
4455done
4456  done
4457IFS=$as_save_IFS
4458
4459  ;;
4460esac
4461fi
4462BASENAME=$ac_cv_path_BASENAME
4463if test -n "$BASENAME"; then
4464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4465$as_echo "$BASENAME" >&6; }
4466else
4467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4468$as_echo "no" >&6; }
4469fi
4470
4471
4472  test -n "$BASENAME" && break
4473done
4474
4475  else
4476    # The variable is set, but is it from the command line or the environment?
4477
4478    # Try to remove the string !BASENAME! from our list.
4479    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4480    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4481      # If it failed, the variable was not from the command line. Ignore it,
4482      # but warn the user (except for BASH, which is always set by the calling BASH).
4483      if test "xBASENAME" != xBASH; then
4484        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4485$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4486      fi
4487      # Try to locate tool using the code snippet
4488      for ac_prog in basename
4489do
4490  # Extract the first word of "$ac_prog", so it can be a program name with args.
4491set dummy $ac_prog; ac_word=$2
4492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4493$as_echo_n "checking for $ac_word... " >&6; }
4494if ${ac_cv_path_BASENAME+:} false; then :
4495  $as_echo_n "(cached) " >&6
4496else
4497  case $BASENAME in
4498  [\\/]* | ?:[\\/]*)
4499  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4500  ;;
4501  *)
4502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4503for as_dir in $PATH
4504do
4505  IFS=$as_save_IFS
4506  test -z "$as_dir" && as_dir=.
4507    for ac_exec_ext in '' $ac_executable_extensions; do
4508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4509    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4511    break 2
4512  fi
4513done
4514  done
4515IFS=$as_save_IFS
4516
4517  ;;
4518esac
4519fi
4520BASENAME=$ac_cv_path_BASENAME
4521if test -n "$BASENAME"; then
4522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4523$as_echo "$BASENAME" >&6; }
4524else
4525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4526$as_echo "no" >&6; }
4527fi
4528
4529
4530  test -n "$BASENAME" && break
4531done
4532
4533    else
4534      # If it succeeded, then it was overridden by the user. We will use it
4535      # for the tool.
4536
4537      # First remove it from the list of overridden variables, so we can test
4538      # for unknown variables in the end.
4539      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4540
4541      # Check if the provided tool contains a complete path.
4542      tool_specified="$BASENAME"
4543      tool_basename="${tool_specified##*/}"
4544      if test "x$tool_basename" = "x$tool_specified"; then
4545        # A command without a complete path is provided, search $PATH.
4546        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4547$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4548        # Extract the first word of "$tool_basename", so it can be a program name with args.
4549set dummy $tool_basename; ac_word=$2
4550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4551$as_echo_n "checking for $ac_word... " >&6; }
4552if ${ac_cv_path_BASENAME+:} false; then :
4553  $as_echo_n "(cached) " >&6
4554else
4555  case $BASENAME in
4556  [\\/]* | ?:[\\/]*)
4557  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4558  ;;
4559  *)
4560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4561for as_dir in $PATH
4562do
4563  IFS=$as_save_IFS
4564  test -z "$as_dir" && as_dir=.
4565    for ac_exec_ext in '' $ac_executable_extensions; do
4566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4567    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4569    break 2
4570  fi
4571done
4572  done
4573IFS=$as_save_IFS
4574
4575  ;;
4576esac
4577fi
4578BASENAME=$ac_cv_path_BASENAME
4579if test -n "$BASENAME"; then
4580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4581$as_echo "$BASENAME" >&6; }
4582else
4583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4584$as_echo "no" >&6; }
4585fi
4586
4587
4588        if test "x$BASENAME" = x; then
4589          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4590        fi
4591      else
4592        # Otherwise we believe it is a complete path. Use it as it is.
4593        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4594$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4595        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4596$as_echo_n "checking for BASENAME... " >&6; }
4597        if test ! -x "$tool_specified"; then
4598          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4599$as_echo "not found" >&6; }
4600          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4601        fi
4602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4603$as_echo "$tool_specified" >&6; }
4604      fi
4605    fi
4606  fi
4607
4608
4609
4610  if test "x$BASENAME" = x; then
4611    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4612  fi
4613
4614
4615
4616
4617
4618  # Publish this variable in the help.
4619
4620
4621  if test "x$BASH" = x; then
4622    # The variable is not set by user, try to locate tool using the code snippet
4623    for ac_prog in bash
4624do
4625  # Extract the first word of "$ac_prog", so it can be a program name with args.
4626set dummy $ac_prog; ac_word=$2
4627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4628$as_echo_n "checking for $ac_word... " >&6; }
4629if ${ac_cv_path_BASH+:} false; then :
4630  $as_echo_n "(cached) " >&6
4631else
4632  case $BASH in
4633  [\\/]* | ?:[\\/]*)
4634  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4635  ;;
4636  *)
4637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4638for as_dir in $PATH
4639do
4640  IFS=$as_save_IFS
4641  test -z "$as_dir" && as_dir=.
4642    for ac_exec_ext in '' $ac_executable_extensions; do
4643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4644    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4646    break 2
4647  fi
4648done
4649  done
4650IFS=$as_save_IFS
4651
4652  ;;
4653esac
4654fi
4655BASH=$ac_cv_path_BASH
4656if test -n "$BASH"; then
4657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4658$as_echo "$BASH" >&6; }
4659else
4660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4661$as_echo "no" >&6; }
4662fi
4663
4664
4665  test -n "$BASH" && break
4666done
4667
4668  else
4669    # The variable is set, but is it from the command line or the environment?
4670
4671    # Try to remove the string !BASH! from our list.
4672    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4673    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4674      # If it failed, the variable was not from the command line. Ignore it,
4675      # but warn the user (except for BASH, which is always set by the calling BASH).
4676      if test "xBASH" != xBASH; then
4677        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4678$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4679      fi
4680      # Try to locate tool using the code snippet
4681      for ac_prog in bash
4682do
4683  # Extract the first word of "$ac_prog", so it can be a program name with args.
4684set dummy $ac_prog; ac_word=$2
4685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4686$as_echo_n "checking for $ac_word... " >&6; }
4687if ${ac_cv_path_BASH+:} false; then :
4688  $as_echo_n "(cached) " >&6
4689else
4690  case $BASH in
4691  [\\/]* | ?:[\\/]*)
4692  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4693  ;;
4694  *)
4695  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4696for as_dir in $PATH
4697do
4698  IFS=$as_save_IFS
4699  test -z "$as_dir" && as_dir=.
4700    for ac_exec_ext in '' $ac_executable_extensions; do
4701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4702    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4704    break 2
4705  fi
4706done
4707  done
4708IFS=$as_save_IFS
4709
4710  ;;
4711esac
4712fi
4713BASH=$ac_cv_path_BASH
4714if test -n "$BASH"; then
4715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4716$as_echo "$BASH" >&6; }
4717else
4718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4719$as_echo "no" >&6; }
4720fi
4721
4722
4723  test -n "$BASH" && break
4724done
4725
4726    else
4727      # If it succeeded, then it was overridden by the user. We will use it
4728      # for the tool.
4729
4730      # First remove it from the list of overridden variables, so we can test
4731      # for unknown variables in the end.
4732      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4733
4734      # Check if the provided tool contains a complete path.
4735      tool_specified="$BASH"
4736      tool_basename="${tool_specified##*/}"
4737      if test "x$tool_basename" = "x$tool_specified"; then
4738        # A command without a complete path is provided, search $PATH.
4739        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4740$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4741        # Extract the first word of "$tool_basename", so it can be a program name with args.
4742set dummy $tool_basename; ac_word=$2
4743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4744$as_echo_n "checking for $ac_word... " >&6; }
4745if ${ac_cv_path_BASH+:} false; then :
4746  $as_echo_n "(cached) " >&6
4747else
4748  case $BASH in
4749  [\\/]* | ?:[\\/]*)
4750  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4751  ;;
4752  *)
4753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4754for as_dir in $PATH
4755do
4756  IFS=$as_save_IFS
4757  test -z "$as_dir" && as_dir=.
4758    for ac_exec_ext in '' $ac_executable_extensions; do
4759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4760    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4762    break 2
4763  fi
4764done
4765  done
4766IFS=$as_save_IFS
4767
4768  ;;
4769esac
4770fi
4771BASH=$ac_cv_path_BASH
4772if test -n "$BASH"; then
4773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4774$as_echo "$BASH" >&6; }
4775else
4776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4777$as_echo "no" >&6; }
4778fi
4779
4780
4781        if test "x$BASH" = x; then
4782          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4783        fi
4784      else
4785        # Otherwise we believe it is a complete path. Use it as it is.
4786        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4787$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4789$as_echo_n "checking for BASH... " >&6; }
4790        if test ! -x "$tool_specified"; then
4791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4792$as_echo "not found" >&6; }
4793          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4794        fi
4795        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4796$as_echo "$tool_specified" >&6; }
4797      fi
4798    fi
4799  fi
4800
4801
4802
4803  if test "x$BASH" = x; then
4804    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4805  fi
4806
4807
4808
4809
4810
4811  # Publish this variable in the help.
4812
4813
4814  if test "x$CAT" = x; then
4815    # The variable is not set by user, try to locate tool using the code snippet
4816    for ac_prog in cat
4817do
4818  # Extract the first word of "$ac_prog", so it can be a program name with args.
4819set dummy $ac_prog; ac_word=$2
4820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4821$as_echo_n "checking for $ac_word... " >&6; }
4822if ${ac_cv_path_CAT+:} false; then :
4823  $as_echo_n "(cached) " >&6
4824else
4825  case $CAT in
4826  [\\/]* | ?:[\\/]*)
4827  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4828  ;;
4829  *)
4830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4831for as_dir in $PATH
4832do
4833  IFS=$as_save_IFS
4834  test -z "$as_dir" && as_dir=.
4835    for ac_exec_ext in '' $ac_executable_extensions; do
4836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4837    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4839    break 2
4840  fi
4841done
4842  done
4843IFS=$as_save_IFS
4844
4845  ;;
4846esac
4847fi
4848CAT=$ac_cv_path_CAT
4849if test -n "$CAT"; then
4850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4851$as_echo "$CAT" >&6; }
4852else
4853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4854$as_echo "no" >&6; }
4855fi
4856
4857
4858  test -n "$CAT" && break
4859done
4860
4861  else
4862    # The variable is set, but is it from the command line or the environment?
4863
4864    # Try to remove the string !CAT! from our list.
4865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4867      # If it failed, the variable was not from the command line. Ignore it,
4868      # but warn the user (except for BASH, which is always set by the calling BASH).
4869      if test "xCAT" != xBASH; then
4870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4871$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4872      fi
4873      # Try to locate tool using the code snippet
4874      for ac_prog in cat
4875do
4876  # Extract the first word of "$ac_prog", so it can be a program name with args.
4877set dummy $ac_prog; ac_word=$2
4878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4879$as_echo_n "checking for $ac_word... " >&6; }
4880if ${ac_cv_path_CAT+:} false; then :
4881  $as_echo_n "(cached) " >&6
4882else
4883  case $CAT in
4884  [\\/]* | ?:[\\/]*)
4885  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4886  ;;
4887  *)
4888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4889for as_dir in $PATH
4890do
4891  IFS=$as_save_IFS
4892  test -z "$as_dir" && as_dir=.
4893    for ac_exec_ext in '' $ac_executable_extensions; do
4894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4895    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4897    break 2
4898  fi
4899done
4900  done
4901IFS=$as_save_IFS
4902
4903  ;;
4904esac
4905fi
4906CAT=$ac_cv_path_CAT
4907if test -n "$CAT"; then
4908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4909$as_echo "$CAT" >&6; }
4910else
4911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4912$as_echo "no" >&6; }
4913fi
4914
4915
4916  test -n "$CAT" && break
4917done
4918
4919    else
4920      # If it succeeded, then it was overridden by the user. We will use it
4921      # for the tool.
4922
4923      # First remove it from the list of overridden variables, so we can test
4924      # for unknown variables in the end.
4925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4926
4927      # Check if the provided tool contains a complete path.
4928      tool_specified="$CAT"
4929      tool_basename="${tool_specified##*/}"
4930      if test "x$tool_basename" = "x$tool_specified"; then
4931        # A command without a complete path is provided, search $PATH.
4932        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4933$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4934        # Extract the first word of "$tool_basename", so it can be a program name with args.
4935set dummy $tool_basename; ac_word=$2
4936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4937$as_echo_n "checking for $ac_word... " >&6; }
4938if ${ac_cv_path_CAT+:} false; then :
4939  $as_echo_n "(cached) " >&6
4940else
4941  case $CAT in
4942  [\\/]* | ?:[\\/]*)
4943  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4944  ;;
4945  *)
4946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4947for as_dir in $PATH
4948do
4949  IFS=$as_save_IFS
4950  test -z "$as_dir" && as_dir=.
4951    for ac_exec_ext in '' $ac_executable_extensions; do
4952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4953    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4955    break 2
4956  fi
4957done
4958  done
4959IFS=$as_save_IFS
4960
4961  ;;
4962esac
4963fi
4964CAT=$ac_cv_path_CAT
4965if test -n "$CAT"; then
4966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4967$as_echo "$CAT" >&6; }
4968else
4969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4970$as_echo "no" >&6; }
4971fi
4972
4973
4974        if test "x$CAT" = x; then
4975          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4976        fi
4977      else
4978        # Otherwise we believe it is a complete path. Use it as it is.
4979        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4980$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4981        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4982$as_echo_n "checking for CAT... " >&6; }
4983        if test ! -x "$tool_specified"; then
4984          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4985$as_echo "not found" >&6; }
4986          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4987        fi
4988        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4989$as_echo "$tool_specified" >&6; }
4990      fi
4991    fi
4992  fi
4993
4994
4995
4996  if test "x$CAT" = x; then
4997    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4998  fi
4999
5000
5001
5002
5003
5004  # Publish this variable in the help.
5005
5006
5007  if test "x$CHMOD" = x; then
5008    # The variable is not set by user, try to locate tool using the code snippet
5009    for ac_prog in chmod
5010do
5011  # Extract the first word of "$ac_prog", so it can be a program name with args.
5012set dummy $ac_prog; ac_word=$2
5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5014$as_echo_n "checking for $ac_word... " >&6; }
5015if ${ac_cv_path_CHMOD+:} false; then :
5016  $as_echo_n "(cached) " >&6
5017else
5018  case $CHMOD in
5019  [\\/]* | ?:[\\/]*)
5020  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5021  ;;
5022  *)
5023  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5024for as_dir in $PATH
5025do
5026  IFS=$as_save_IFS
5027  test -z "$as_dir" && as_dir=.
5028    for ac_exec_ext in '' $ac_executable_extensions; do
5029  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5030    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5031    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5032    break 2
5033  fi
5034done
5035  done
5036IFS=$as_save_IFS
5037
5038  ;;
5039esac
5040fi
5041CHMOD=$ac_cv_path_CHMOD
5042if test -n "$CHMOD"; then
5043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5044$as_echo "$CHMOD" >&6; }
5045else
5046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5047$as_echo "no" >&6; }
5048fi
5049
5050
5051  test -n "$CHMOD" && break
5052done
5053
5054  else
5055    # The variable is set, but is it from the command line or the environment?
5056
5057    # Try to remove the string !CHMOD! from our list.
5058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5060      # If it failed, the variable was not from the command line. Ignore it,
5061      # but warn the user (except for BASH, which is always set by the calling BASH).
5062      if test "xCHMOD" != xBASH; then
5063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5064$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5065      fi
5066      # Try to locate tool using the code snippet
5067      for ac_prog in chmod
5068do
5069  # Extract the first word of "$ac_prog", so it can be a program name with args.
5070set dummy $ac_prog; ac_word=$2
5071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5072$as_echo_n "checking for $ac_word... " >&6; }
5073if ${ac_cv_path_CHMOD+:} false; then :
5074  $as_echo_n "(cached) " >&6
5075else
5076  case $CHMOD in
5077  [\\/]* | ?:[\\/]*)
5078  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5079  ;;
5080  *)
5081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5082for as_dir in $PATH
5083do
5084  IFS=$as_save_IFS
5085  test -z "$as_dir" && as_dir=.
5086    for ac_exec_ext in '' $ac_executable_extensions; do
5087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5088    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5090    break 2
5091  fi
5092done
5093  done
5094IFS=$as_save_IFS
5095
5096  ;;
5097esac
5098fi
5099CHMOD=$ac_cv_path_CHMOD
5100if test -n "$CHMOD"; then
5101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5102$as_echo "$CHMOD" >&6; }
5103else
5104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5105$as_echo "no" >&6; }
5106fi
5107
5108
5109  test -n "$CHMOD" && break
5110done
5111
5112    else
5113      # If it succeeded, then it was overridden by the user. We will use it
5114      # for the tool.
5115
5116      # First remove it from the list of overridden variables, so we can test
5117      # for unknown variables in the end.
5118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5119
5120      # Check if the provided tool contains a complete path.
5121      tool_specified="$CHMOD"
5122      tool_basename="${tool_specified##*/}"
5123      if test "x$tool_basename" = "x$tool_specified"; then
5124        # A command without a complete path is provided, search $PATH.
5125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5126$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5127        # Extract the first word of "$tool_basename", so it can be a program name with args.
5128set dummy $tool_basename; ac_word=$2
5129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5130$as_echo_n "checking for $ac_word... " >&6; }
5131if ${ac_cv_path_CHMOD+:} false; then :
5132  $as_echo_n "(cached) " >&6
5133else
5134  case $CHMOD in
5135  [\\/]* | ?:[\\/]*)
5136  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5137  ;;
5138  *)
5139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5140for as_dir in $PATH
5141do
5142  IFS=$as_save_IFS
5143  test -z "$as_dir" && as_dir=.
5144    for ac_exec_ext in '' $ac_executable_extensions; do
5145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5146    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5148    break 2
5149  fi
5150done
5151  done
5152IFS=$as_save_IFS
5153
5154  ;;
5155esac
5156fi
5157CHMOD=$ac_cv_path_CHMOD
5158if test -n "$CHMOD"; then
5159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5160$as_echo "$CHMOD" >&6; }
5161else
5162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5163$as_echo "no" >&6; }
5164fi
5165
5166
5167        if test "x$CHMOD" = x; then
5168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5169        fi
5170      else
5171        # Otherwise we believe it is a complete path. Use it as it is.
5172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5173$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5175$as_echo_n "checking for CHMOD... " >&6; }
5176        if test ! -x "$tool_specified"; then
5177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5178$as_echo "not found" >&6; }
5179          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5180        fi
5181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5182$as_echo "$tool_specified" >&6; }
5183      fi
5184    fi
5185  fi
5186
5187
5188
5189  if test "x$CHMOD" = x; then
5190    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5191  fi
5192
5193
5194
5195
5196
5197  # Publish this variable in the help.
5198
5199
5200  if test "x$CMP" = x; then
5201    # The variable is not set by user, try to locate tool using the code snippet
5202    for ac_prog in cmp
5203do
5204  # Extract the first word of "$ac_prog", so it can be a program name with args.
5205set dummy $ac_prog; ac_word=$2
5206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5207$as_echo_n "checking for $ac_word... " >&6; }
5208if ${ac_cv_path_CMP+:} false; then :
5209  $as_echo_n "(cached) " >&6
5210else
5211  case $CMP in
5212  [\\/]* | ?:[\\/]*)
5213  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5214  ;;
5215  *)
5216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5217for as_dir in $PATH
5218do
5219  IFS=$as_save_IFS
5220  test -z "$as_dir" && as_dir=.
5221    for ac_exec_ext in '' $ac_executable_extensions; do
5222  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5223    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5224    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5225    break 2
5226  fi
5227done
5228  done
5229IFS=$as_save_IFS
5230
5231  ;;
5232esac
5233fi
5234CMP=$ac_cv_path_CMP
5235if test -n "$CMP"; then
5236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5237$as_echo "$CMP" >&6; }
5238else
5239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5240$as_echo "no" >&6; }
5241fi
5242
5243
5244  test -n "$CMP" && break
5245done
5246
5247  else
5248    # The variable is set, but is it from the command line or the environment?
5249
5250    # Try to remove the string !CMP! from our list.
5251    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5252    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5253      # If it failed, the variable was not from the command line. Ignore it,
5254      # but warn the user (except for BASH, which is always set by the calling BASH).
5255      if test "xCMP" != xBASH; then
5256        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5257$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5258      fi
5259      # Try to locate tool using the code snippet
5260      for ac_prog in cmp
5261do
5262  # Extract the first word of "$ac_prog", so it can be a program name with args.
5263set dummy $ac_prog; ac_word=$2
5264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5265$as_echo_n "checking for $ac_word... " >&6; }
5266if ${ac_cv_path_CMP+:} false; then :
5267  $as_echo_n "(cached) " >&6
5268else
5269  case $CMP in
5270  [\\/]* | ?:[\\/]*)
5271  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5272  ;;
5273  *)
5274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5275for as_dir in $PATH
5276do
5277  IFS=$as_save_IFS
5278  test -z "$as_dir" && as_dir=.
5279    for ac_exec_ext in '' $ac_executable_extensions; do
5280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5281    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5283    break 2
5284  fi
5285done
5286  done
5287IFS=$as_save_IFS
5288
5289  ;;
5290esac
5291fi
5292CMP=$ac_cv_path_CMP
5293if test -n "$CMP"; then
5294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5295$as_echo "$CMP" >&6; }
5296else
5297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5298$as_echo "no" >&6; }
5299fi
5300
5301
5302  test -n "$CMP" && break
5303done
5304
5305    else
5306      # If it succeeded, then it was overridden by the user. We will use it
5307      # for the tool.
5308
5309      # First remove it from the list of overridden variables, so we can test
5310      # for unknown variables in the end.
5311      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5312
5313      # Check if the provided tool contains a complete path.
5314      tool_specified="$CMP"
5315      tool_basename="${tool_specified##*/}"
5316      if test "x$tool_basename" = "x$tool_specified"; then
5317        # A command without a complete path is provided, search $PATH.
5318        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5319$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5320        # Extract the first word of "$tool_basename", so it can be a program name with args.
5321set dummy $tool_basename; ac_word=$2
5322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5323$as_echo_n "checking for $ac_word... " >&6; }
5324if ${ac_cv_path_CMP+:} false; then :
5325  $as_echo_n "(cached) " >&6
5326else
5327  case $CMP in
5328  [\\/]* | ?:[\\/]*)
5329  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5330  ;;
5331  *)
5332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5333for as_dir in $PATH
5334do
5335  IFS=$as_save_IFS
5336  test -z "$as_dir" && as_dir=.
5337    for ac_exec_ext in '' $ac_executable_extensions; do
5338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5339    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5341    break 2
5342  fi
5343done
5344  done
5345IFS=$as_save_IFS
5346
5347  ;;
5348esac
5349fi
5350CMP=$ac_cv_path_CMP
5351if test -n "$CMP"; then
5352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5353$as_echo "$CMP" >&6; }
5354else
5355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5356$as_echo "no" >&6; }
5357fi
5358
5359
5360        if test "x$CMP" = x; then
5361          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5362        fi
5363      else
5364        # Otherwise we believe it is a complete path. Use it as it is.
5365        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5366$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5367        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5368$as_echo_n "checking for CMP... " >&6; }
5369        if test ! -x "$tool_specified"; then
5370          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5371$as_echo "not found" >&6; }
5372          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5373        fi
5374        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5375$as_echo "$tool_specified" >&6; }
5376      fi
5377    fi
5378  fi
5379
5380
5381
5382  if test "x$CMP" = x; then
5383    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5384  fi
5385
5386
5387
5388
5389
5390  # Publish this variable in the help.
5391
5392
5393  if test "x$COMM" = x; then
5394    # The variable is not set by user, try to locate tool using the code snippet
5395    for ac_prog in comm
5396do
5397  # Extract the first word of "$ac_prog", so it can be a program name with args.
5398set dummy $ac_prog; ac_word=$2
5399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5400$as_echo_n "checking for $ac_word... " >&6; }
5401if ${ac_cv_path_COMM+:} false; then :
5402  $as_echo_n "(cached) " >&6
5403else
5404  case $COMM in
5405  [\\/]* | ?:[\\/]*)
5406  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5407  ;;
5408  *)
5409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5410for as_dir in $PATH
5411do
5412  IFS=$as_save_IFS
5413  test -z "$as_dir" && as_dir=.
5414    for ac_exec_ext in '' $ac_executable_extensions; do
5415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5416    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5418    break 2
5419  fi
5420done
5421  done
5422IFS=$as_save_IFS
5423
5424  ;;
5425esac
5426fi
5427COMM=$ac_cv_path_COMM
5428if test -n "$COMM"; then
5429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5430$as_echo "$COMM" >&6; }
5431else
5432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5433$as_echo "no" >&6; }
5434fi
5435
5436
5437  test -n "$COMM" && break
5438done
5439
5440  else
5441    # The variable is set, but is it from the command line or the environment?
5442
5443    # Try to remove the string !COMM! from our list.
5444    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5445    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5446      # If it failed, the variable was not from the command line. Ignore it,
5447      # but warn the user (except for BASH, which is always set by the calling BASH).
5448      if test "xCOMM" != xBASH; then
5449        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5450$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5451      fi
5452      # Try to locate tool using the code snippet
5453      for ac_prog in comm
5454do
5455  # Extract the first word of "$ac_prog", so it can be a program name with args.
5456set dummy $ac_prog; ac_word=$2
5457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5458$as_echo_n "checking for $ac_word... " >&6; }
5459if ${ac_cv_path_COMM+:} false; then :
5460  $as_echo_n "(cached) " >&6
5461else
5462  case $COMM in
5463  [\\/]* | ?:[\\/]*)
5464  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5465  ;;
5466  *)
5467  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5468for as_dir in $PATH
5469do
5470  IFS=$as_save_IFS
5471  test -z "$as_dir" && as_dir=.
5472    for ac_exec_ext in '' $ac_executable_extensions; do
5473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5474    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5476    break 2
5477  fi
5478done
5479  done
5480IFS=$as_save_IFS
5481
5482  ;;
5483esac
5484fi
5485COMM=$ac_cv_path_COMM
5486if test -n "$COMM"; then
5487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5488$as_echo "$COMM" >&6; }
5489else
5490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5491$as_echo "no" >&6; }
5492fi
5493
5494
5495  test -n "$COMM" && break
5496done
5497
5498    else
5499      # If it succeeded, then it was overridden by the user. We will use it
5500      # for the tool.
5501
5502      # First remove it from the list of overridden variables, so we can test
5503      # for unknown variables in the end.
5504      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5505
5506      # Check if the provided tool contains a complete path.
5507      tool_specified="$COMM"
5508      tool_basename="${tool_specified##*/}"
5509      if test "x$tool_basename" = "x$tool_specified"; then
5510        # A command without a complete path is provided, search $PATH.
5511        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5512$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5513        # Extract the first word of "$tool_basename", so it can be a program name with args.
5514set dummy $tool_basename; ac_word=$2
5515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5516$as_echo_n "checking for $ac_word... " >&6; }
5517if ${ac_cv_path_COMM+:} false; then :
5518  $as_echo_n "(cached) " >&6
5519else
5520  case $COMM in
5521  [\\/]* | ?:[\\/]*)
5522  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5523  ;;
5524  *)
5525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5526for as_dir in $PATH
5527do
5528  IFS=$as_save_IFS
5529  test -z "$as_dir" && as_dir=.
5530    for ac_exec_ext in '' $ac_executable_extensions; do
5531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5532    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5534    break 2
5535  fi
5536done
5537  done
5538IFS=$as_save_IFS
5539
5540  ;;
5541esac
5542fi
5543COMM=$ac_cv_path_COMM
5544if test -n "$COMM"; then
5545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5546$as_echo "$COMM" >&6; }
5547else
5548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5549$as_echo "no" >&6; }
5550fi
5551
5552
5553        if test "x$COMM" = x; then
5554          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5555        fi
5556      else
5557        # Otherwise we believe it is a complete path. Use it as it is.
5558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5559$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5560        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5561$as_echo_n "checking for COMM... " >&6; }
5562        if test ! -x "$tool_specified"; then
5563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5564$as_echo "not found" >&6; }
5565          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5566        fi
5567        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5568$as_echo "$tool_specified" >&6; }
5569      fi
5570    fi
5571  fi
5572
5573
5574
5575  if test "x$COMM" = x; then
5576    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5577  fi
5578
5579
5580
5581
5582
5583  # Publish this variable in the help.
5584
5585
5586  if test "x$CP" = x; then
5587    # The variable is not set by user, try to locate tool using the code snippet
5588    for ac_prog in cp
5589do
5590  # Extract the first word of "$ac_prog", so it can be a program name with args.
5591set dummy $ac_prog; ac_word=$2
5592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5593$as_echo_n "checking for $ac_word... " >&6; }
5594if ${ac_cv_path_CP+:} false; then :
5595  $as_echo_n "(cached) " >&6
5596else
5597  case $CP in
5598  [\\/]* | ?:[\\/]*)
5599  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5600  ;;
5601  *)
5602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5603for as_dir in $PATH
5604do
5605  IFS=$as_save_IFS
5606  test -z "$as_dir" && as_dir=.
5607    for ac_exec_ext in '' $ac_executable_extensions; do
5608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5609    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5611    break 2
5612  fi
5613done
5614  done
5615IFS=$as_save_IFS
5616
5617  ;;
5618esac
5619fi
5620CP=$ac_cv_path_CP
5621if test -n "$CP"; then
5622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5623$as_echo "$CP" >&6; }
5624else
5625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5626$as_echo "no" >&6; }
5627fi
5628
5629
5630  test -n "$CP" && break
5631done
5632
5633  else
5634    # The variable is set, but is it from the command line or the environment?
5635
5636    # Try to remove the string !CP! from our list.
5637    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5638    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5639      # If it failed, the variable was not from the command line. Ignore it,
5640      # but warn the user (except for BASH, which is always set by the calling BASH).
5641      if test "xCP" != xBASH; then
5642        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5643$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5644      fi
5645      # Try to locate tool using the code snippet
5646      for ac_prog in cp
5647do
5648  # Extract the first word of "$ac_prog", so it can be a program name with args.
5649set dummy $ac_prog; ac_word=$2
5650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5651$as_echo_n "checking for $ac_word... " >&6; }
5652if ${ac_cv_path_CP+:} false; then :
5653  $as_echo_n "(cached) " >&6
5654else
5655  case $CP in
5656  [\\/]* | ?:[\\/]*)
5657  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5658  ;;
5659  *)
5660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5661for as_dir in $PATH
5662do
5663  IFS=$as_save_IFS
5664  test -z "$as_dir" && as_dir=.
5665    for ac_exec_ext in '' $ac_executable_extensions; do
5666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5667    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5669    break 2
5670  fi
5671done
5672  done
5673IFS=$as_save_IFS
5674
5675  ;;
5676esac
5677fi
5678CP=$ac_cv_path_CP
5679if test -n "$CP"; then
5680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5681$as_echo "$CP" >&6; }
5682else
5683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684$as_echo "no" >&6; }
5685fi
5686
5687
5688  test -n "$CP" && break
5689done
5690
5691    else
5692      # If it succeeded, then it was overridden by the user. We will use it
5693      # for the tool.
5694
5695      # First remove it from the list of overridden variables, so we can test
5696      # for unknown variables in the end.
5697      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5698
5699      # Check if the provided tool contains a complete path.
5700      tool_specified="$CP"
5701      tool_basename="${tool_specified##*/}"
5702      if test "x$tool_basename" = "x$tool_specified"; then
5703        # A command without a complete path is provided, search $PATH.
5704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5705$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5706        # Extract the first word of "$tool_basename", so it can be a program name with args.
5707set dummy $tool_basename; ac_word=$2
5708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5709$as_echo_n "checking for $ac_word... " >&6; }
5710if ${ac_cv_path_CP+:} false; then :
5711  $as_echo_n "(cached) " >&6
5712else
5713  case $CP in
5714  [\\/]* | ?:[\\/]*)
5715  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5716  ;;
5717  *)
5718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5719for as_dir in $PATH
5720do
5721  IFS=$as_save_IFS
5722  test -z "$as_dir" && as_dir=.
5723    for ac_exec_ext in '' $ac_executable_extensions; do
5724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5725    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5727    break 2
5728  fi
5729done
5730  done
5731IFS=$as_save_IFS
5732
5733  ;;
5734esac
5735fi
5736CP=$ac_cv_path_CP
5737if test -n "$CP"; then
5738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5739$as_echo "$CP" >&6; }
5740else
5741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742$as_echo "no" >&6; }
5743fi
5744
5745
5746        if test "x$CP" = x; then
5747          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5748        fi
5749      else
5750        # Otherwise we believe it is a complete path. Use it as it is.
5751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5752$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5753        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5754$as_echo_n "checking for CP... " >&6; }
5755        if test ! -x "$tool_specified"; then
5756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5757$as_echo "not found" >&6; }
5758          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5759        fi
5760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5761$as_echo "$tool_specified" >&6; }
5762      fi
5763    fi
5764  fi
5765
5766
5767
5768  if test "x$CP" = x; then
5769    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5770  fi
5771
5772
5773
5774
5775
5776  # Publish this variable in the help.
5777
5778
5779  if test "x$CUT" = x; then
5780    # The variable is not set by user, try to locate tool using the code snippet
5781    for ac_prog in cut
5782do
5783  # Extract the first word of "$ac_prog", so it can be a program name with args.
5784set dummy $ac_prog; ac_word=$2
5785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5786$as_echo_n "checking for $ac_word... " >&6; }
5787if ${ac_cv_path_CUT+:} false; then :
5788  $as_echo_n "(cached) " >&6
5789else
5790  case $CUT in
5791  [\\/]* | ?:[\\/]*)
5792  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5793  ;;
5794  *)
5795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5796for as_dir in $PATH
5797do
5798  IFS=$as_save_IFS
5799  test -z "$as_dir" && as_dir=.
5800    for ac_exec_ext in '' $ac_executable_extensions; do
5801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5802    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5804    break 2
5805  fi
5806done
5807  done
5808IFS=$as_save_IFS
5809
5810  ;;
5811esac
5812fi
5813CUT=$ac_cv_path_CUT
5814if test -n "$CUT"; then
5815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5816$as_echo "$CUT" >&6; }
5817else
5818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820fi
5821
5822
5823  test -n "$CUT" && break
5824done
5825
5826  else
5827    # The variable is set, but is it from the command line or the environment?
5828
5829    # Try to remove the string !CUT! from our list.
5830    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5831    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5832      # If it failed, the variable was not from the command line. Ignore it,
5833      # but warn the user (except for BASH, which is always set by the calling BASH).
5834      if test "xCUT" != xBASH; then
5835        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5836$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5837      fi
5838      # Try to locate tool using the code snippet
5839      for ac_prog in cut
5840do
5841  # Extract the first word of "$ac_prog", so it can be a program name with args.
5842set dummy $ac_prog; ac_word=$2
5843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5844$as_echo_n "checking for $ac_word... " >&6; }
5845if ${ac_cv_path_CUT+:} false; then :
5846  $as_echo_n "(cached) " >&6
5847else
5848  case $CUT in
5849  [\\/]* | ?:[\\/]*)
5850  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5851  ;;
5852  *)
5853  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5854for as_dir in $PATH
5855do
5856  IFS=$as_save_IFS
5857  test -z "$as_dir" && as_dir=.
5858    for ac_exec_ext in '' $ac_executable_extensions; do
5859  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5860    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5861    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5862    break 2
5863  fi
5864done
5865  done
5866IFS=$as_save_IFS
5867
5868  ;;
5869esac
5870fi
5871CUT=$ac_cv_path_CUT
5872if test -n "$CUT"; then
5873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5874$as_echo "$CUT" >&6; }
5875else
5876  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5877$as_echo "no" >&6; }
5878fi
5879
5880
5881  test -n "$CUT" && break
5882done
5883
5884    else
5885      # If it succeeded, then it was overridden by the user. We will use it
5886      # for the tool.
5887
5888      # First remove it from the list of overridden variables, so we can test
5889      # for unknown variables in the end.
5890      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5891
5892      # Check if the provided tool contains a complete path.
5893      tool_specified="$CUT"
5894      tool_basename="${tool_specified##*/}"
5895      if test "x$tool_basename" = "x$tool_specified"; then
5896        # A command without a complete path is provided, search $PATH.
5897        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5898$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5899        # Extract the first word of "$tool_basename", so it can be a program name with args.
5900set dummy $tool_basename; ac_word=$2
5901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5902$as_echo_n "checking for $ac_word... " >&6; }
5903if ${ac_cv_path_CUT+:} false; then :
5904  $as_echo_n "(cached) " >&6
5905else
5906  case $CUT in
5907  [\\/]* | ?:[\\/]*)
5908  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5909  ;;
5910  *)
5911  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5912for as_dir in $PATH
5913do
5914  IFS=$as_save_IFS
5915  test -z "$as_dir" && as_dir=.
5916    for ac_exec_ext in '' $ac_executable_extensions; do
5917  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5918    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5919    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5920    break 2
5921  fi
5922done
5923  done
5924IFS=$as_save_IFS
5925
5926  ;;
5927esac
5928fi
5929CUT=$ac_cv_path_CUT
5930if test -n "$CUT"; then
5931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5932$as_echo "$CUT" >&6; }
5933else
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5935$as_echo "no" >&6; }
5936fi
5937
5938
5939        if test "x$CUT" = x; then
5940          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5941        fi
5942      else
5943        # Otherwise we believe it is a complete path. Use it as it is.
5944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5945$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5947$as_echo_n "checking for CUT... " >&6; }
5948        if test ! -x "$tool_specified"; then
5949          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5950$as_echo "not found" >&6; }
5951          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5952        fi
5953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5954$as_echo "$tool_specified" >&6; }
5955      fi
5956    fi
5957  fi
5958
5959
5960
5961  if test "x$CUT" = x; then
5962    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5963  fi
5964
5965
5966
5967
5968
5969  # Publish this variable in the help.
5970
5971
5972  if test "x$DATE" = x; then
5973    # The variable is not set by user, try to locate tool using the code snippet
5974    for ac_prog in date
5975do
5976  # Extract the first word of "$ac_prog", so it can be a program name with args.
5977set dummy $ac_prog; ac_word=$2
5978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5979$as_echo_n "checking for $ac_word... " >&6; }
5980if ${ac_cv_path_DATE+:} false; then :
5981  $as_echo_n "(cached) " >&6
5982else
5983  case $DATE in
5984  [\\/]* | ?:[\\/]*)
5985  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5986  ;;
5987  *)
5988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5989for as_dir in $PATH
5990do
5991  IFS=$as_save_IFS
5992  test -z "$as_dir" && as_dir=.
5993    for ac_exec_ext in '' $ac_executable_extensions; do
5994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5995    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5997    break 2
5998  fi
5999done
6000  done
6001IFS=$as_save_IFS
6002
6003  ;;
6004esac
6005fi
6006DATE=$ac_cv_path_DATE
6007if test -n "$DATE"; then
6008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6009$as_echo "$DATE" >&6; }
6010else
6011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012$as_echo "no" >&6; }
6013fi
6014
6015
6016  test -n "$DATE" && break
6017done
6018
6019  else
6020    # The variable is set, but is it from the command line or the environment?
6021
6022    # Try to remove the string !DATE! from our list.
6023    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6024    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6025      # If it failed, the variable was not from the command line. Ignore it,
6026      # but warn the user (except for BASH, which is always set by the calling BASH).
6027      if test "xDATE" != xBASH; then
6028        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6029$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6030      fi
6031      # Try to locate tool using the code snippet
6032      for ac_prog in date
6033do
6034  # Extract the first word of "$ac_prog", so it can be a program name with args.
6035set dummy $ac_prog; ac_word=$2
6036{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6037$as_echo_n "checking for $ac_word... " >&6; }
6038if ${ac_cv_path_DATE+:} false; then :
6039  $as_echo_n "(cached) " >&6
6040else
6041  case $DATE in
6042  [\\/]* | ?:[\\/]*)
6043  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6044  ;;
6045  *)
6046  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6047for as_dir in $PATH
6048do
6049  IFS=$as_save_IFS
6050  test -z "$as_dir" && as_dir=.
6051    for ac_exec_ext in '' $ac_executable_extensions; do
6052  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6053    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6054    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6055    break 2
6056  fi
6057done
6058  done
6059IFS=$as_save_IFS
6060
6061  ;;
6062esac
6063fi
6064DATE=$ac_cv_path_DATE
6065if test -n "$DATE"; then
6066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6067$as_echo "$DATE" >&6; }
6068else
6069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6070$as_echo "no" >&6; }
6071fi
6072
6073
6074  test -n "$DATE" && break
6075done
6076
6077    else
6078      # If it succeeded, then it was overridden by the user. We will use it
6079      # for the tool.
6080
6081      # First remove it from the list of overridden variables, so we can test
6082      # for unknown variables in the end.
6083      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6084
6085      # Check if the provided tool contains a complete path.
6086      tool_specified="$DATE"
6087      tool_basename="${tool_specified##*/}"
6088      if test "x$tool_basename" = "x$tool_specified"; then
6089        # A command without a complete path is provided, search $PATH.
6090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6091$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6092        # Extract the first word of "$tool_basename", so it can be a program name with args.
6093set dummy $tool_basename; ac_word=$2
6094{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6095$as_echo_n "checking for $ac_word... " >&6; }
6096if ${ac_cv_path_DATE+:} false; then :
6097  $as_echo_n "(cached) " >&6
6098else
6099  case $DATE in
6100  [\\/]* | ?:[\\/]*)
6101  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6102  ;;
6103  *)
6104  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6105for as_dir in $PATH
6106do
6107  IFS=$as_save_IFS
6108  test -z "$as_dir" && as_dir=.
6109    for ac_exec_ext in '' $ac_executable_extensions; do
6110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6111    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6113    break 2
6114  fi
6115done
6116  done
6117IFS=$as_save_IFS
6118
6119  ;;
6120esac
6121fi
6122DATE=$ac_cv_path_DATE
6123if test -n "$DATE"; then
6124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6125$as_echo "$DATE" >&6; }
6126else
6127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6128$as_echo "no" >&6; }
6129fi
6130
6131
6132        if test "x$DATE" = x; then
6133          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6134        fi
6135      else
6136        # Otherwise we believe it is a complete path. Use it as it is.
6137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6138$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6139        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6140$as_echo_n "checking for DATE... " >&6; }
6141        if test ! -x "$tool_specified"; then
6142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6143$as_echo "not found" >&6; }
6144          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6145        fi
6146        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6147$as_echo "$tool_specified" >&6; }
6148      fi
6149    fi
6150  fi
6151
6152
6153
6154  if test "x$DATE" = x; then
6155    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6156  fi
6157
6158
6159
6160
6161
6162  # Publish this variable in the help.
6163
6164
6165  if test "x$DIFF" = x; then
6166    # The variable is not set by user, try to locate tool using the code snippet
6167    for ac_prog in gdiff diff
6168do
6169  # Extract the first word of "$ac_prog", so it can be a program name with args.
6170set dummy $ac_prog; ac_word=$2
6171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6172$as_echo_n "checking for $ac_word... " >&6; }
6173if ${ac_cv_path_DIFF+:} false; then :
6174  $as_echo_n "(cached) " >&6
6175else
6176  case $DIFF in
6177  [\\/]* | ?:[\\/]*)
6178  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6179  ;;
6180  *)
6181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6182for as_dir in $PATH
6183do
6184  IFS=$as_save_IFS
6185  test -z "$as_dir" && as_dir=.
6186    for ac_exec_ext in '' $ac_executable_extensions; do
6187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6188    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6190    break 2
6191  fi
6192done
6193  done
6194IFS=$as_save_IFS
6195
6196  ;;
6197esac
6198fi
6199DIFF=$ac_cv_path_DIFF
6200if test -n "$DIFF"; then
6201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6202$as_echo "$DIFF" >&6; }
6203else
6204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6205$as_echo "no" >&6; }
6206fi
6207
6208
6209  test -n "$DIFF" && break
6210done
6211
6212  else
6213    # The variable is set, but is it from the command line or the environment?
6214
6215    # Try to remove the string !DIFF! from our list.
6216    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6217    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6218      # If it failed, the variable was not from the command line. Ignore it,
6219      # but warn the user (except for BASH, which is always set by the calling BASH).
6220      if test "xDIFF" != xBASH; then
6221        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6222$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6223      fi
6224      # Try to locate tool using the code snippet
6225      for ac_prog in gdiff diff
6226do
6227  # Extract the first word of "$ac_prog", so it can be a program name with args.
6228set dummy $ac_prog; ac_word=$2
6229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6230$as_echo_n "checking for $ac_word... " >&6; }
6231if ${ac_cv_path_DIFF+:} false; then :
6232  $as_echo_n "(cached) " >&6
6233else
6234  case $DIFF in
6235  [\\/]* | ?:[\\/]*)
6236  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6237  ;;
6238  *)
6239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6240for as_dir in $PATH
6241do
6242  IFS=$as_save_IFS
6243  test -z "$as_dir" && as_dir=.
6244    for ac_exec_ext in '' $ac_executable_extensions; do
6245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6246    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6248    break 2
6249  fi
6250done
6251  done
6252IFS=$as_save_IFS
6253
6254  ;;
6255esac
6256fi
6257DIFF=$ac_cv_path_DIFF
6258if test -n "$DIFF"; then
6259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6260$as_echo "$DIFF" >&6; }
6261else
6262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6263$as_echo "no" >&6; }
6264fi
6265
6266
6267  test -n "$DIFF" && break
6268done
6269
6270    else
6271      # If it succeeded, then it was overridden by the user. We will use it
6272      # for the tool.
6273
6274      # First remove it from the list of overridden variables, so we can test
6275      # for unknown variables in the end.
6276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6277
6278      # Check if the provided tool contains a complete path.
6279      tool_specified="$DIFF"
6280      tool_basename="${tool_specified##*/}"
6281      if test "x$tool_basename" = "x$tool_specified"; then
6282        # A command without a complete path is provided, search $PATH.
6283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6284$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6285        # Extract the first word of "$tool_basename", so it can be a program name with args.
6286set dummy $tool_basename; ac_word=$2
6287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6288$as_echo_n "checking for $ac_word... " >&6; }
6289if ${ac_cv_path_DIFF+:} false; then :
6290  $as_echo_n "(cached) " >&6
6291else
6292  case $DIFF in
6293  [\\/]* | ?:[\\/]*)
6294  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6295  ;;
6296  *)
6297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6298for as_dir in $PATH
6299do
6300  IFS=$as_save_IFS
6301  test -z "$as_dir" && as_dir=.
6302    for ac_exec_ext in '' $ac_executable_extensions; do
6303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6304    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6306    break 2
6307  fi
6308done
6309  done
6310IFS=$as_save_IFS
6311
6312  ;;
6313esac
6314fi
6315DIFF=$ac_cv_path_DIFF
6316if test -n "$DIFF"; then
6317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6318$as_echo "$DIFF" >&6; }
6319else
6320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6321$as_echo "no" >&6; }
6322fi
6323
6324
6325        if test "x$DIFF" = x; then
6326          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6327        fi
6328      else
6329        # Otherwise we believe it is a complete path. Use it as it is.
6330        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6331$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6332        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6333$as_echo_n "checking for DIFF... " >&6; }
6334        if test ! -x "$tool_specified"; then
6335          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6336$as_echo "not found" >&6; }
6337          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6338        fi
6339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6340$as_echo "$tool_specified" >&6; }
6341      fi
6342    fi
6343  fi
6344
6345
6346
6347  if test "x$DIFF" = x; then
6348    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6349  fi
6350
6351
6352
6353
6354
6355  # Publish this variable in the help.
6356
6357
6358  if test "x$DIRNAME" = x; then
6359    # The variable is not set by user, try to locate tool using the code snippet
6360    for ac_prog in dirname
6361do
6362  # Extract the first word of "$ac_prog", so it can be a program name with args.
6363set dummy $ac_prog; ac_word=$2
6364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6365$as_echo_n "checking for $ac_word... " >&6; }
6366if ${ac_cv_path_DIRNAME+:} false; then :
6367  $as_echo_n "(cached) " >&6
6368else
6369  case $DIRNAME in
6370  [\\/]* | ?:[\\/]*)
6371  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6372  ;;
6373  *)
6374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6375for as_dir in $PATH
6376do
6377  IFS=$as_save_IFS
6378  test -z "$as_dir" && as_dir=.
6379    for ac_exec_ext in '' $ac_executable_extensions; do
6380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6381    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6383    break 2
6384  fi
6385done
6386  done
6387IFS=$as_save_IFS
6388
6389  ;;
6390esac
6391fi
6392DIRNAME=$ac_cv_path_DIRNAME
6393if test -n "$DIRNAME"; then
6394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6395$as_echo "$DIRNAME" >&6; }
6396else
6397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6398$as_echo "no" >&6; }
6399fi
6400
6401
6402  test -n "$DIRNAME" && break
6403done
6404
6405  else
6406    # The variable is set, but is it from the command line or the environment?
6407
6408    # Try to remove the string !DIRNAME! from our list.
6409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6411      # If it failed, the variable was not from the command line. Ignore it,
6412      # but warn the user (except for BASH, which is always set by the calling BASH).
6413      if test "xDIRNAME" != xBASH; then
6414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6415$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6416      fi
6417      # Try to locate tool using the code snippet
6418      for ac_prog in dirname
6419do
6420  # Extract the first word of "$ac_prog", so it can be a program name with args.
6421set dummy $ac_prog; ac_word=$2
6422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6423$as_echo_n "checking for $ac_word... " >&6; }
6424if ${ac_cv_path_DIRNAME+:} false; then :
6425  $as_echo_n "(cached) " >&6
6426else
6427  case $DIRNAME in
6428  [\\/]* | ?:[\\/]*)
6429  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6430  ;;
6431  *)
6432  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6433for as_dir in $PATH
6434do
6435  IFS=$as_save_IFS
6436  test -z "$as_dir" && as_dir=.
6437    for ac_exec_ext in '' $ac_executable_extensions; do
6438  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6439    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6440    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6441    break 2
6442  fi
6443done
6444  done
6445IFS=$as_save_IFS
6446
6447  ;;
6448esac
6449fi
6450DIRNAME=$ac_cv_path_DIRNAME
6451if test -n "$DIRNAME"; then
6452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6453$as_echo "$DIRNAME" >&6; }
6454else
6455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6456$as_echo "no" >&6; }
6457fi
6458
6459
6460  test -n "$DIRNAME" && break
6461done
6462
6463    else
6464      # If it succeeded, then it was overridden by the user. We will use it
6465      # for the tool.
6466
6467      # First remove it from the list of overridden variables, so we can test
6468      # for unknown variables in the end.
6469      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6470
6471      # Check if the provided tool contains a complete path.
6472      tool_specified="$DIRNAME"
6473      tool_basename="${tool_specified##*/}"
6474      if test "x$tool_basename" = "x$tool_specified"; then
6475        # A command without a complete path is provided, search $PATH.
6476        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6477$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6478        # Extract the first word of "$tool_basename", so it can be a program name with args.
6479set dummy $tool_basename; ac_word=$2
6480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6481$as_echo_n "checking for $ac_word... " >&6; }
6482if ${ac_cv_path_DIRNAME+:} false; then :
6483  $as_echo_n "(cached) " >&6
6484else
6485  case $DIRNAME in
6486  [\\/]* | ?:[\\/]*)
6487  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6488  ;;
6489  *)
6490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6491for as_dir in $PATH
6492do
6493  IFS=$as_save_IFS
6494  test -z "$as_dir" && as_dir=.
6495    for ac_exec_ext in '' $ac_executable_extensions; do
6496  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6497    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6498    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6499    break 2
6500  fi
6501done
6502  done
6503IFS=$as_save_IFS
6504
6505  ;;
6506esac
6507fi
6508DIRNAME=$ac_cv_path_DIRNAME
6509if test -n "$DIRNAME"; then
6510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6511$as_echo "$DIRNAME" >&6; }
6512else
6513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6514$as_echo "no" >&6; }
6515fi
6516
6517
6518        if test "x$DIRNAME" = x; then
6519          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6520        fi
6521      else
6522        # Otherwise we believe it is a complete path. Use it as it is.
6523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6524$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6526$as_echo_n "checking for DIRNAME... " >&6; }
6527        if test ! -x "$tool_specified"; then
6528          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6529$as_echo "not found" >&6; }
6530          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6531        fi
6532        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6533$as_echo "$tool_specified" >&6; }
6534      fi
6535    fi
6536  fi
6537
6538
6539
6540  if test "x$DIRNAME" = x; then
6541    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6542  fi
6543
6544
6545
6546
6547
6548  # Publish this variable in the help.
6549
6550
6551  if test "x$ECHO" = x; then
6552    # The variable is not set by user, try to locate tool using the code snippet
6553    for ac_prog in echo
6554do
6555  # Extract the first word of "$ac_prog", so it can be a program name with args.
6556set dummy $ac_prog; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_ECHO+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  case $ECHO in
6563  [\\/]* | ?:[\\/]*)
6564  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6565  ;;
6566  *)
6567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in $PATH
6569do
6570  IFS=$as_save_IFS
6571  test -z "$as_dir" && as_dir=.
6572    for ac_exec_ext in '' $ac_executable_extensions; do
6573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576    break 2
6577  fi
6578done
6579  done
6580IFS=$as_save_IFS
6581
6582  ;;
6583esac
6584fi
6585ECHO=$ac_cv_path_ECHO
6586if test -n "$ECHO"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6588$as_echo "$ECHO" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595  test -n "$ECHO" && break
6596done
6597
6598  else
6599    # The variable is set, but is it from the command line or the environment?
6600
6601    # Try to remove the string !ECHO! from our list.
6602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6604      # If it failed, the variable was not from the command line. Ignore it,
6605      # but warn the user (except for BASH, which is always set by the calling BASH).
6606      if test "xECHO" != xBASH; then
6607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6608$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6609      fi
6610      # Try to locate tool using the code snippet
6611      for ac_prog in echo
6612do
6613  # Extract the first word of "$ac_prog", so it can be a program name with args.
6614set dummy $ac_prog; ac_word=$2
6615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6616$as_echo_n "checking for $ac_word... " >&6; }
6617if ${ac_cv_path_ECHO+:} false; then :
6618  $as_echo_n "(cached) " >&6
6619else
6620  case $ECHO in
6621  [\\/]* | ?:[\\/]*)
6622  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6623  ;;
6624  *)
6625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6626for as_dir in $PATH
6627do
6628  IFS=$as_save_IFS
6629  test -z "$as_dir" && as_dir=.
6630    for ac_exec_ext in '' $ac_executable_extensions; do
6631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6632    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6634    break 2
6635  fi
6636done
6637  done
6638IFS=$as_save_IFS
6639
6640  ;;
6641esac
6642fi
6643ECHO=$ac_cv_path_ECHO
6644if test -n "$ECHO"; then
6645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6646$as_echo "$ECHO" >&6; }
6647else
6648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650fi
6651
6652
6653  test -n "$ECHO" && break
6654done
6655
6656    else
6657      # If it succeeded, then it was overridden by the user. We will use it
6658      # for the tool.
6659
6660      # First remove it from the list of overridden variables, so we can test
6661      # for unknown variables in the end.
6662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6663
6664      # Check if the provided tool contains a complete path.
6665      tool_specified="$ECHO"
6666      tool_basename="${tool_specified##*/}"
6667      if test "x$tool_basename" = "x$tool_specified"; then
6668        # A command without a complete path is provided, search $PATH.
6669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6670$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6671        # Extract the first word of "$tool_basename", so it can be a program name with args.
6672set dummy $tool_basename; ac_word=$2
6673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6674$as_echo_n "checking for $ac_word... " >&6; }
6675if ${ac_cv_path_ECHO+:} false; then :
6676  $as_echo_n "(cached) " >&6
6677else
6678  case $ECHO in
6679  [\\/]* | ?:[\\/]*)
6680  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6681  ;;
6682  *)
6683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6684for as_dir in $PATH
6685do
6686  IFS=$as_save_IFS
6687  test -z "$as_dir" && as_dir=.
6688    for ac_exec_ext in '' $ac_executable_extensions; do
6689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6690    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6692    break 2
6693  fi
6694done
6695  done
6696IFS=$as_save_IFS
6697
6698  ;;
6699esac
6700fi
6701ECHO=$ac_cv_path_ECHO
6702if test -n "$ECHO"; then
6703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6704$as_echo "$ECHO" >&6; }
6705else
6706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6707$as_echo "no" >&6; }
6708fi
6709
6710
6711        if test "x$ECHO" = x; then
6712          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6713        fi
6714      else
6715        # Otherwise we believe it is a complete path. Use it as it is.
6716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6717$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6718        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6719$as_echo_n "checking for ECHO... " >&6; }
6720        if test ! -x "$tool_specified"; then
6721          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6722$as_echo "not found" >&6; }
6723          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6724        fi
6725        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6726$as_echo "$tool_specified" >&6; }
6727      fi
6728    fi
6729  fi
6730
6731
6732
6733  if test "x$ECHO" = x; then
6734    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6735  fi
6736
6737
6738
6739
6740
6741  # Publish this variable in the help.
6742
6743
6744  if test "x$EXPR" = x; then
6745    # The variable is not set by user, try to locate tool using the code snippet
6746    for ac_prog in expr
6747do
6748  # Extract the first word of "$ac_prog", so it can be a program name with args.
6749set dummy $ac_prog; ac_word=$2
6750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6751$as_echo_n "checking for $ac_word... " >&6; }
6752if ${ac_cv_path_EXPR+:} false; then :
6753  $as_echo_n "(cached) " >&6
6754else
6755  case $EXPR in
6756  [\\/]* | ?:[\\/]*)
6757  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6758  ;;
6759  *)
6760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6761for as_dir in $PATH
6762do
6763  IFS=$as_save_IFS
6764  test -z "$as_dir" && as_dir=.
6765    for ac_exec_ext in '' $ac_executable_extensions; do
6766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6767    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6769    break 2
6770  fi
6771done
6772  done
6773IFS=$as_save_IFS
6774
6775  ;;
6776esac
6777fi
6778EXPR=$ac_cv_path_EXPR
6779if test -n "$EXPR"; then
6780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6781$as_echo "$EXPR" >&6; }
6782else
6783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6784$as_echo "no" >&6; }
6785fi
6786
6787
6788  test -n "$EXPR" && break
6789done
6790
6791  else
6792    # The variable is set, but is it from the command line or the environment?
6793
6794    # Try to remove the string !EXPR! from our list.
6795    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6796    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6797      # If it failed, the variable was not from the command line. Ignore it,
6798      # but warn the user (except for BASH, which is always set by the calling BASH).
6799      if test "xEXPR" != xBASH; then
6800        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6801$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6802      fi
6803      # Try to locate tool using the code snippet
6804      for ac_prog in expr
6805do
6806  # Extract the first word of "$ac_prog", so it can be a program name with args.
6807set dummy $ac_prog; ac_word=$2
6808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6809$as_echo_n "checking for $ac_word... " >&6; }
6810if ${ac_cv_path_EXPR+:} false; then :
6811  $as_echo_n "(cached) " >&6
6812else
6813  case $EXPR in
6814  [\\/]* | ?:[\\/]*)
6815  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6816  ;;
6817  *)
6818  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6819for as_dir in $PATH
6820do
6821  IFS=$as_save_IFS
6822  test -z "$as_dir" && as_dir=.
6823    for ac_exec_ext in '' $ac_executable_extensions; do
6824  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6825    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6826    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6827    break 2
6828  fi
6829done
6830  done
6831IFS=$as_save_IFS
6832
6833  ;;
6834esac
6835fi
6836EXPR=$ac_cv_path_EXPR
6837if test -n "$EXPR"; then
6838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6839$as_echo "$EXPR" >&6; }
6840else
6841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6842$as_echo "no" >&6; }
6843fi
6844
6845
6846  test -n "$EXPR" && break
6847done
6848
6849    else
6850      # If it succeeded, then it was overridden by the user. We will use it
6851      # for the tool.
6852
6853      # First remove it from the list of overridden variables, so we can test
6854      # for unknown variables in the end.
6855      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6856
6857      # Check if the provided tool contains a complete path.
6858      tool_specified="$EXPR"
6859      tool_basename="${tool_specified##*/}"
6860      if test "x$tool_basename" = "x$tool_specified"; then
6861        # A command without a complete path is provided, search $PATH.
6862        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6863$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6864        # Extract the first word of "$tool_basename", so it can be a program name with args.
6865set dummy $tool_basename; ac_word=$2
6866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6867$as_echo_n "checking for $ac_word... " >&6; }
6868if ${ac_cv_path_EXPR+:} false; then :
6869  $as_echo_n "(cached) " >&6
6870else
6871  case $EXPR in
6872  [\\/]* | ?:[\\/]*)
6873  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6874  ;;
6875  *)
6876  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6877for as_dir in $PATH
6878do
6879  IFS=$as_save_IFS
6880  test -z "$as_dir" && as_dir=.
6881    for ac_exec_ext in '' $ac_executable_extensions; do
6882  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6883    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6884    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6885    break 2
6886  fi
6887done
6888  done
6889IFS=$as_save_IFS
6890
6891  ;;
6892esac
6893fi
6894EXPR=$ac_cv_path_EXPR
6895if test -n "$EXPR"; then
6896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6897$as_echo "$EXPR" >&6; }
6898else
6899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6900$as_echo "no" >&6; }
6901fi
6902
6903
6904        if test "x$EXPR" = x; then
6905          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6906        fi
6907      else
6908        # Otherwise we believe it is a complete path. Use it as it is.
6909        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6910$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6911        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6912$as_echo_n "checking for EXPR... " >&6; }
6913        if test ! -x "$tool_specified"; then
6914          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6915$as_echo "not found" >&6; }
6916          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6917        fi
6918        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6919$as_echo "$tool_specified" >&6; }
6920      fi
6921    fi
6922  fi
6923
6924
6925
6926  if test "x$EXPR" = x; then
6927    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6928  fi
6929
6930
6931
6932
6933
6934  # Publish this variable in the help.
6935
6936
6937  if test "x$FILE" = x; then
6938    # The variable is not set by user, try to locate tool using the code snippet
6939    for ac_prog in file
6940do
6941  # Extract the first word of "$ac_prog", so it can be a program name with args.
6942set dummy $ac_prog; ac_word=$2
6943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6944$as_echo_n "checking for $ac_word... " >&6; }
6945if ${ac_cv_path_FILE+:} false; then :
6946  $as_echo_n "(cached) " >&6
6947else
6948  case $FILE in
6949  [\\/]* | ?:[\\/]*)
6950  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6951  ;;
6952  *)
6953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6954for as_dir in $PATH
6955do
6956  IFS=$as_save_IFS
6957  test -z "$as_dir" && as_dir=.
6958    for ac_exec_ext in '' $ac_executable_extensions; do
6959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6960    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6962    break 2
6963  fi
6964done
6965  done
6966IFS=$as_save_IFS
6967
6968  ;;
6969esac
6970fi
6971FILE=$ac_cv_path_FILE
6972if test -n "$FILE"; then
6973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6974$as_echo "$FILE" >&6; }
6975else
6976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6977$as_echo "no" >&6; }
6978fi
6979
6980
6981  test -n "$FILE" && break
6982done
6983
6984  else
6985    # The variable is set, but is it from the command line or the environment?
6986
6987    # Try to remove the string !FILE! from our list.
6988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6990      # If it failed, the variable was not from the command line. Ignore it,
6991      # but warn the user (except for BASH, which is always set by the calling BASH).
6992      if test "xFILE" != xBASH; then
6993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6994$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6995      fi
6996      # Try to locate tool using the code snippet
6997      for ac_prog in file
6998do
6999  # Extract the first word of "$ac_prog", so it can be a program name with args.
7000set dummy $ac_prog; ac_word=$2
7001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7002$as_echo_n "checking for $ac_word... " >&6; }
7003if ${ac_cv_path_FILE+:} false; then :
7004  $as_echo_n "(cached) " >&6
7005else
7006  case $FILE in
7007  [\\/]* | ?:[\\/]*)
7008  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7009  ;;
7010  *)
7011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7012for as_dir in $PATH
7013do
7014  IFS=$as_save_IFS
7015  test -z "$as_dir" && as_dir=.
7016    for ac_exec_ext in '' $ac_executable_extensions; do
7017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7018    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7020    break 2
7021  fi
7022done
7023  done
7024IFS=$as_save_IFS
7025
7026  ;;
7027esac
7028fi
7029FILE=$ac_cv_path_FILE
7030if test -n "$FILE"; then
7031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7032$as_echo "$FILE" >&6; }
7033else
7034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7035$as_echo "no" >&6; }
7036fi
7037
7038
7039  test -n "$FILE" && break
7040done
7041
7042    else
7043      # If it succeeded, then it was overridden by the user. We will use it
7044      # for the tool.
7045
7046      # First remove it from the list of overridden variables, so we can test
7047      # for unknown variables in the end.
7048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7049
7050      # Check if the provided tool contains a complete path.
7051      tool_specified="$FILE"
7052      tool_basename="${tool_specified##*/}"
7053      if test "x$tool_basename" = "x$tool_specified"; then
7054        # A command without a complete path is provided, search $PATH.
7055        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7056$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7057        # Extract the first word of "$tool_basename", so it can be a program name with args.
7058set dummy $tool_basename; ac_word=$2
7059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7060$as_echo_n "checking for $ac_word... " >&6; }
7061if ${ac_cv_path_FILE+:} false; then :
7062  $as_echo_n "(cached) " >&6
7063else
7064  case $FILE in
7065  [\\/]* | ?:[\\/]*)
7066  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7067  ;;
7068  *)
7069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7070for as_dir in $PATH
7071do
7072  IFS=$as_save_IFS
7073  test -z "$as_dir" && as_dir=.
7074    for ac_exec_ext in '' $ac_executable_extensions; do
7075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7076    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7078    break 2
7079  fi
7080done
7081  done
7082IFS=$as_save_IFS
7083
7084  ;;
7085esac
7086fi
7087FILE=$ac_cv_path_FILE
7088if test -n "$FILE"; then
7089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7090$as_echo "$FILE" >&6; }
7091else
7092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7093$as_echo "no" >&6; }
7094fi
7095
7096
7097        if test "x$FILE" = x; then
7098          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7099        fi
7100      else
7101        # Otherwise we believe it is a complete path. Use it as it is.
7102        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7103$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7104        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7105$as_echo_n "checking for FILE... " >&6; }
7106        if test ! -x "$tool_specified"; then
7107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7108$as_echo "not found" >&6; }
7109          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7110        fi
7111        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7112$as_echo "$tool_specified" >&6; }
7113      fi
7114    fi
7115  fi
7116
7117
7118
7119  if test "x$FILE" = x; then
7120    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7121  fi
7122
7123
7124
7125
7126
7127  # Publish this variable in the help.
7128
7129
7130  if test "x$FIND" = x; then
7131    # The variable is not set by user, try to locate tool using the code snippet
7132    for ac_prog in find
7133do
7134  # Extract the first word of "$ac_prog", so it can be a program name with args.
7135set dummy $ac_prog; ac_word=$2
7136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7137$as_echo_n "checking for $ac_word... " >&6; }
7138if ${ac_cv_path_FIND+:} false; then :
7139  $as_echo_n "(cached) " >&6
7140else
7141  case $FIND in
7142  [\\/]* | ?:[\\/]*)
7143  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7144  ;;
7145  *)
7146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7147for as_dir in $PATH
7148do
7149  IFS=$as_save_IFS
7150  test -z "$as_dir" && as_dir=.
7151    for ac_exec_ext in '' $ac_executable_extensions; do
7152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7153    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7155    break 2
7156  fi
7157done
7158  done
7159IFS=$as_save_IFS
7160
7161  ;;
7162esac
7163fi
7164FIND=$ac_cv_path_FIND
7165if test -n "$FIND"; then
7166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7167$as_echo "$FIND" >&6; }
7168else
7169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7170$as_echo "no" >&6; }
7171fi
7172
7173
7174  test -n "$FIND" && break
7175done
7176
7177  else
7178    # The variable is set, but is it from the command line or the environment?
7179
7180    # Try to remove the string !FIND! from our list.
7181    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7182    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7183      # If it failed, the variable was not from the command line. Ignore it,
7184      # but warn the user (except for BASH, which is always set by the calling BASH).
7185      if test "xFIND" != xBASH; then
7186        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7187$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7188      fi
7189      # Try to locate tool using the code snippet
7190      for ac_prog in find
7191do
7192  # Extract the first word of "$ac_prog", so it can be a program name with args.
7193set dummy $ac_prog; ac_word=$2
7194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7195$as_echo_n "checking for $ac_word... " >&6; }
7196if ${ac_cv_path_FIND+:} false; then :
7197  $as_echo_n "(cached) " >&6
7198else
7199  case $FIND in
7200  [\\/]* | ?:[\\/]*)
7201  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7202  ;;
7203  *)
7204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7205for as_dir in $PATH
7206do
7207  IFS=$as_save_IFS
7208  test -z "$as_dir" && as_dir=.
7209    for ac_exec_ext in '' $ac_executable_extensions; do
7210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7211    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7213    break 2
7214  fi
7215done
7216  done
7217IFS=$as_save_IFS
7218
7219  ;;
7220esac
7221fi
7222FIND=$ac_cv_path_FIND
7223if test -n "$FIND"; then
7224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7225$as_echo "$FIND" >&6; }
7226else
7227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7228$as_echo "no" >&6; }
7229fi
7230
7231
7232  test -n "$FIND" && break
7233done
7234
7235    else
7236      # If it succeeded, then it was overridden by the user. We will use it
7237      # for the tool.
7238
7239      # First remove it from the list of overridden variables, so we can test
7240      # for unknown variables in the end.
7241      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7242
7243      # Check if the provided tool contains a complete path.
7244      tool_specified="$FIND"
7245      tool_basename="${tool_specified##*/}"
7246      if test "x$tool_basename" = "x$tool_specified"; then
7247        # A command without a complete path is provided, search $PATH.
7248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7249$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7250        # Extract the first word of "$tool_basename", so it can be a program name with args.
7251set dummy $tool_basename; ac_word=$2
7252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7253$as_echo_n "checking for $ac_word... " >&6; }
7254if ${ac_cv_path_FIND+:} false; then :
7255  $as_echo_n "(cached) " >&6
7256else
7257  case $FIND in
7258  [\\/]* | ?:[\\/]*)
7259  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7260  ;;
7261  *)
7262  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7263for as_dir in $PATH
7264do
7265  IFS=$as_save_IFS
7266  test -z "$as_dir" && as_dir=.
7267    for ac_exec_ext in '' $ac_executable_extensions; do
7268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7269    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7271    break 2
7272  fi
7273done
7274  done
7275IFS=$as_save_IFS
7276
7277  ;;
7278esac
7279fi
7280FIND=$ac_cv_path_FIND
7281if test -n "$FIND"; then
7282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7283$as_echo "$FIND" >&6; }
7284else
7285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7286$as_echo "no" >&6; }
7287fi
7288
7289
7290        if test "x$FIND" = x; then
7291          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7292        fi
7293      else
7294        # Otherwise we believe it is a complete path. Use it as it is.
7295        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7296$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7297        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7298$as_echo_n "checking for FIND... " >&6; }
7299        if test ! -x "$tool_specified"; then
7300          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7301$as_echo "not found" >&6; }
7302          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7303        fi
7304        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7305$as_echo "$tool_specified" >&6; }
7306      fi
7307    fi
7308  fi
7309
7310
7311
7312  if test "x$FIND" = x; then
7313    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7314  fi
7315
7316
7317
7318
7319
7320  # Publish this variable in the help.
7321
7322
7323  if test "x$HEAD" = x; then
7324    # The variable is not set by user, try to locate tool using the code snippet
7325    for ac_prog in head
7326do
7327  # Extract the first word of "$ac_prog", so it can be a program name with args.
7328set dummy $ac_prog; ac_word=$2
7329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7330$as_echo_n "checking for $ac_word... " >&6; }
7331if ${ac_cv_path_HEAD+:} false; then :
7332  $as_echo_n "(cached) " >&6
7333else
7334  case $HEAD in
7335  [\\/]* | ?:[\\/]*)
7336  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7337  ;;
7338  *)
7339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7340for as_dir in $PATH
7341do
7342  IFS=$as_save_IFS
7343  test -z "$as_dir" && as_dir=.
7344    for ac_exec_ext in '' $ac_executable_extensions; do
7345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7346    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7348    break 2
7349  fi
7350done
7351  done
7352IFS=$as_save_IFS
7353
7354  ;;
7355esac
7356fi
7357HEAD=$ac_cv_path_HEAD
7358if test -n "$HEAD"; then
7359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7360$as_echo "$HEAD" >&6; }
7361else
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7363$as_echo "no" >&6; }
7364fi
7365
7366
7367  test -n "$HEAD" && break
7368done
7369
7370  else
7371    # The variable is set, but is it from the command line or the environment?
7372
7373    # Try to remove the string !HEAD! from our list.
7374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7376      # If it failed, the variable was not from the command line. Ignore it,
7377      # but warn the user (except for BASH, which is always set by the calling BASH).
7378      if test "xHEAD" != xBASH; then
7379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7380$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7381      fi
7382      # Try to locate tool using the code snippet
7383      for ac_prog in head
7384do
7385  # Extract the first word of "$ac_prog", so it can be a program name with args.
7386set dummy $ac_prog; ac_word=$2
7387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7388$as_echo_n "checking for $ac_word... " >&6; }
7389if ${ac_cv_path_HEAD+:} false; then :
7390  $as_echo_n "(cached) " >&6
7391else
7392  case $HEAD in
7393  [\\/]* | ?:[\\/]*)
7394  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7395  ;;
7396  *)
7397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7398for as_dir in $PATH
7399do
7400  IFS=$as_save_IFS
7401  test -z "$as_dir" && as_dir=.
7402    for ac_exec_ext in '' $ac_executable_extensions; do
7403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7404    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7406    break 2
7407  fi
7408done
7409  done
7410IFS=$as_save_IFS
7411
7412  ;;
7413esac
7414fi
7415HEAD=$ac_cv_path_HEAD
7416if test -n "$HEAD"; then
7417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7418$as_echo "$HEAD" >&6; }
7419else
7420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7421$as_echo "no" >&6; }
7422fi
7423
7424
7425  test -n "$HEAD" && break
7426done
7427
7428    else
7429      # If it succeeded, then it was overridden by the user. We will use it
7430      # for the tool.
7431
7432      # First remove it from the list of overridden variables, so we can test
7433      # for unknown variables in the end.
7434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7435
7436      # Check if the provided tool contains a complete path.
7437      tool_specified="$HEAD"
7438      tool_basename="${tool_specified##*/}"
7439      if test "x$tool_basename" = "x$tool_specified"; then
7440        # A command without a complete path is provided, search $PATH.
7441        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7442$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7443        # Extract the first word of "$tool_basename", so it can be a program name with args.
7444set dummy $tool_basename; ac_word=$2
7445{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7446$as_echo_n "checking for $ac_word... " >&6; }
7447if ${ac_cv_path_HEAD+:} false; then :
7448  $as_echo_n "(cached) " >&6
7449else
7450  case $HEAD in
7451  [\\/]* | ?:[\\/]*)
7452  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7453  ;;
7454  *)
7455  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7456for as_dir in $PATH
7457do
7458  IFS=$as_save_IFS
7459  test -z "$as_dir" && as_dir=.
7460    for ac_exec_ext in '' $ac_executable_extensions; do
7461  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7462    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7463    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7464    break 2
7465  fi
7466done
7467  done
7468IFS=$as_save_IFS
7469
7470  ;;
7471esac
7472fi
7473HEAD=$ac_cv_path_HEAD
7474if test -n "$HEAD"; then
7475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7476$as_echo "$HEAD" >&6; }
7477else
7478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7479$as_echo "no" >&6; }
7480fi
7481
7482
7483        if test "x$HEAD" = x; then
7484          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7485        fi
7486      else
7487        # Otherwise we believe it is a complete path. Use it as it is.
7488        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7489$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7490        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7491$as_echo_n "checking for HEAD... " >&6; }
7492        if test ! -x "$tool_specified"; then
7493          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7494$as_echo "not found" >&6; }
7495          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7496        fi
7497        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7498$as_echo "$tool_specified" >&6; }
7499      fi
7500    fi
7501  fi
7502
7503
7504
7505  if test "x$HEAD" = x; then
7506    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7507  fi
7508
7509
7510
7511
7512
7513  # Publish this variable in the help.
7514
7515
7516  if test "x$LN" = x; then
7517    # The variable is not set by user, try to locate tool using the code snippet
7518    for ac_prog in ln
7519do
7520  # Extract the first word of "$ac_prog", so it can be a program name with args.
7521set dummy $ac_prog; ac_word=$2
7522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7523$as_echo_n "checking for $ac_word... " >&6; }
7524if ${ac_cv_path_LN+:} false; then :
7525  $as_echo_n "(cached) " >&6
7526else
7527  case $LN in
7528  [\\/]* | ?:[\\/]*)
7529  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7530  ;;
7531  *)
7532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7533for as_dir in $PATH
7534do
7535  IFS=$as_save_IFS
7536  test -z "$as_dir" && as_dir=.
7537    for ac_exec_ext in '' $ac_executable_extensions; do
7538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7539    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7541    break 2
7542  fi
7543done
7544  done
7545IFS=$as_save_IFS
7546
7547  ;;
7548esac
7549fi
7550LN=$ac_cv_path_LN
7551if test -n "$LN"; then
7552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7553$as_echo "$LN" >&6; }
7554else
7555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7556$as_echo "no" >&6; }
7557fi
7558
7559
7560  test -n "$LN" && break
7561done
7562
7563  else
7564    # The variable is set, but is it from the command line or the environment?
7565
7566    # Try to remove the string !LN! from our list.
7567    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7568    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7569      # If it failed, the variable was not from the command line. Ignore it,
7570      # but warn the user (except for BASH, which is always set by the calling BASH).
7571      if test "xLN" != xBASH; then
7572        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7573$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7574      fi
7575      # Try to locate tool using the code snippet
7576      for ac_prog in ln
7577do
7578  # Extract the first word of "$ac_prog", so it can be a program name with args.
7579set dummy $ac_prog; ac_word=$2
7580{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7581$as_echo_n "checking for $ac_word... " >&6; }
7582if ${ac_cv_path_LN+:} false; then :
7583  $as_echo_n "(cached) " >&6
7584else
7585  case $LN in
7586  [\\/]* | ?:[\\/]*)
7587  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7588  ;;
7589  *)
7590  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7591for as_dir in $PATH
7592do
7593  IFS=$as_save_IFS
7594  test -z "$as_dir" && as_dir=.
7595    for ac_exec_ext in '' $ac_executable_extensions; do
7596  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7597    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7598    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7599    break 2
7600  fi
7601done
7602  done
7603IFS=$as_save_IFS
7604
7605  ;;
7606esac
7607fi
7608LN=$ac_cv_path_LN
7609if test -n "$LN"; then
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7611$as_echo "$LN" >&6; }
7612else
7613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7614$as_echo "no" >&6; }
7615fi
7616
7617
7618  test -n "$LN" && break
7619done
7620
7621    else
7622      # If it succeeded, then it was overridden by the user. We will use it
7623      # for the tool.
7624
7625      # First remove it from the list of overridden variables, so we can test
7626      # for unknown variables in the end.
7627      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7628
7629      # Check if the provided tool contains a complete path.
7630      tool_specified="$LN"
7631      tool_basename="${tool_specified##*/}"
7632      if test "x$tool_basename" = "x$tool_specified"; then
7633        # A command without a complete path is provided, search $PATH.
7634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7635$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7636        # Extract the first word of "$tool_basename", so it can be a program name with args.
7637set dummy $tool_basename; ac_word=$2
7638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7639$as_echo_n "checking for $ac_word... " >&6; }
7640if ${ac_cv_path_LN+:} false; then :
7641  $as_echo_n "(cached) " >&6
7642else
7643  case $LN in
7644  [\\/]* | ?:[\\/]*)
7645  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7646  ;;
7647  *)
7648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7649for as_dir in $PATH
7650do
7651  IFS=$as_save_IFS
7652  test -z "$as_dir" && as_dir=.
7653    for ac_exec_ext in '' $ac_executable_extensions; do
7654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7655    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7657    break 2
7658  fi
7659done
7660  done
7661IFS=$as_save_IFS
7662
7663  ;;
7664esac
7665fi
7666LN=$ac_cv_path_LN
7667if test -n "$LN"; then
7668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7669$as_echo "$LN" >&6; }
7670else
7671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7672$as_echo "no" >&6; }
7673fi
7674
7675
7676        if test "x$LN" = x; then
7677          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7678        fi
7679      else
7680        # Otherwise we believe it is a complete path. Use it as it is.
7681        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7682$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7683        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7684$as_echo_n "checking for LN... " >&6; }
7685        if test ! -x "$tool_specified"; then
7686          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7687$as_echo "not found" >&6; }
7688          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7689        fi
7690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7691$as_echo "$tool_specified" >&6; }
7692      fi
7693    fi
7694  fi
7695
7696
7697
7698  if test "x$LN" = x; then
7699    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7700  fi
7701
7702
7703
7704
7705
7706  # Publish this variable in the help.
7707
7708
7709  if test "x$LS" = x; then
7710    # The variable is not set by user, try to locate tool using the code snippet
7711    for ac_prog in ls
7712do
7713  # Extract the first word of "$ac_prog", so it can be a program name with args.
7714set dummy $ac_prog; ac_word=$2
7715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7716$as_echo_n "checking for $ac_word... " >&6; }
7717if ${ac_cv_path_LS+:} false; then :
7718  $as_echo_n "(cached) " >&6
7719else
7720  case $LS in
7721  [\\/]* | ?:[\\/]*)
7722  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7723  ;;
7724  *)
7725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7726for as_dir in $PATH
7727do
7728  IFS=$as_save_IFS
7729  test -z "$as_dir" && as_dir=.
7730    for ac_exec_ext in '' $ac_executable_extensions; do
7731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7732    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7734    break 2
7735  fi
7736done
7737  done
7738IFS=$as_save_IFS
7739
7740  ;;
7741esac
7742fi
7743LS=$ac_cv_path_LS
7744if test -n "$LS"; then
7745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7746$as_echo "$LS" >&6; }
7747else
7748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7749$as_echo "no" >&6; }
7750fi
7751
7752
7753  test -n "$LS" && break
7754done
7755
7756  else
7757    # The variable is set, but is it from the command line or the environment?
7758
7759    # Try to remove the string !LS! from our list.
7760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7762      # If it failed, the variable was not from the command line. Ignore it,
7763      # but warn the user (except for BASH, which is always set by the calling BASH).
7764      if test "xLS" != xBASH; then
7765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7766$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7767      fi
7768      # Try to locate tool using the code snippet
7769      for ac_prog in ls
7770do
7771  # Extract the first word of "$ac_prog", so it can be a program name with args.
7772set dummy $ac_prog; ac_word=$2
7773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7774$as_echo_n "checking for $ac_word... " >&6; }
7775if ${ac_cv_path_LS+:} false; then :
7776  $as_echo_n "(cached) " >&6
7777else
7778  case $LS in
7779  [\\/]* | ?:[\\/]*)
7780  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7781  ;;
7782  *)
7783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7784for as_dir in $PATH
7785do
7786  IFS=$as_save_IFS
7787  test -z "$as_dir" && as_dir=.
7788    for ac_exec_ext in '' $ac_executable_extensions; do
7789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7790    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7792    break 2
7793  fi
7794done
7795  done
7796IFS=$as_save_IFS
7797
7798  ;;
7799esac
7800fi
7801LS=$ac_cv_path_LS
7802if test -n "$LS"; then
7803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7804$as_echo "$LS" >&6; }
7805else
7806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7807$as_echo "no" >&6; }
7808fi
7809
7810
7811  test -n "$LS" && break
7812done
7813
7814    else
7815      # If it succeeded, then it was overridden by the user. We will use it
7816      # for the tool.
7817
7818      # First remove it from the list of overridden variables, so we can test
7819      # for unknown variables in the end.
7820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7821
7822      # Check if the provided tool contains a complete path.
7823      tool_specified="$LS"
7824      tool_basename="${tool_specified##*/}"
7825      if test "x$tool_basename" = "x$tool_specified"; then
7826        # A command without a complete path is provided, search $PATH.
7827        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7828$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7829        # Extract the first word of "$tool_basename", so it can be a program name with args.
7830set dummy $tool_basename; ac_word=$2
7831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7832$as_echo_n "checking for $ac_word... " >&6; }
7833if ${ac_cv_path_LS+:} false; then :
7834  $as_echo_n "(cached) " >&6
7835else
7836  case $LS in
7837  [\\/]* | ?:[\\/]*)
7838  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7839  ;;
7840  *)
7841  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7842for as_dir in $PATH
7843do
7844  IFS=$as_save_IFS
7845  test -z "$as_dir" && as_dir=.
7846    for ac_exec_ext in '' $ac_executable_extensions; do
7847  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7848    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7849    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7850    break 2
7851  fi
7852done
7853  done
7854IFS=$as_save_IFS
7855
7856  ;;
7857esac
7858fi
7859LS=$ac_cv_path_LS
7860if test -n "$LS"; then
7861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7862$as_echo "$LS" >&6; }
7863else
7864  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7865$as_echo "no" >&6; }
7866fi
7867
7868
7869        if test "x$LS" = x; then
7870          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7871        fi
7872      else
7873        # Otherwise we believe it is a complete path. Use it as it is.
7874        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7875$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7877$as_echo_n "checking for LS... " >&6; }
7878        if test ! -x "$tool_specified"; then
7879          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7880$as_echo "not found" >&6; }
7881          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7882        fi
7883        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7884$as_echo "$tool_specified" >&6; }
7885      fi
7886    fi
7887  fi
7888
7889
7890
7891  if test "x$LS" = x; then
7892    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7893  fi
7894
7895
7896
7897
7898
7899  # Publish this variable in the help.
7900
7901
7902  if test "x$MKDIR" = x; then
7903    # The variable is not set by user, try to locate tool using the code snippet
7904    for ac_prog in mkdir
7905do
7906  # Extract the first word of "$ac_prog", so it can be a program name with args.
7907set dummy $ac_prog; ac_word=$2
7908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7909$as_echo_n "checking for $ac_word... " >&6; }
7910if ${ac_cv_path_MKDIR+:} false; then :
7911  $as_echo_n "(cached) " >&6
7912else
7913  case $MKDIR in
7914  [\\/]* | ?:[\\/]*)
7915  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7916  ;;
7917  *)
7918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7919for as_dir in $PATH
7920do
7921  IFS=$as_save_IFS
7922  test -z "$as_dir" && as_dir=.
7923    for ac_exec_ext in '' $ac_executable_extensions; do
7924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7925    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7927    break 2
7928  fi
7929done
7930  done
7931IFS=$as_save_IFS
7932
7933  ;;
7934esac
7935fi
7936MKDIR=$ac_cv_path_MKDIR
7937if test -n "$MKDIR"; then
7938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7939$as_echo "$MKDIR" >&6; }
7940else
7941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7942$as_echo "no" >&6; }
7943fi
7944
7945
7946  test -n "$MKDIR" && break
7947done
7948
7949  else
7950    # The variable is set, but is it from the command line or the environment?
7951
7952    # Try to remove the string !MKDIR! from our list.
7953    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7954    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7955      # If it failed, the variable was not from the command line. Ignore it,
7956      # but warn the user (except for BASH, which is always set by the calling BASH).
7957      if test "xMKDIR" != xBASH; then
7958        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7959$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7960      fi
7961      # Try to locate tool using the code snippet
7962      for ac_prog in mkdir
7963do
7964  # Extract the first word of "$ac_prog", so it can be a program name with args.
7965set dummy $ac_prog; ac_word=$2
7966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7967$as_echo_n "checking for $ac_word... " >&6; }
7968if ${ac_cv_path_MKDIR+:} false; then :
7969  $as_echo_n "(cached) " >&6
7970else
7971  case $MKDIR in
7972  [\\/]* | ?:[\\/]*)
7973  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7974  ;;
7975  *)
7976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7977for as_dir in $PATH
7978do
7979  IFS=$as_save_IFS
7980  test -z "$as_dir" && as_dir=.
7981    for ac_exec_ext in '' $ac_executable_extensions; do
7982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7983    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7985    break 2
7986  fi
7987done
7988  done
7989IFS=$as_save_IFS
7990
7991  ;;
7992esac
7993fi
7994MKDIR=$ac_cv_path_MKDIR
7995if test -n "$MKDIR"; then
7996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7997$as_echo "$MKDIR" >&6; }
7998else
7999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8000$as_echo "no" >&6; }
8001fi
8002
8003
8004  test -n "$MKDIR" && break
8005done
8006
8007    else
8008      # If it succeeded, then it was overridden by the user. We will use it
8009      # for the tool.
8010
8011      # First remove it from the list of overridden variables, so we can test
8012      # for unknown variables in the end.
8013      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8014
8015      # Check if the provided tool contains a complete path.
8016      tool_specified="$MKDIR"
8017      tool_basename="${tool_specified##*/}"
8018      if test "x$tool_basename" = "x$tool_specified"; then
8019        # A command without a complete path is provided, search $PATH.
8020        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8021$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8022        # Extract the first word of "$tool_basename", so it can be a program name with args.
8023set dummy $tool_basename; ac_word=$2
8024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8025$as_echo_n "checking for $ac_word... " >&6; }
8026if ${ac_cv_path_MKDIR+:} false; then :
8027  $as_echo_n "(cached) " >&6
8028else
8029  case $MKDIR in
8030  [\\/]* | ?:[\\/]*)
8031  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8032  ;;
8033  *)
8034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8035for as_dir in $PATH
8036do
8037  IFS=$as_save_IFS
8038  test -z "$as_dir" && as_dir=.
8039    for ac_exec_ext in '' $ac_executable_extensions; do
8040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8041    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8043    break 2
8044  fi
8045done
8046  done
8047IFS=$as_save_IFS
8048
8049  ;;
8050esac
8051fi
8052MKDIR=$ac_cv_path_MKDIR
8053if test -n "$MKDIR"; then
8054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8055$as_echo "$MKDIR" >&6; }
8056else
8057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8058$as_echo "no" >&6; }
8059fi
8060
8061
8062        if test "x$MKDIR" = x; then
8063          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8064        fi
8065      else
8066        # Otherwise we believe it is a complete path. Use it as it is.
8067        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8068$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8069        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8070$as_echo_n "checking for MKDIR... " >&6; }
8071        if test ! -x "$tool_specified"; then
8072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8073$as_echo "not found" >&6; }
8074          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8075        fi
8076        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8077$as_echo "$tool_specified" >&6; }
8078      fi
8079    fi
8080  fi
8081
8082
8083
8084  if test "x$MKDIR" = x; then
8085    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8086  fi
8087
8088
8089
8090
8091
8092  # Publish this variable in the help.
8093
8094
8095  if test "x$MKTEMP" = x; then
8096    # The variable is not set by user, try to locate tool using the code snippet
8097    for ac_prog in mktemp
8098do
8099  # Extract the first word of "$ac_prog", so it can be a program name with args.
8100set dummy $ac_prog; ac_word=$2
8101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8102$as_echo_n "checking for $ac_word... " >&6; }
8103if ${ac_cv_path_MKTEMP+:} false; then :
8104  $as_echo_n "(cached) " >&6
8105else
8106  case $MKTEMP in
8107  [\\/]* | ?:[\\/]*)
8108  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8109  ;;
8110  *)
8111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8112for as_dir in $PATH
8113do
8114  IFS=$as_save_IFS
8115  test -z "$as_dir" && as_dir=.
8116    for ac_exec_ext in '' $ac_executable_extensions; do
8117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8118    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8120    break 2
8121  fi
8122done
8123  done
8124IFS=$as_save_IFS
8125
8126  ;;
8127esac
8128fi
8129MKTEMP=$ac_cv_path_MKTEMP
8130if test -n "$MKTEMP"; then
8131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8132$as_echo "$MKTEMP" >&6; }
8133else
8134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8135$as_echo "no" >&6; }
8136fi
8137
8138
8139  test -n "$MKTEMP" && break
8140done
8141
8142  else
8143    # The variable is set, but is it from the command line or the environment?
8144
8145    # Try to remove the string !MKTEMP! from our list.
8146    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8147    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8148      # If it failed, the variable was not from the command line. Ignore it,
8149      # but warn the user (except for BASH, which is always set by the calling BASH).
8150      if test "xMKTEMP" != xBASH; then
8151        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8152$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8153      fi
8154      # Try to locate tool using the code snippet
8155      for ac_prog in mktemp
8156do
8157  # Extract the first word of "$ac_prog", so it can be a program name with args.
8158set dummy $ac_prog; ac_word=$2
8159{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8160$as_echo_n "checking for $ac_word... " >&6; }
8161if ${ac_cv_path_MKTEMP+:} false; then :
8162  $as_echo_n "(cached) " >&6
8163else
8164  case $MKTEMP in
8165  [\\/]* | ?:[\\/]*)
8166  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8167  ;;
8168  *)
8169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8170for as_dir in $PATH
8171do
8172  IFS=$as_save_IFS
8173  test -z "$as_dir" && as_dir=.
8174    for ac_exec_ext in '' $ac_executable_extensions; do
8175  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8176    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8177    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8178    break 2
8179  fi
8180done
8181  done
8182IFS=$as_save_IFS
8183
8184  ;;
8185esac
8186fi
8187MKTEMP=$ac_cv_path_MKTEMP
8188if test -n "$MKTEMP"; then
8189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8190$as_echo "$MKTEMP" >&6; }
8191else
8192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8193$as_echo "no" >&6; }
8194fi
8195
8196
8197  test -n "$MKTEMP" && break
8198done
8199
8200    else
8201      # If it succeeded, then it was overridden by the user. We will use it
8202      # for the tool.
8203
8204      # First remove it from the list of overridden variables, so we can test
8205      # for unknown variables in the end.
8206      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8207
8208      # Check if the provided tool contains a complete path.
8209      tool_specified="$MKTEMP"
8210      tool_basename="${tool_specified##*/}"
8211      if test "x$tool_basename" = "x$tool_specified"; then
8212        # A command without a complete path is provided, search $PATH.
8213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8214$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8215        # Extract the first word of "$tool_basename", so it can be a program name with args.
8216set dummy $tool_basename; ac_word=$2
8217{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8218$as_echo_n "checking for $ac_word... " >&6; }
8219if ${ac_cv_path_MKTEMP+:} false; then :
8220  $as_echo_n "(cached) " >&6
8221else
8222  case $MKTEMP in
8223  [\\/]* | ?:[\\/]*)
8224  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8225  ;;
8226  *)
8227  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8228for as_dir in $PATH
8229do
8230  IFS=$as_save_IFS
8231  test -z "$as_dir" && as_dir=.
8232    for ac_exec_ext in '' $ac_executable_extensions; do
8233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8234    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8236    break 2
8237  fi
8238done
8239  done
8240IFS=$as_save_IFS
8241
8242  ;;
8243esac
8244fi
8245MKTEMP=$ac_cv_path_MKTEMP
8246if test -n "$MKTEMP"; then
8247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8248$as_echo "$MKTEMP" >&6; }
8249else
8250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8251$as_echo "no" >&6; }
8252fi
8253
8254
8255        if test "x$MKTEMP" = x; then
8256          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8257        fi
8258      else
8259        # Otherwise we believe it is a complete path. Use it as it is.
8260        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8261$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8262        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8263$as_echo_n "checking for MKTEMP... " >&6; }
8264        if test ! -x "$tool_specified"; then
8265          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8266$as_echo "not found" >&6; }
8267          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8268        fi
8269        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8270$as_echo "$tool_specified" >&6; }
8271      fi
8272    fi
8273  fi
8274
8275
8276
8277  if test "x$MKTEMP" = x; then
8278    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8279  fi
8280
8281
8282
8283
8284
8285  # Publish this variable in the help.
8286
8287
8288  if test "x$MV" = x; then
8289    # The variable is not set by user, try to locate tool using the code snippet
8290    for ac_prog in mv
8291do
8292  # Extract the first word of "$ac_prog", so it can be a program name with args.
8293set dummy $ac_prog; ac_word=$2
8294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8295$as_echo_n "checking for $ac_word... " >&6; }
8296if ${ac_cv_path_MV+:} false; then :
8297  $as_echo_n "(cached) " >&6
8298else
8299  case $MV in
8300  [\\/]* | ?:[\\/]*)
8301  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8302  ;;
8303  *)
8304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8305for as_dir in $PATH
8306do
8307  IFS=$as_save_IFS
8308  test -z "$as_dir" && as_dir=.
8309    for ac_exec_ext in '' $ac_executable_extensions; do
8310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8311    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8313    break 2
8314  fi
8315done
8316  done
8317IFS=$as_save_IFS
8318
8319  ;;
8320esac
8321fi
8322MV=$ac_cv_path_MV
8323if test -n "$MV"; then
8324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8325$as_echo "$MV" >&6; }
8326else
8327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8328$as_echo "no" >&6; }
8329fi
8330
8331
8332  test -n "$MV" && break
8333done
8334
8335  else
8336    # The variable is set, but is it from the command line or the environment?
8337
8338    # Try to remove the string !MV! from our list.
8339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8341      # If it failed, the variable was not from the command line. Ignore it,
8342      # but warn the user (except for BASH, which is always set by the calling BASH).
8343      if test "xMV" != xBASH; then
8344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8345$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8346      fi
8347      # Try to locate tool using the code snippet
8348      for ac_prog in mv
8349do
8350  # Extract the first word of "$ac_prog", so it can be a program name with args.
8351set dummy $ac_prog; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_MV+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $MV in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380MV=$ac_cv_path_MV
8381if test -n "$MV"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8383$as_echo "$MV" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390  test -n "$MV" && break
8391done
8392
8393    else
8394      # If it succeeded, then it was overridden by the user. We will use it
8395      # for the tool.
8396
8397      # First remove it from the list of overridden variables, so we can test
8398      # for unknown variables in the end.
8399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8400
8401      # Check if the provided tool contains a complete path.
8402      tool_specified="$MV"
8403      tool_basename="${tool_specified##*/}"
8404      if test "x$tool_basename" = "x$tool_specified"; then
8405        # A command without a complete path is provided, search $PATH.
8406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8407$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8408        # Extract the first word of "$tool_basename", so it can be a program name with args.
8409set dummy $tool_basename; ac_word=$2
8410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8411$as_echo_n "checking for $ac_word... " >&6; }
8412if ${ac_cv_path_MV+:} false; then :
8413  $as_echo_n "(cached) " >&6
8414else
8415  case $MV in
8416  [\\/]* | ?:[\\/]*)
8417  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8418  ;;
8419  *)
8420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8421for as_dir in $PATH
8422do
8423  IFS=$as_save_IFS
8424  test -z "$as_dir" && as_dir=.
8425    for ac_exec_ext in '' $ac_executable_extensions; do
8426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8427    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8429    break 2
8430  fi
8431done
8432  done
8433IFS=$as_save_IFS
8434
8435  ;;
8436esac
8437fi
8438MV=$ac_cv_path_MV
8439if test -n "$MV"; then
8440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8441$as_echo "$MV" >&6; }
8442else
8443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8444$as_echo "no" >&6; }
8445fi
8446
8447
8448        if test "x$MV" = x; then
8449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8450        fi
8451      else
8452        # Otherwise we believe it is a complete path. Use it as it is.
8453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8454$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8456$as_echo_n "checking for MV... " >&6; }
8457        if test ! -x "$tool_specified"; then
8458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8459$as_echo "not found" >&6; }
8460          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8461        fi
8462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8463$as_echo "$tool_specified" >&6; }
8464      fi
8465    fi
8466  fi
8467
8468
8469
8470  if test "x$MV" = x; then
8471    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8472  fi
8473
8474
8475
8476
8477
8478  # Publish this variable in the help.
8479
8480
8481  if test "x$NAWK" = x; then
8482    # The variable is not set by user, try to locate tool using the code snippet
8483    for ac_prog in nawk gawk awk
8484do
8485  # Extract the first word of "$ac_prog", so it can be a program name with args.
8486set dummy $ac_prog; ac_word=$2
8487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8488$as_echo_n "checking for $ac_word... " >&6; }
8489if ${ac_cv_path_NAWK+:} false; then :
8490  $as_echo_n "(cached) " >&6
8491else
8492  case $NAWK in
8493  [\\/]* | ?:[\\/]*)
8494  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8495  ;;
8496  *)
8497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8498for as_dir in $PATH
8499do
8500  IFS=$as_save_IFS
8501  test -z "$as_dir" && as_dir=.
8502    for ac_exec_ext in '' $ac_executable_extensions; do
8503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8504    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8506    break 2
8507  fi
8508done
8509  done
8510IFS=$as_save_IFS
8511
8512  ;;
8513esac
8514fi
8515NAWK=$ac_cv_path_NAWK
8516if test -n "$NAWK"; then
8517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8518$as_echo "$NAWK" >&6; }
8519else
8520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8521$as_echo "no" >&6; }
8522fi
8523
8524
8525  test -n "$NAWK" && break
8526done
8527
8528  else
8529    # The variable is set, but is it from the command line or the environment?
8530
8531    # Try to remove the string !NAWK! from our list.
8532    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8533    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8534      # If it failed, the variable was not from the command line. Ignore it,
8535      # but warn the user (except for BASH, which is always set by the calling BASH).
8536      if test "xNAWK" != xBASH; then
8537        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8538$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8539      fi
8540      # Try to locate tool using the code snippet
8541      for ac_prog in nawk gawk awk
8542do
8543  # Extract the first word of "$ac_prog", so it can be a program name with args.
8544set dummy $ac_prog; ac_word=$2
8545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8546$as_echo_n "checking for $ac_word... " >&6; }
8547if ${ac_cv_path_NAWK+:} false; then :
8548  $as_echo_n "(cached) " >&6
8549else
8550  case $NAWK in
8551  [\\/]* | ?:[\\/]*)
8552  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8553  ;;
8554  *)
8555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8556for as_dir in $PATH
8557do
8558  IFS=$as_save_IFS
8559  test -z "$as_dir" && as_dir=.
8560    for ac_exec_ext in '' $ac_executable_extensions; do
8561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8562    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8564    break 2
8565  fi
8566done
8567  done
8568IFS=$as_save_IFS
8569
8570  ;;
8571esac
8572fi
8573NAWK=$ac_cv_path_NAWK
8574if test -n "$NAWK"; then
8575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8576$as_echo "$NAWK" >&6; }
8577else
8578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8579$as_echo "no" >&6; }
8580fi
8581
8582
8583  test -n "$NAWK" && break
8584done
8585
8586    else
8587      # If it succeeded, then it was overridden by the user. We will use it
8588      # for the tool.
8589
8590      # First remove it from the list of overridden variables, so we can test
8591      # for unknown variables in the end.
8592      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8593
8594      # Check if the provided tool contains a complete path.
8595      tool_specified="$NAWK"
8596      tool_basename="${tool_specified##*/}"
8597      if test "x$tool_basename" = "x$tool_specified"; then
8598        # A command without a complete path is provided, search $PATH.
8599        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8600$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8601        # Extract the first word of "$tool_basename", so it can be a program name with args.
8602set dummy $tool_basename; ac_word=$2
8603{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8604$as_echo_n "checking for $ac_word... " >&6; }
8605if ${ac_cv_path_NAWK+:} false; then :
8606  $as_echo_n "(cached) " >&6
8607else
8608  case $NAWK in
8609  [\\/]* | ?:[\\/]*)
8610  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8611  ;;
8612  *)
8613  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8614for as_dir in $PATH
8615do
8616  IFS=$as_save_IFS
8617  test -z "$as_dir" && as_dir=.
8618    for ac_exec_ext in '' $ac_executable_extensions; do
8619  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8620    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8621    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8622    break 2
8623  fi
8624done
8625  done
8626IFS=$as_save_IFS
8627
8628  ;;
8629esac
8630fi
8631NAWK=$ac_cv_path_NAWK
8632if test -n "$NAWK"; then
8633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8634$as_echo "$NAWK" >&6; }
8635else
8636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8637$as_echo "no" >&6; }
8638fi
8639
8640
8641        if test "x$NAWK" = x; then
8642          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8643        fi
8644      else
8645        # Otherwise we believe it is a complete path. Use it as it is.
8646        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8647$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8648        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8649$as_echo_n "checking for NAWK... " >&6; }
8650        if test ! -x "$tool_specified"; then
8651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8652$as_echo "not found" >&6; }
8653          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8654        fi
8655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8656$as_echo "$tool_specified" >&6; }
8657      fi
8658    fi
8659  fi
8660
8661
8662
8663  if test "x$NAWK" = x; then
8664    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8665  fi
8666
8667
8668
8669
8670
8671  # Publish this variable in the help.
8672
8673
8674  if test "x$PRINTF" = x; then
8675    # The variable is not set by user, try to locate tool using the code snippet
8676    for ac_prog in printf
8677do
8678  # Extract the first word of "$ac_prog", so it can be a program name with args.
8679set dummy $ac_prog; ac_word=$2
8680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8681$as_echo_n "checking for $ac_word... " >&6; }
8682if ${ac_cv_path_PRINTF+:} false; then :
8683  $as_echo_n "(cached) " >&6
8684else
8685  case $PRINTF in
8686  [\\/]* | ?:[\\/]*)
8687  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8688  ;;
8689  *)
8690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8691for as_dir in $PATH
8692do
8693  IFS=$as_save_IFS
8694  test -z "$as_dir" && as_dir=.
8695    for ac_exec_ext in '' $ac_executable_extensions; do
8696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8697    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8699    break 2
8700  fi
8701done
8702  done
8703IFS=$as_save_IFS
8704
8705  ;;
8706esac
8707fi
8708PRINTF=$ac_cv_path_PRINTF
8709if test -n "$PRINTF"; then
8710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8711$as_echo "$PRINTF" >&6; }
8712else
8713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8714$as_echo "no" >&6; }
8715fi
8716
8717
8718  test -n "$PRINTF" && break
8719done
8720
8721  else
8722    # The variable is set, but is it from the command line or the environment?
8723
8724    # Try to remove the string !PRINTF! from our list.
8725    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8726    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8727      # If it failed, the variable was not from the command line. Ignore it,
8728      # but warn the user (except for BASH, which is always set by the calling BASH).
8729      if test "xPRINTF" != xBASH; then
8730        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8731$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8732      fi
8733      # Try to locate tool using the code snippet
8734      for ac_prog in printf
8735do
8736  # Extract the first word of "$ac_prog", so it can be a program name with args.
8737set dummy $ac_prog; ac_word=$2
8738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8739$as_echo_n "checking for $ac_word... " >&6; }
8740if ${ac_cv_path_PRINTF+:} false; then :
8741  $as_echo_n "(cached) " >&6
8742else
8743  case $PRINTF in
8744  [\\/]* | ?:[\\/]*)
8745  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8746  ;;
8747  *)
8748  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8749for as_dir in $PATH
8750do
8751  IFS=$as_save_IFS
8752  test -z "$as_dir" && as_dir=.
8753    for ac_exec_ext in '' $ac_executable_extensions; do
8754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8755    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8757    break 2
8758  fi
8759done
8760  done
8761IFS=$as_save_IFS
8762
8763  ;;
8764esac
8765fi
8766PRINTF=$ac_cv_path_PRINTF
8767if test -n "$PRINTF"; then
8768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8769$as_echo "$PRINTF" >&6; }
8770else
8771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8772$as_echo "no" >&6; }
8773fi
8774
8775
8776  test -n "$PRINTF" && break
8777done
8778
8779    else
8780      # If it succeeded, then it was overridden by the user. We will use it
8781      # for the tool.
8782
8783      # First remove it from the list of overridden variables, so we can test
8784      # for unknown variables in the end.
8785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8786
8787      # Check if the provided tool contains a complete path.
8788      tool_specified="$PRINTF"
8789      tool_basename="${tool_specified##*/}"
8790      if test "x$tool_basename" = "x$tool_specified"; then
8791        # A command without a complete path is provided, search $PATH.
8792        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8793$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8794        # Extract the first word of "$tool_basename", so it can be a program name with args.
8795set dummy $tool_basename; ac_word=$2
8796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8797$as_echo_n "checking for $ac_word... " >&6; }
8798if ${ac_cv_path_PRINTF+:} false; then :
8799  $as_echo_n "(cached) " >&6
8800else
8801  case $PRINTF in
8802  [\\/]* | ?:[\\/]*)
8803  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8804  ;;
8805  *)
8806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8807for as_dir in $PATH
8808do
8809  IFS=$as_save_IFS
8810  test -z "$as_dir" && as_dir=.
8811    for ac_exec_ext in '' $ac_executable_extensions; do
8812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8813    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8815    break 2
8816  fi
8817done
8818  done
8819IFS=$as_save_IFS
8820
8821  ;;
8822esac
8823fi
8824PRINTF=$ac_cv_path_PRINTF
8825if test -n "$PRINTF"; then
8826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8827$as_echo "$PRINTF" >&6; }
8828else
8829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8830$as_echo "no" >&6; }
8831fi
8832
8833
8834        if test "x$PRINTF" = x; then
8835          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8836        fi
8837      else
8838        # Otherwise we believe it is a complete path. Use it as it is.
8839        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8840$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8841        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8842$as_echo_n "checking for PRINTF... " >&6; }
8843        if test ! -x "$tool_specified"; then
8844          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8845$as_echo "not found" >&6; }
8846          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8847        fi
8848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8849$as_echo "$tool_specified" >&6; }
8850      fi
8851    fi
8852  fi
8853
8854
8855
8856  if test "x$PRINTF" = x; then
8857    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8858  fi
8859
8860
8861
8862
8863
8864  # Publish this variable in the help.
8865
8866
8867  if test "x$RM" = x; then
8868    # The variable is not set by user, try to locate tool using the code snippet
8869    for ac_prog in rm
8870do
8871  # Extract the first word of "$ac_prog", so it can be a program name with args.
8872set dummy $ac_prog; ac_word=$2
8873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8874$as_echo_n "checking for $ac_word... " >&6; }
8875if ${ac_cv_path_RM+:} false; then :
8876  $as_echo_n "(cached) " >&6
8877else
8878  case $RM in
8879  [\\/]* | ?:[\\/]*)
8880  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8881  ;;
8882  *)
8883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8884for as_dir in $PATH
8885do
8886  IFS=$as_save_IFS
8887  test -z "$as_dir" && as_dir=.
8888    for ac_exec_ext in '' $ac_executable_extensions; do
8889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8890    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8892    break 2
8893  fi
8894done
8895  done
8896IFS=$as_save_IFS
8897
8898  ;;
8899esac
8900fi
8901RM=$ac_cv_path_RM
8902if test -n "$RM"; then
8903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8904$as_echo "$RM" >&6; }
8905else
8906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8907$as_echo "no" >&6; }
8908fi
8909
8910
8911  test -n "$RM" && break
8912done
8913
8914  else
8915    # The variable is set, but is it from the command line or the environment?
8916
8917    # Try to remove the string !RM! from our list.
8918    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8919    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8920      # If it failed, the variable was not from the command line. Ignore it,
8921      # but warn the user (except for BASH, which is always set by the calling BASH).
8922      if test "xRM" != xBASH; then
8923        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8924$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8925      fi
8926      # Try to locate tool using the code snippet
8927      for ac_prog in rm
8928do
8929  # Extract the first word of "$ac_prog", so it can be a program name with args.
8930set dummy $ac_prog; ac_word=$2
8931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8932$as_echo_n "checking for $ac_word... " >&6; }
8933if ${ac_cv_path_RM+:} false; then :
8934  $as_echo_n "(cached) " >&6
8935else
8936  case $RM in
8937  [\\/]* | ?:[\\/]*)
8938  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8939  ;;
8940  *)
8941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8942for as_dir in $PATH
8943do
8944  IFS=$as_save_IFS
8945  test -z "$as_dir" && as_dir=.
8946    for ac_exec_ext in '' $ac_executable_extensions; do
8947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8948    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8950    break 2
8951  fi
8952done
8953  done
8954IFS=$as_save_IFS
8955
8956  ;;
8957esac
8958fi
8959RM=$ac_cv_path_RM
8960if test -n "$RM"; then
8961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8962$as_echo "$RM" >&6; }
8963else
8964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8965$as_echo "no" >&6; }
8966fi
8967
8968
8969  test -n "$RM" && break
8970done
8971
8972    else
8973      # If it succeeded, then it was overridden by the user. We will use it
8974      # for the tool.
8975
8976      # First remove it from the list of overridden variables, so we can test
8977      # for unknown variables in the end.
8978      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8979
8980      # Check if the provided tool contains a complete path.
8981      tool_specified="$RM"
8982      tool_basename="${tool_specified##*/}"
8983      if test "x$tool_basename" = "x$tool_specified"; then
8984        # A command without a complete path is provided, search $PATH.
8985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8986$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8987        # Extract the first word of "$tool_basename", so it can be a program name with args.
8988set dummy $tool_basename; ac_word=$2
8989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8990$as_echo_n "checking for $ac_word... " >&6; }
8991if ${ac_cv_path_RM+:} false; then :
8992  $as_echo_n "(cached) " >&6
8993else
8994  case $RM in
8995  [\\/]* | ?:[\\/]*)
8996  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8997  ;;
8998  *)
8999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9000for as_dir in $PATH
9001do
9002  IFS=$as_save_IFS
9003  test -z "$as_dir" && as_dir=.
9004    for ac_exec_ext in '' $ac_executable_extensions; do
9005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9006    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9008    break 2
9009  fi
9010done
9011  done
9012IFS=$as_save_IFS
9013
9014  ;;
9015esac
9016fi
9017RM=$ac_cv_path_RM
9018if test -n "$RM"; then
9019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9020$as_echo "$RM" >&6; }
9021else
9022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9023$as_echo "no" >&6; }
9024fi
9025
9026
9027        if test "x$RM" = x; then
9028          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9029        fi
9030      else
9031        # Otherwise we believe it is a complete path. Use it as it is.
9032        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9033$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9035$as_echo_n "checking for RM... " >&6; }
9036        if test ! -x "$tool_specified"; then
9037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9038$as_echo "not found" >&6; }
9039          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9040        fi
9041        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9042$as_echo "$tool_specified" >&6; }
9043      fi
9044    fi
9045  fi
9046
9047
9048
9049  if test "x$RM" = x; then
9050    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9051  fi
9052
9053
9054
9055
9056
9057  # Publish this variable in the help.
9058
9059
9060  if test "x$SH" = x; then
9061    # The variable is not set by user, try to locate tool using the code snippet
9062    for ac_prog in sh
9063do
9064  # Extract the first word of "$ac_prog", so it can be a program name with args.
9065set dummy $ac_prog; ac_word=$2
9066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9067$as_echo_n "checking for $ac_word... " >&6; }
9068if ${ac_cv_path_SH+:} false; then :
9069  $as_echo_n "(cached) " >&6
9070else
9071  case $SH in
9072  [\\/]* | ?:[\\/]*)
9073  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9074  ;;
9075  *)
9076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9077for as_dir in $PATH
9078do
9079  IFS=$as_save_IFS
9080  test -z "$as_dir" && as_dir=.
9081    for ac_exec_ext in '' $ac_executable_extensions; do
9082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9083    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9085    break 2
9086  fi
9087done
9088  done
9089IFS=$as_save_IFS
9090
9091  ;;
9092esac
9093fi
9094SH=$ac_cv_path_SH
9095if test -n "$SH"; then
9096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9097$as_echo "$SH" >&6; }
9098else
9099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9100$as_echo "no" >&6; }
9101fi
9102
9103
9104  test -n "$SH" && break
9105done
9106
9107  else
9108    # The variable is set, but is it from the command line or the environment?
9109
9110    # Try to remove the string !SH! from our list.
9111    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9112    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9113      # If it failed, the variable was not from the command line. Ignore it,
9114      # but warn the user (except for BASH, which is always set by the calling BASH).
9115      if test "xSH" != xBASH; then
9116        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9117$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9118      fi
9119      # Try to locate tool using the code snippet
9120      for ac_prog in sh
9121do
9122  # Extract the first word of "$ac_prog", so it can be a program name with args.
9123set dummy $ac_prog; ac_word=$2
9124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9125$as_echo_n "checking for $ac_word... " >&6; }
9126if ${ac_cv_path_SH+:} false; then :
9127  $as_echo_n "(cached) " >&6
9128else
9129  case $SH in
9130  [\\/]* | ?:[\\/]*)
9131  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9132  ;;
9133  *)
9134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9135for as_dir in $PATH
9136do
9137  IFS=$as_save_IFS
9138  test -z "$as_dir" && as_dir=.
9139    for ac_exec_ext in '' $ac_executable_extensions; do
9140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9141    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9143    break 2
9144  fi
9145done
9146  done
9147IFS=$as_save_IFS
9148
9149  ;;
9150esac
9151fi
9152SH=$ac_cv_path_SH
9153if test -n "$SH"; then
9154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9155$as_echo "$SH" >&6; }
9156else
9157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9158$as_echo "no" >&6; }
9159fi
9160
9161
9162  test -n "$SH" && break
9163done
9164
9165    else
9166      # If it succeeded, then it was overridden by the user. We will use it
9167      # for the tool.
9168
9169      # First remove it from the list of overridden variables, so we can test
9170      # for unknown variables in the end.
9171      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9172
9173      # Check if the provided tool contains a complete path.
9174      tool_specified="$SH"
9175      tool_basename="${tool_specified##*/}"
9176      if test "x$tool_basename" = "x$tool_specified"; then
9177        # A command without a complete path is provided, search $PATH.
9178        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9179$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9180        # Extract the first word of "$tool_basename", so it can be a program name with args.
9181set dummy $tool_basename; ac_word=$2
9182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9183$as_echo_n "checking for $ac_word... " >&6; }
9184if ${ac_cv_path_SH+:} false; then :
9185  $as_echo_n "(cached) " >&6
9186else
9187  case $SH in
9188  [\\/]* | ?:[\\/]*)
9189  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9190  ;;
9191  *)
9192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9193for as_dir in $PATH
9194do
9195  IFS=$as_save_IFS
9196  test -z "$as_dir" && as_dir=.
9197    for ac_exec_ext in '' $ac_executable_extensions; do
9198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9199    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9201    break 2
9202  fi
9203done
9204  done
9205IFS=$as_save_IFS
9206
9207  ;;
9208esac
9209fi
9210SH=$ac_cv_path_SH
9211if test -n "$SH"; then
9212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9213$as_echo "$SH" >&6; }
9214else
9215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9216$as_echo "no" >&6; }
9217fi
9218
9219
9220        if test "x$SH" = x; then
9221          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9222        fi
9223      else
9224        # Otherwise we believe it is a complete path. Use it as it is.
9225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9226$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9227        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9228$as_echo_n "checking for SH... " >&6; }
9229        if test ! -x "$tool_specified"; then
9230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9231$as_echo "not found" >&6; }
9232          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9233        fi
9234        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9235$as_echo "$tool_specified" >&6; }
9236      fi
9237    fi
9238  fi
9239
9240
9241
9242  if test "x$SH" = x; then
9243    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9244  fi
9245
9246
9247
9248
9249
9250  # Publish this variable in the help.
9251
9252
9253  if test "x$SORT" = x; then
9254    # The variable is not set by user, try to locate tool using the code snippet
9255    for ac_prog in sort
9256do
9257  # Extract the first word of "$ac_prog", so it can be a program name with args.
9258set dummy $ac_prog; ac_word=$2
9259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9260$as_echo_n "checking for $ac_word... " >&6; }
9261if ${ac_cv_path_SORT+:} false; then :
9262  $as_echo_n "(cached) " >&6
9263else
9264  case $SORT in
9265  [\\/]* | ?:[\\/]*)
9266  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9267  ;;
9268  *)
9269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9270for as_dir in $PATH
9271do
9272  IFS=$as_save_IFS
9273  test -z "$as_dir" && as_dir=.
9274    for ac_exec_ext in '' $ac_executable_extensions; do
9275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9276    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9278    break 2
9279  fi
9280done
9281  done
9282IFS=$as_save_IFS
9283
9284  ;;
9285esac
9286fi
9287SORT=$ac_cv_path_SORT
9288if test -n "$SORT"; then
9289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9290$as_echo "$SORT" >&6; }
9291else
9292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9293$as_echo "no" >&6; }
9294fi
9295
9296
9297  test -n "$SORT" && break
9298done
9299
9300  else
9301    # The variable is set, but is it from the command line or the environment?
9302
9303    # Try to remove the string !SORT! from our list.
9304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9306      # If it failed, the variable was not from the command line. Ignore it,
9307      # but warn the user (except for BASH, which is always set by the calling BASH).
9308      if test "xSORT" != xBASH; then
9309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9310$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9311      fi
9312      # Try to locate tool using the code snippet
9313      for ac_prog in sort
9314do
9315  # Extract the first word of "$ac_prog", so it can be a program name with args.
9316set dummy $ac_prog; ac_word=$2
9317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9318$as_echo_n "checking for $ac_word... " >&6; }
9319if ${ac_cv_path_SORT+:} false; then :
9320  $as_echo_n "(cached) " >&6
9321else
9322  case $SORT in
9323  [\\/]* | ?:[\\/]*)
9324  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9325  ;;
9326  *)
9327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9328for as_dir in $PATH
9329do
9330  IFS=$as_save_IFS
9331  test -z "$as_dir" && as_dir=.
9332    for ac_exec_ext in '' $ac_executable_extensions; do
9333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9334    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9336    break 2
9337  fi
9338done
9339  done
9340IFS=$as_save_IFS
9341
9342  ;;
9343esac
9344fi
9345SORT=$ac_cv_path_SORT
9346if test -n "$SORT"; then
9347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9348$as_echo "$SORT" >&6; }
9349else
9350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9351$as_echo "no" >&6; }
9352fi
9353
9354
9355  test -n "$SORT" && break
9356done
9357
9358    else
9359      # If it succeeded, then it was overridden by the user. We will use it
9360      # for the tool.
9361
9362      # First remove it from the list of overridden variables, so we can test
9363      # for unknown variables in the end.
9364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9365
9366      # Check if the provided tool contains a complete path.
9367      tool_specified="$SORT"
9368      tool_basename="${tool_specified##*/}"
9369      if test "x$tool_basename" = "x$tool_specified"; then
9370        # A command without a complete path is provided, search $PATH.
9371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9372$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9373        # Extract the first word of "$tool_basename", so it can be a program name with args.
9374set dummy $tool_basename; ac_word=$2
9375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9376$as_echo_n "checking for $ac_word... " >&6; }
9377if ${ac_cv_path_SORT+:} false; then :
9378  $as_echo_n "(cached) " >&6
9379else
9380  case $SORT in
9381  [\\/]* | ?:[\\/]*)
9382  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9383  ;;
9384  *)
9385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9386for as_dir in $PATH
9387do
9388  IFS=$as_save_IFS
9389  test -z "$as_dir" && as_dir=.
9390    for ac_exec_ext in '' $ac_executable_extensions; do
9391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9392    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9394    break 2
9395  fi
9396done
9397  done
9398IFS=$as_save_IFS
9399
9400  ;;
9401esac
9402fi
9403SORT=$ac_cv_path_SORT
9404if test -n "$SORT"; then
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9406$as_echo "$SORT" >&6; }
9407else
9408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9409$as_echo "no" >&6; }
9410fi
9411
9412
9413        if test "x$SORT" = x; then
9414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9415        fi
9416      else
9417        # Otherwise we believe it is a complete path. Use it as it is.
9418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9419$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9421$as_echo_n "checking for SORT... " >&6; }
9422        if test ! -x "$tool_specified"; then
9423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9424$as_echo "not found" >&6; }
9425          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9426        fi
9427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9428$as_echo "$tool_specified" >&6; }
9429      fi
9430    fi
9431  fi
9432
9433
9434
9435  if test "x$SORT" = x; then
9436    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9437  fi
9438
9439
9440
9441
9442
9443  # Publish this variable in the help.
9444
9445
9446  if test "x$TAIL" = x; then
9447    # The variable is not set by user, try to locate tool using the code snippet
9448    for ac_prog in tail
9449do
9450  # Extract the first word of "$ac_prog", so it can be a program name with args.
9451set dummy $ac_prog; ac_word=$2
9452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9453$as_echo_n "checking for $ac_word... " >&6; }
9454if ${ac_cv_path_TAIL+:} false; then :
9455  $as_echo_n "(cached) " >&6
9456else
9457  case $TAIL in
9458  [\\/]* | ?:[\\/]*)
9459  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9460  ;;
9461  *)
9462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9463for as_dir in $PATH
9464do
9465  IFS=$as_save_IFS
9466  test -z "$as_dir" && as_dir=.
9467    for ac_exec_ext in '' $ac_executable_extensions; do
9468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9469    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9471    break 2
9472  fi
9473done
9474  done
9475IFS=$as_save_IFS
9476
9477  ;;
9478esac
9479fi
9480TAIL=$ac_cv_path_TAIL
9481if test -n "$TAIL"; then
9482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9483$as_echo "$TAIL" >&6; }
9484else
9485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486$as_echo "no" >&6; }
9487fi
9488
9489
9490  test -n "$TAIL" && break
9491done
9492
9493  else
9494    # The variable is set, but is it from the command line or the environment?
9495
9496    # Try to remove the string !TAIL! from our list.
9497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9499      # If it failed, the variable was not from the command line. Ignore it,
9500      # but warn the user (except for BASH, which is always set by the calling BASH).
9501      if test "xTAIL" != xBASH; then
9502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9503$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9504      fi
9505      # Try to locate tool using the code snippet
9506      for ac_prog in tail
9507do
9508  # Extract the first word of "$ac_prog", so it can be a program name with args.
9509set dummy $ac_prog; ac_word=$2
9510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9511$as_echo_n "checking for $ac_word... " >&6; }
9512if ${ac_cv_path_TAIL+:} false; then :
9513  $as_echo_n "(cached) " >&6
9514else
9515  case $TAIL in
9516  [\\/]* | ?:[\\/]*)
9517  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9518  ;;
9519  *)
9520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9521for as_dir in $PATH
9522do
9523  IFS=$as_save_IFS
9524  test -z "$as_dir" && as_dir=.
9525    for ac_exec_ext in '' $ac_executable_extensions; do
9526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9527    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9529    break 2
9530  fi
9531done
9532  done
9533IFS=$as_save_IFS
9534
9535  ;;
9536esac
9537fi
9538TAIL=$ac_cv_path_TAIL
9539if test -n "$TAIL"; then
9540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9541$as_echo "$TAIL" >&6; }
9542else
9543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9544$as_echo "no" >&6; }
9545fi
9546
9547
9548  test -n "$TAIL" && break
9549done
9550
9551    else
9552      # If it succeeded, then it was overridden by the user. We will use it
9553      # for the tool.
9554
9555      # First remove it from the list of overridden variables, so we can test
9556      # for unknown variables in the end.
9557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9558
9559      # Check if the provided tool contains a complete path.
9560      tool_specified="$TAIL"
9561      tool_basename="${tool_specified##*/}"
9562      if test "x$tool_basename" = "x$tool_specified"; then
9563        # A command without a complete path is provided, search $PATH.
9564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9565$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9566        # Extract the first word of "$tool_basename", so it can be a program name with args.
9567set dummy $tool_basename; ac_word=$2
9568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9569$as_echo_n "checking for $ac_word... " >&6; }
9570if ${ac_cv_path_TAIL+:} false; then :
9571  $as_echo_n "(cached) " >&6
9572else
9573  case $TAIL in
9574  [\\/]* | ?:[\\/]*)
9575  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9576  ;;
9577  *)
9578  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9579for as_dir in $PATH
9580do
9581  IFS=$as_save_IFS
9582  test -z "$as_dir" && as_dir=.
9583    for ac_exec_ext in '' $ac_executable_extensions; do
9584  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9585    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9586    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9587    break 2
9588  fi
9589done
9590  done
9591IFS=$as_save_IFS
9592
9593  ;;
9594esac
9595fi
9596TAIL=$ac_cv_path_TAIL
9597if test -n "$TAIL"; then
9598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9599$as_echo "$TAIL" >&6; }
9600else
9601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9602$as_echo "no" >&6; }
9603fi
9604
9605
9606        if test "x$TAIL" = x; then
9607          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9608        fi
9609      else
9610        # Otherwise we believe it is a complete path. Use it as it is.
9611        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9612$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9614$as_echo_n "checking for TAIL... " >&6; }
9615        if test ! -x "$tool_specified"; then
9616          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9617$as_echo "not found" >&6; }
9618          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9619        fi
9620        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9621$as_echo "$tool_specified" >&6; }
9622      fi
9623    fi
9624  fi
9625
9626
9627
9628  if test "x$TAIL" = x; then
9629    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9630  fi
9631
9632
9633
9634
9635
9636  # Publish this variable in the help.
9637
9638
9639  if test "x$TAR" = x; then
9640    # The variable is not set by user, try to locate tool using the code snippet
9641    for ac_prog in tar
9642do
9643  # Extract the first word of "$ac_prog", so it can be a program name with args.
9644set dummy $ac_prog; ac_word=$2
9645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9646$as_echo_n "checking for $ac_word... " >&6; }
9647if ${ac_cv_path_TAR+:} false; then :
9648  $as_echo_n "(cached) " >&6
9649else
9650  case $TAR in
9651  [\\/]* | ?:[\\/]*)
9652  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9653  ;;
9654  *)
9655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9656for as_dir in $PATH
9657do
9658  IFS=$as_save_IFS
9659  test -z "$as_dir" && as_dir=.
9660    for ac_exec_ext in '' $ac_executable_extensions; do
9661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9662    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9664    break 2
9665  fi
9666done
9667  done
9668IFS=$as_save_IFS
9669
9670  ;;
9671esac
9672fi
9673TAR=$ac_cv_path_TAR
9674if test -n "$TAR"; then
9675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9676$as_echo "$TAR" >&6; }
9677else
9678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9679$as_echo "no" >&6; }
9680fi
9681
9682
9683  test -n "$TAR" && break
9684done
9685
9686  else
9687    # The variable is set, but is it from the command line or the environment?
9688
9689    # Try to remove the string !TAR! from our list.
9690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9692      # If it failed, the variable was not from the command line. Ignore it,
9693      # but warn the user (except for BASH, which is always set by the calling BASH).
9694      if test "xTAR" != xBASH; then
9695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9696$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9697      fi
9698      # Try to locate tool using the code snippet
9699      for ac_prog in tar
9700do
9701  # Extract the first word of "$ac_prog", so it can be a program name with args.
9702set dummy $ac_prog; ac_word=$2
9703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9704$as_echo_n "checking for $ac_word... " >&6; }
9705if ${ac_cv_path_TAR+:} false; then :
9706  $as_echo_n "(cached) " >&6
9707else
9708  case $TAR in
9709  [\\/]* | ?:[\\/]*)
9710  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9711  ;;
9712  *)
9713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9714for as_dir in $PATH
9715do
9716  IFS=$as_save_IFS
9717  test -z "$as_dir" && as_dir=.
9718    for ac_exec_ext in '' $ac_executable_extensions; do
9719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9720    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9722    break 2
9723  fi
9724done
9725  done
9726IFS=$as_save_IFS
9727
9728  ;;
9729esac
9730fi
9731TAR=$ac_cv_path_TAR
9732if test -n "$TAR"; then
9733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9734$as_echo "$TAR" >&6; }
9735else
9736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9737$as_echo "no" >&6; }
9738fi
9739
9740
9741  test -n "$TAR" && break
9742done
9743
9744    else
9745      # If it succeeded, then it was overridden by the user. We will use it
9746      # for the tool.
9747
9748      # First remove it from the list of overridden variables, so we can test
9749      # for unknown variables in the end.
9750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9751
9752      # Check if the provided tool contains a complete path.
9753      tool_specified="$TAR"
9754      tool_basename="${tool_specified##*/}"
9755      if test "x$tool_basename" = "x$tool_specified"; then
9756        # A command without a complete path is provided, search $PATH.
9757        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9758$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9759        # Extract the first word of "$tool_basename", so it can be a program name with args.
9760set dummy $tool_basename; ac_word=$2
9761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9762$as_echo_n "checking for $ac_word... " >&6; }
9763if ${ac_cv_path_TAR+:} false; then :
9764  $as_echo_n "(cached) " >&6
9765else
9766  case $TAR in
9767  [\\/]* | ?:[\\/]*)
9768  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9769  ;;
9770  *)
9771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9772for as_dir in $PATH
9773do
9774  IFS=$as_save_IFS
9775  test -z "$as_dir" && as_dir=.
9776    for ac_exec_ext in '' $ac_executable_extensions; do
9777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9778    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9780    break 2
9781  fi
9782done
9783  done
9784IFS=$as_save_IFS
9785
9786  ;;
9787esac
9788fi
9789TAR=$ac_cv_path_TAR
9790if test -n "$TAR"; then
9791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9792$as_echo "$TAR" >&6; }
9793else
9794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9795$as_echo "no" >&6; }
9796fi
9797
9798
9799        if test "x$TAR" = x; then
9800          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9801        fi
9802      else
9803        # Otherwise we believe it is a complete path. Use it as it is.
9804        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9805$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9807$as_echo_n "checking for TAR... " >&6; }
9808        if test ! -x "$tool_specified"; then
9809          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9810$as_echo "not found" >&6; }
9811          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9812        fi
9813        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9814$as_echo "$tool_specified" >&6; }
9815      fi
9816    fi
9817  fi
9818
9819
9820
9821  if test "x$TAR" = x; then
9822    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9823  fi
9824
9825
9826
9827
9828
9829  # Publish this variable in the help.
9830
9831
9832  if test "x$TEE" = x; then
9833    # The variable is not set by user, try to locate tool using the code snippet
9834    for ac_prog in tee
9835do
9836  # Extract the first word of "$ac_prog", so it can be a program name with args.
9837set dummy $ac_prog; ac_word=$2
9838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9839$as_echo_n "checking for $ac_word... " >&6; }
9840if ${ac_cv_path_TEE+:} false; then :
9841  $as_echo_n "(cached) " >&6
9842else
9843  case $TEE in
9844  [\\/]* | ?:[\\/]*)
9845  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9846  ;;
9847  *)
9848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9849for as_dir in $PATH
9850do
9851  IFS=$as_save_IFS
9852  test -z "$as_dir" && as_dir=.
9853    for ac_exec_ext in '' $ac_executable_extensions; do
9854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9855    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9857    break 2
9858  fi
9859done
9860  done
9861IFS=$as_save_IFS
9862
9863  ;;
9864esac
9865fi
9866TEE=$ac_cv_path_TEE
9867if test -n "$TEE"; then
9868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9869$as_echo "$TEE" >&6; }
9870else
9871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9872$as_echo "no" >&6; }
9873fi
9874
9875
9876  test -n "$TEE" && break
9877done
9878
9879  else
9880    # The variable is set, but is it from the command line or the environment?
9881
9882    # Try to remove the string !TEE! from our list.
9883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9885      # If it failed, the variable was not from the command line. Ignore it,
9886      # but warn the user (except for BASH, which is always set by the calling BASH).
9887      if test "xTEE" != xBASH; then
9888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9889$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9890      fi
9891      # Try to locate tool using the code snippet
9892      for ac_prog in tee
9893do
9894  # Extract the first word of "$ac_prog", so it can be a program name with args.
9895set dummy $ac_prog; ac_word=$2
9896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9897$as_echo_n "checking for $ac_word... " >&6; }
9898if ${ac_cv_path_TEE+:} false; then :
9899  $as_echo_n "(cached) " >&6
9900else
9901  case $TEE in
9902  [\\/]* | ?:[\\/]*)
9903  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9904  ;;
9905  *)
9906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9907for as_dir in $PATH
9908do
9909  IFS=$as_save_IFS
9910  test -z "$as_dir" && as_dir=.
9911    for ac_exec_ext in '' $ac_executable_extensions; do
9912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9913    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9915    break 2
9916  fi
9917done
9918  done
9919IFS=$as_save_IFS
9920
9921  ;;
9922esac
9923fi
9924TEE=$ac_cv_path_TEE
9925if test -n "$TEE"; then
9926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9927$as_echo "$TEE" >&6; }
9928else
9929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9930$as_echo "no" >&6; }
9931fi
9932
9933
9934  test -n "$TEE" && break
9935done
9936
9937    else
9938      # If it succeeded, then it was overridden by the user. We will use it
9939      # for the tool.
9940
9941      # First remove it from the list of overridden variables, so we can test
9942      # for unknown variables in the end.
9943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9944
9945      # Check if the provided tool contains a complete path.
9946      tool_specified="$TEE"
9947      tool_basename="${tool_specified##*/}"
9948      if test "x$tool_basename" = "x$tool_specified"; then
9949        # A command without a complete path is provided, search $PATH.
9950        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9951$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9952        # Extract the first word of "$tool_basename", so it can be a program name with args.
9953set dummy $tool_basename; ac_word=$2
9954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9955$as_echo_n "checking for $ac_word... " >&6; }
9956if ${ac_cv_path_TEE+:} false; then :
9957  $as_echo_n "(cached) " >&6
9958else
9959  case $TEE in
9960  [\\/]* | ?:[\\/]*)
9961  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9962  ;;
9963  *)
9964  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9965for as_dir in $PATH
9966do
9967  IFS=$as_save_IFS
9968  test -z "$as_dir" && as_dir=.
9969    for ac_exec_ext in '' $ac_executable_extensions; do
9970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9971    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9973    break 2
9974  fi
9975done
9976  done
9977IFS=$as_save_IFS
9978
9979  ;;
9980esac
9981fi
9982TEE=$ac_cv_path_TEE
9983if test -n "$TEE"; then
9984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9985$as_echo "$TEE" >&6; }
9986else
9987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9988$as_echo "no" >&6; }
9989fi
9990
9991
9992        if test "x$TEE" = x; then
9993          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9994        fi
9995      else
9996        # Otherwise we believe it is a complete path. Use it as it is.
9997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9998$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
9999        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10000$as_echo_n "checking for TEE... " >&6; }
10001        if test ! -x "$tool_specified"; then
10002          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10003$as_echo "not found" >&6; }
10004          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10005        fi
10006        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10007$as_echo "$tool_specified" >&6; }
10008      fi
10009    fi
10010  fi
10011
10012
10013
10014  if test "x$TEE" = x; then
10015    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10016  fi
10017
10018
10019
10020
10021
10022  # Publish this variable in the help.
10023
10024
10025  if test "x$TOUCH" = x; then
10026    # The variable is not set by user, try to locate tool using the code snippet
10027    for ac_prog in touch
10028do
10029  # Extract the first word of "$ac_prog", so it can be a program name with args.
10030set dummy $ac_prog; ac_word=$2
10031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10032$as_echo_n "checking for $ac_word... " >&6; }
10033if ${ac_cv_path_TOUCH+:} false; then :
10034  $as_echo_n "(cached) " >&6
10035else
10036  case $TOUCH in
10037  [\\/]* | ?:[\\/]*)
10038  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10039  ;;
10040  *)
10041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10042for as_dir in $PATH
10043do
10044  IFS=$as_save_IFS
10045  test -z "$as_dir" && as_dir=.
10046    for ac_exec_ext in '' $ac_executable_extensions; do
10047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10048    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10050    break 2
10051  fi
10052done
10053  done
10054IFS=$as_save_IFS
10055
10056  ;;
10057esac
10058fi
10059TOUCH=$ac_cv_path_TOUCH
10060if test -n "$TOUCH"; then
10061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10062$as_echo "$TOUCH" >&6; }
10063else
10064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10065$as_echo "no" >&6; }
10066fi
10067
10068
10069  test -n "$TOUCH" && break
10070done
10071
10072  else
10073    # The variable is set, but is it from the command line or the environment?
10074
10075    # Try to remove the string !TOUCH! from our list.
10076    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10077    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10078      # If it failed, the variable was not from the command line. Ignore it,
10079      # but warn the user (except for BASH, which is always set by the calling BASH).
10080      if test "xTOUCH" != xBASH; then
10081        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10082$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10083      fi
10084      # Try to locate tool using the code snippet
10085      for ac_prog in touch
10086do
10087  # Extract the first word of "$ac_prog", so it can be a program name with args.
10088set dummy $ac_prog; ac_word=$2
10089{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10090$as_echo_n "checking for $ac_word... " >&6; }
10091if ${ac_cv_path_TOUCH+:} false; then :
10092  $as_echo_n "(cached) " >&6
10093else
10094  case $TOUCH in
10095  [\\/]* | ?:[\\/]*)
10096  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10097  ;;
10098  *)
10099  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10100for as_dir in $PATH
10101do
10102  IFS=$as_save_IFS
10103  test -z "$as_dir" && as_dir=.
10104    for ac_exec_ext in '' $ac_executable_extensions; do
10105  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10106    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10107    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10108    break 2
10109  fi
10110done
10111  done
10112IFS=$as_save_IFS
10113
10114  ;;
10115esac
10116fi
10117TOUCH=$ac_cv_path_TOUCH
10118if test -n "$TOUCH"; then
10119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10120$as_echo "$TOUCH" >&6; }
10121else
10122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123$as_echo "no" >&6; }
10124fi
10125
10126
10127  test -n "$TOUCH" && break
10128done
10129
10130    else
10131      # If it succeeded, then it was overridden by the user. We will use it
10132      # for the tool.
10133
10134      # First remove it from the list of overridden variables, so we can test
10135      # for unknown variables in the end.
10136      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10137
10138      # Check if the provided tool contains a complete path.
10139      tool_specified="$TOUCH"
10140      tool_basename="${tool_specified##*/}"
10141      if test "x$tool_basename" = "x$tool_specified"; then
10142        # A command without a complete path is provided, search $PATH.
10143        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10144$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10145        # Extract the first word of "$tool_basename", so it can be a program name with args.
10146set dummy $tool_basename; ac_word=$2
10147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10148$as_echo_n "checking for $ac_word... " >&6; }
10149if ${ac_cv_path_TOUCH+:} false; then :
10150  $as_echo_n "(cached) " >&6
10151else
10152  case $TOUCH in
10153  [\\/]* | ?:[\\/]*)
10154  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10155  ;;
10156  *)
10157  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10158for as_dir in $PATH
10159do
10160  IFS=$as_save_IFS
10161  test -z "$as_dir" && as_dir=.
10162    for ac_exec_ext in '' $ac_executable_extensions; do
10163  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10164    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10165    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10166    break 2
10167  fi
10168done
10169  done
10170IFS=$as_save_IFS
10171
10172  ;;
10173esac
10174fi
10175TOUCH=$ac_cv_path_TOUCH
10176if test -n "$TOUCH"; then
10177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10178$as_echo "$TOUCH" >&6; }
10179else
10180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10181$as_echo "no" >&6; }
10182fi
10183
10184
10185        if test "x$TOUCH" = x; then
10186          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10187        fi
10188      else
10189        # Otherwise we believe it is a complete path. Use it as it is.
10190        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10191$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10192        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10193$as_echo_n "checking for TOUCH... " >&6; }
10194        if test ! -x "$tool_specified"; then
10195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10196$as_echo "not found" >&6; }
10197          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10198        fi
10199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10200$as_echo "$tool_specified" >&6; }
10201      fi
10202    fi
10203  fi
10204
10205
10206
10207  if test "x$TOUCH" = x; then
10208    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10209  fi
10210
10211
10212
10213
10214
10215  # Publish this variable in the help.
10216
10217
10218  if test "x$TR" = x; then
10219    # The variable is not set by user, try to locate tool using the code snippet
10220    for ac_prog in tr
10221do
10222  # Extract the first word of "$ac_prog", so it can be a program name with args.
10223set dummy $ac_prog; ac_word=$2
10224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10225$as_echo_n "checking for $ac_word... " >&6; }
10226if ${ac_cv_path_TR+:} false; then :
10227  $as_echo_n "(cached) " >&6
10228else
10229  case $TR in
10230  [\\/]* | ?:[\\/]*)
10231  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10232  ;;
10233  *)
10234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10235for as_dir in $PATH
10236do
10237  IFS=$as_save_IFS
10238  test -z "$as_dir" && as_dir=.
10239    for ac_exec_ext in '' $ac_executable_extensions; do
10240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10241    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10243    break 2
10244  fi
10245done
10246  done
10247IFS=$as_save_IFS
10248
10249  ;;
10250esac
10251fi
10252TR=$ac_cv_path_TR
10253if test -n "$TR"; then
10254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10255$as_echo "$TR" >&6; }
10256else
10257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10258$as_echo "no" >&6; }
10259fi
10260
10261
10262  test -n "$TR" && break
10263done
10264
10265  else
10266    # The variable is set, but is it from the command line or the environment?
10267
10268    # Try to remove the string !TR! from our list.
10269    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10270    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10271      # If it failed, the variable was not from the command line. Ignore it,
10272      # but warn the user (except for BASH, which is always set by the calling BASH).
10273      if test "xTR" != xBASH; then
10274        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10275$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10276      fi
10277      # Try to locate tool using the code snippet
10278      for ac_prog in tr
10279do
10280  # Extract the first word of "$ac_prog", so it can be a program name with args.
10281set dummy $ac_prog; ac_word=$2
10282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10283$as_echo_n "checking for $ac_word... " >&6; }
10284if ${ac_cv_path_TR+:} false; then :
10285  $as_echo_n "(cached) " >&6
10286else
10287  case $TR in
10288  [\\/]* | ?:[\\/]*)
10289  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10290  ;;
10291  *)
10292  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10293for as_dir in $PATH
10294do
10295  IFS=$as_save_IFS
10296  test -z "$as_dir" && as_dir=.
10297    for ac_exec_ext in '' $ac_executable_extensions; do
10298  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10299    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10300    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10301    break 2
10302  fi
10303done
10304  done
10305IFS=$as_save_IFS
10306
10307  ;;
10308esac
10309fi
10310TR=$ac_cv_path_TR
10311if test -n "$TR"; then
10312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10313$as_echo "$TR" >&6; }
10314else
10315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10316$as_echo "no" >&6; }
10317fi
10318
10319
10320  test -n "$TR" && break
10321done
10322
10323    else
10324      # If it succeeded, then it was overridden by the user. We will use it
10325      # for the tool.
10326
10327      # First remove it from the list of overridden variables, so we can test
10328      # for unknown variables in the end.
10329      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10330
10331      # Check if the provided tool contains a complete path.
10332      tool_specified="$TR"
10333      tool_basename="${tool_specified##*/}"
10334      if test "x$tool_basename" = "x$tool_specified"; then
10335        # A command without a complete path is provided, search $PATH.
10336        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10337$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10338        # Extract the first word of "$tool_basename", so it can be a program name with args.
10339set dummy $tool_basename; ac_word=$2
10340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10341$as_echo_n "checking for $ac_word... " >&6; }
10342if ${ac_cv_path_TR+:} false; then :
10343  $as_echo_n "(cached) " >&6
10344else
10345  case $TR in
10346  [\\/]* | ?:[\\/]*)
10347  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10348  ;;
10349  *)
10350  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10351for as_dir in $PATH
10352do
10353  IFS=$as_save_IFS
10354  test -z "$as_dir" && as_dir=.
10355    for ac_exec_ext in '' $ac_executable_extensions; do
10356  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10357    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10359    break 2
10360  fi
10361done
10362  done
10363IFS=$as_save_IFS
10364
10365  ;;
10366esac
10367fi
10368TR=$ac_cv_path_TR
10369if test -n "$TR"; then
10370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10371$as_echo "$TR" >&6; }
10372else
10373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10374$as_echo "no" >&6; }
10375fi
10376
10377
10378        if test "x$TR" = x; then
10379          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10380        fi
10381      else
10382        # Otherwise we believe it is a complete path. Use it as it is.
10383        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10384$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10386$as_echo_n "checking for TR... " >&6; }
10387        if test ! -x "$tool_specified"; then
10388          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10389$as_echo "not found" >&6; }
10390          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10391        fi
10392        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10393$as_echo "$tool_specified" >&6; }
10394      fi
10395    fi
10396  fi
10397
10398
10399
10400  if test "x$TR" = x; then
10401    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10402  fi
10403
10404
10405
10406
10407
10408  # Publish this variable in the help.
10409
10410
10411  if test "x$UNAME" = x; then
10412    # The variable is not set by user, try to locate tool using the code snippet
10413    for ac_prog in uname
10414do
10415  # Extract the first word of "$ac_prog", so it can be a program name with args.
10416set dummy $ac_prog; ac_word=$2
10417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10418$as_echo_n "checking for $ac_word... " >&6; }
10419if ${ac_cv_path_UNAME+:} false; then :
10420  $as_echo_n "(cached) " >&6
10421else
10422  case $UNAME in
10423  [\\/]* | ?:[\\/]*)
10424  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10425  ;;
10426  *)
10427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10428for as_dir in $PATH
10429do
10430  IFS=$as_save_IFS
10431  test -z "$as_dir" && as_dir=.
10432    for ac_exec_ext in '' $ac_executable_extensions; do
10433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10434    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10436    break 2
10437  fi
10438done
10439  done
10440IFS=$as_save_IFS
10441
10442  ;;
10443esac
10444fi
10445UNAME=$ac_cv_path_UNAME
10446if test -n "$UNAME"; then
10447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10448$as_echo "$UNAME" >&6; }
10449else
10450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10451$as_echo "no" >&6; }
10452fi
10453
10454
10455  test -n "$UNAME" && break
10456done
10457
10458  else
10459    # The variable is set, but is it from the command line or the environment?
10460
10461    # Try to remove the string !UNAME! from our list.
10462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10464      # If it failed, the variable was not from the command line. Ignore it,
10465      # but warn the user (except for BASH, which is always set by the calling BASH).
10466      if test "xUNAME" != xBASH; then
10467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10468$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10469      fi
10470      # Try to locate tool using the code snippet
10471      for ac_prog in uname
10472do
10473  # Extract the first word of "$ac_prog", so it can be a program name with args.
10474set dummy $ac_prog; ac_word=$2
10475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10476$as_echo_n "checking for $ac_word... " >&6; }
10477if ${ac_cv_path_UNAME+:} false; then :
10478  $as_echo_n "(cached) " >&6
10479else
10480  case $UNAME in
10481  [\\/]* | ?:[\\/]*)
10482  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10483  ;;
10484  *)
10485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10486for as_dir in $PATH
10487do
10488  IFS=$as_save_IFS
10489  test -z "$as_dir" && as_dir=.
10490    for ac_exec_ext in '' $ac_executable_extensions; do
10491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10492    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10494    break 2
10495  fi
10496done
10497  done
10498IFS=$as_save_IFS
10499
10500  ;;
10501esac
10502fi
10503UNAME=$ac_cv_path_UNAME
10504if test -n "$UNAME"; then
10505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10506$as_echo "$UNAME" >&6; }
10507else
10508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10509$as_echo "no" >&6; }
10510fi
10511
10512
10513  test -n "$UNAME" && break
10514done
10515
10516    else
10517      # If it succeeded, then it was overridden by the user. We will use it
10518      # for the tool.
10519
10520      # First remove it from the list of overridden variables, so we can test
10521      # for unknown variables in the end.
10522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10523
10524      # Check if the provided tool contains a complete path.
10525      tool_specified="$UNAME"
10526      tool_basename="${tool_specified##*/}"
10527      if test "x$tool_basename" = "x$tool_specified"; then
10528        # A command without a complete path is provided, search $PATH.
10529        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10530$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10531        # Extract the first word of "$tool_basename", so it can be a program name with args.
10532set dummy $tool_basename; ac_word=$2
10533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10534$as_echo_n "checking for $ac_word... " >&6; }
10535if ${ac_cv_path_UNAME+:} false; then :
10536  $as_echo_n "(cached) " >&6
10537else
10538  case $UNAME in
10539  [\\/]* | ?:[\\/]*)
10540  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10541  ;;
10542  *)
10543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10544for as_dir in $PATH
10545do
10546  IFS=$as_save_IFS
10547  test -z "$as_dir" && as_dir=.
10548    for ac_exec_ext in '' $ac_executable_extensions; do
10549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10550    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10552    break 2
10553  fi
10554done
10555  done
10556IFS=$as_save_IFS
10557
10558  ;;
10559esac
10560fi
10561UNAME=$ac_cv_path_UNAME
10562if test -n "$UNAME"; then
10563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10564$as_echo "$UNAME" >&6; }
10565else
10566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
10568fi
10569
10570
10571        if test "x$UNAME" = x; then
10572          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10573        fi
10574      else
10575        # Otherwise we believe it is a complete path. Use it as it is.
10576        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10577$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10578        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10579$as_echo_n "checking for UNAME... " >&6; }
10580        if test ! -x "$tool_specified"; then
10581          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10582$as_echo "not found" >&6; }
10583          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10584        fi
10585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10586$as_echo "$tool_specified" >&6; }
10587      fi
10588    fi
10589  fi
10590
10591
10592
10593  if test "x$UNAME" = x; then
10594    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10595  fi
10596
10597
10598
10599
10600
10601  # Publish this variable in the help.
10602
10603
10604  if test "x$UNIQ" = x; then
10605    # The variable is not set by user, try to locate tool using the code snippet
10606    for ac_prog in uniq
10607do
10608  # Extract the first word of "$ac_prog", so it can be a program name with args.
10609set dummy $ac_prog; ac_word=$2
10610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10611$as_echo_n "checking for $ac_word... " >&6; }
10612if ${ac_cv_path_UNIQ+:} false; then :
10613  $as_echo_n "(cached) " >&6
10614else
10615  case $UNIQ in
10616  [\\/]* | ?:[\\/]*)
10617  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10618  ;;
10619  *)
10620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10621for as_dir in $PATH
10622do
10623  IFS=$as_save_IFS
10624  test -z "$as_dir" && as_dir=.
10625    for ac_exec_ext in '' $ac_executable_extensions; do
10626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10627    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10629    break 2
10630  fi
10631done
10632  done
10633IFS=$as_save_IFS
10634
10635  ;;
10636esac
10637fi
10638UNIQ=$ac_cv_path_UNIQ
10639if test -n "$UNIQ"; then
10640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10641$as_echo "$UNIQ" >&6; }
10642else
10643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10644$as_echo "no" >&6; }
10645fi
10646
10647
10648  test -n "$UNIQ" && break
10649done
10650
10651  else
10652    # The variable is set, but is it from the command line or the environment?
10653
10654    # Try to remove the string !UNIQ! from our list.
10655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10657      # If it failed, the variable was not from the command line. Ignore it,
10658      # but warn the user (except for BASH, which is always set by the calling BASH).
10659      if test "xUNIQ" != xBASH; then
10660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10661$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10662      fi
10663      # Try to locate tool using the code snippet
10664      for ac_prog in uniq
10665do
10666  # Extract the first word of "$ac_prog", so it can be a program name with args.
10667set dummy $ac_prog; ac_word=$2
10668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10669$as_echo_n "checking for $ac_word... " >&6; }
10670if ${ac_cv_path_UNIQ+:} false; then :
10671  $as_echo_n "(cached) " >&6
10672else
10673  case $UNIQ in
10674  [\\/]* | ?:[\\/]*)
10675  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10676  ;;
10677  *)
10678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10679for as_dir in $PATH
10680do
10681  IFS=$as_save_IFS
10682  test -z "$as_dir" && as_dir=.
10683    for ac_exec_ext in '' $ac_executable_extensions; do
10684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10685    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10687    break 2
10688  fi
10689done
10690  done
10691IFS=$as_save_IFS
10692
10693  ;;
10694esac
10695fi
10696UNIQ=$ac_cv_path_UNIQ
10697if test -n "$UNIQ"; then
10698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10699$as_echo "$UNIQ" >&6; }
10700else
10701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10702$as_echo "no" >&6; }
10703fi
10704
10705
10706  test -n "$UNIQ" && break
10707done
10708
10709    else
10710      # If it succeeded, then it was overridden by the user. We will use it
10711      # for the tool.
10712
10713      # First remove it from the list of overridden variables, so we can test
10714      # for unknown variables in the end.
10715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10716
10717      # Check if the provided tool contains a complete path.
10718      tool_specified="$UNIQ"
10719      tool_basename="${tool_specified##*/}"
10720      if test "x$tool_basename" = "x$tool_specified"; then
10721        # A command without a complete path is provided, search $PATH.
10722        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10723$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10724        # Extract the first word of "$tool_basename", so it can be a program name with args.
10725set dummy $tool_basename; ac_word=$2
10726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10727$as_echo_n "checking for $ac_word... " >&6; }
10728if ${ac_cv_path_UNIQ+:} false; then :
10729  $as_echo_n "(cached) " >&6
10730else
10731  case $UNIQ in
10732  [\\/]* | ?:[\\/]*)
10733  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10734  ;;
10735  *)
10736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10737for as_dir in $PATH
10738do
10739  IFS=$as_save_IFS
10740  test -z "$as_dir" && as_dir=.
10741    for ac_exec_ext in '' $ac_executable_extensions; do
10742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10743    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10745    break 2
10746  fi
10747done
10748  done
10749IFS=$as_save_IFS
10750
10751  ;;
10752esac
10753fi
10754UNIQ=$ac_cv_path_UNIQ
10755if test -n "$UNIQ"; then
10756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10757$as_echo "$UNIQ" >&6; }
10758else
10759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10760$as_echo "no" >&6; }
10761fi
10762
10763
10764        if test "x$UNIQ" = x; then
10765          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10766        fi
10767      else
10768        # Otherwise we believe it is a complete path. Use it as it is.
10769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10770$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10771        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10772$as_echo_n "checking for UNIQ... " >&6; }
10773        if test ! -x "$tool_specified"; then
10774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10775$as_echo "not found" >&6; }
10776          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10777        fi
10778        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10779$as_echo "$tool_specified" >&6; }
10780      fi
10781    fi
10782  fi
10783
10784
10785
10786  if test "x$UNIQ" = x; then
10787    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10788  fi
10789
10790
10791
10792
10793
10794  # Publish this variable in the help.
10795
10796
10797  if test "x$WC" = x; then
10798    # The variable is not set by user, try to locate tool using the code snippet
10799    for ac_prog in wc
10800do
10801  # Extract the first word of "$ac_prog", so it can be a program name with args.
10802set dummy $ac_prog; ac_word=$2
10803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10804$as_echo_n "checking for $ac_word... " >&6; }
10805if ${ac_cv_path_WC+:} false; then :
10806  $as_echo_n "(cached) " >&6
10807else
10808  case $WC in
10809  [\\/]* | ?:[\\/]*)
10810  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10811  ;;
10812  *)
10813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10814for as_dir in $PATH
10815do
10816  IFS=$as_save_IFS
10817  test -z "$as_dir" && as_dir=.
10818    for ac_exec_ext in '' $ac_executable_extensions; do
10819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10820    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10822    break 2
10823  fi
10824done
10825  done
10826IFS=$as_save_IFS
10827
10828  ;;
10829esac
10830fi
10831WC=$ac_cv_path_WC
10832if test -n "$WC"; then
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10834$as_echo "$WC" >&6; }
10835else
10836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10837$as_echo "no" >&6; }
10838fi
10839
10840
10841  test -n "$WC" && break
10842done
10843
10844  else
10845    # The variable is set, but is it from the command line or the environment?
10846
10847    # Try to remove the string !WC! from our list.
10848    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10849    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10850      # If it failed, the variable was not from the command line. Ignore it,
10851      # but warn the user (except for BASH, which is always set by the calling BASH).
10852      if test "xWC" != xBASH; then
10853        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10854$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10855      fi
10856      # Try to locate tool using the code snippet
10857      for ac_prog in wc
10858do
10859  # Extract the first word of "$ac_prog", so it can be a program name with args.
10860set dummy $ac_prog; ac_word=$2
10861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10862$as_echo_n "checking for $ac_word... " >&6; }
10863if ${ac_cv_path_WC+:} false; then :
10864  $as_echo_n "(cached) " >&6
10865else
10866  case $WC in
10867  [\\/]* | ?:[\\/]*)
10868  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10869  ;;
10870  *)
10871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10872for as_dir in $PATH
10873do
10874  IFS=$as_save_IFS
10875  test -z "$as_dir" && as_dir=.
10876    for ac_exec_ext in '' $ac_executable_extensions; do
10877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10878    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10880    break 2
10881  fi
10882done
10883  done
10884IFS=$as_save_IFS
10885
10886  ;;
10887esac
10888fi
10889WC=$ac_cv_path_WC
10890if test -n "$WC"; then
10891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10892$as_echo "$WC" >&6; }
10893else
10894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895$as_echo "no" >&6; }
10896fi
10897
10898
10899  test -n "$WC" && break
10900done
10901
10902    else
10903      # If it succeeded, then it was overridden by the user. We will use it
10904      # for the tool.
10905
10906      # First remove it from the list of overridden variables, so we can test
10907      # for unknown variables in the end.
10908      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10909
10910      # Check if the provided tool contains a complete path.
10911      tool_specified="$WC"
10912      tool_basename="${tool_specified##*/}"
10913      if test "x$tool_basename" = "x$tool_specified"; then
10914        # A command without a complete path is provided, search $PATH.
10915        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10916$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10917        # Extract the first word of "$tool_basename", so it can be a program name with args.
10918set dummy $tool_basename; ac_word=$2
10919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10920$as_echo_n "checking for $ac_word... " >&6; }
10921if ${ac_cv_path_WC+:} false; then :
10922  $as_echo_n "(cached) " >&6
10923else
10924  case $WC in
10925  [\\/]* | ?:[\\/]*)
10926  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10927  ;;
10928  *)
10929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10930for as_dir in $PATH
10931do
10932  IFS=$as_save_IFS
10933  test -z "$as_dir" && as_dir=.
10934    for ac_exec_ext in '' $ac_executable_extensions; do
10935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10936    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10938    break 2
10939  fi
10940done
10941  done
10942IFS=$as_save_IFS
10943
10944  ;;
10945esac
10946fi
10947WC=$ac_cv_path_WC
10948if test -n "$WC"; then
10949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10950$as_echo "$WC" >&6; }
10951else
10952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10953$as_echo "no" >&6; }
10954fi
10955
10956
10957        if test "x$WC" = x; then
10958          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10959        fi
10960      else
10961        # Otherwise we believe it is a complete path. Use it as it is.
10962        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10963$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10964        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10965$as_echo_n "checking for WC... " >&6; }
10966        if test ! -x "$tool_specified"; then
10967          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10968$as_echo "not found" >&6; }
10969          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10970        fi
10971        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10972$as_echo "$tool_specified" >&6; }
10973      fi
10974    fi
10975  fi
10976
10977
10978
10979  if test "x$WC" = x; then
10980    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10981  fi
10982
10983
10984
10985
10986
10987  # Publish this variable in the help.
10988
10989
10990  if test "x$WHICH" = x; then
10991    # The variable is not set by user, try to locate tool using the code snippet
10992    for ac_prog in which
10993do
10994  # Extract the first word of "$ac_prog", so it can be a program name with args.
10995set dummy $ac_prog; ac_word=$2
10996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10997$as_echo_n "checking for $ac_word... " >&6; }
10998if ${ac_cv_path_WHICH+:} false; then :
10999  $as_echo_n "(cached) " >&6
11000else
11001  case $WHICH in
11002  [\\/]* | ?:[\\/]*)
11003  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11004  ;;
11005  *)
11006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11007for as_dir in $PATH
11008do
11009  IFS=$as_save_IFS
11010  test -z "$as_dir" && as_dir=.
11011    for ac_exec_ext in '' $ac_executable_extensions; do
11012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11013    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11015    break 2
11016  fi
11017done
11018  done
11019IFS=$as_save_IFS
11020
11021  ;;
11022esac
11023fi
11024WHICH=$ac_cv_path_WHICH
11025if test -n "$WHICH"; then
11026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11027$as_echo "$WHICH" >&6; }
11028else
11029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11030$as_echo "no" >&6; }
11031fi
11032
11033
11034  test -n "$WHICH" && break
11035done
11036
11037  else
11038    # The variable is set, but is it from the command line or the environment?
11039
11040    # Try to remove the string !WHICH! from our list.
11041    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11042    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11043      # If it failed, the variable was not from the command line. Ignore it,
11044      # but warn the user (except for BASH, which is always set by the calling BASH).
11045      if test "xWHICH" != xBASH; then
11046        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11047$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11048      fi
11049      # Try to locate tool using the code snippet
11050      for ac_prog in which
11051do
11052  # Extract the first word of "$ac_prog", so it can be a program name with args.
11053set dummy $ac_prog; ac_word=$2
11054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11055$as_echo_n "checking for $ac_word... " >&6; }
11056if ${ac_cv_path_WHICH+:} false; then :
11057  $as_echo_n "(cached) " >&6
11058else
11059  case $WHICH in
11060  [\\/]* | ?:[\\/]*)
11061  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11062  ;;
11063  *)
11064  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11065for as_dir in $PATH
11066do
11067  IFS=$as_save_IFS
11068  test -z "$as_dir" && as_dir=.
11069    for ac_exec_ext in '' $ac_executable_extensions; do
11070  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11071    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11072    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11073    break 2
11074  fi
11075done
11076  done
11077IFS=$as_save_IFS
11078
11079  ;;
11080esac
11081fi
11082WHICH=$ac_cv_path_WHICH
11083if test -n "$WHICH"; then
11084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11085$as_echo "$WHICH" >&6; }
11086else
11087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11088$as_echo "no" >&6; }
11089fi
11090
11091
11092  test -n "$WHICH" && break
11093done
11094
11095    else
11096      # If it succeeded, then it was overridden by the user. We will use it
11097      # for the tool.
11098
11099      # First remove it from the list of overridden variables, so we can test
11100      # for unknown variables in the end.
11101      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11102
11103      # Check if the provided tool contains a complete path.
11104      tool_specified="$WHICH"
11105      tool_basename="${tool_specified##*/}"
11106      if test "x$tool_basename" = "x$tool_specified"; then
11107        # A command without a complete path is provided, search $PATH.
11108        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11109$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11110        # Extract the first word of "$tool_basename", so it can be a program name with args.
11111set dummy $tool_basename; ac_word=$2
11112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11113$as_echo_n "checking for $ac_word... " >&6; }
11114if ${ac_cv_path_WHICH+:} false; then :
11115  $as_echo_n "(cached) " >&6
11116else
11117  case $WHICH in
11118  [\\/]* | ?:[\\/]*)
11119  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11120  ;;
11121  *)
11122  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11123for as_dir in $PATH
11124do
11125  IFS=$as_save_IFS
11126  test -z "$as_dir" && as_dir=.
11127    for ac_exec_ext in '' $ac_executable_extensions; do
11128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11129    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11131    break 2
11132  fi
11133done
11134  done
11135IFS=$as_save_IFS
11136
11137  ;;
11138esac
11139fi
11140WHICH=$ac_cv_path_WHICH
11141if test -n "$WHICH"; then
11142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11143$as_echo "$WHICH" >&6; }
11144else
11145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11146$as_echo "no" >&6; }
11147fi
11148
11149
11150        if test "x$WHICH" = x; then
11151          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11152        fi
11153      else
11154        # Otherwise we believe it is a complete path. Use it as it is.
11155        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11156$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11157        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11158$as_echo_n "checking for WHICH... " >&6; }
11159        if test ! -x "$tool_specified"; then
11160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11161$as_echo "not found" >&6; }
11162          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11163        fi
11164        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11165$as_echo "$tool_specified" >&6; }
11166      fi
11167    fi
11168  fi
11169
11170
11171
11172  if test "x$WHICH" = x; then
11173    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11174  fi
11175
11176
11177
11178
11179
11180  # Publish this variable in the help.
11181
11182
11183  if test "x$XARGS" = x; then
11184    # The variable is not set by user, try to locate tool using the code snippet
11185    for ac_prog in xargs
11186do
11187  # Extract the first word of "$ac_prog", so it can be a program name with args.
11188set dummy $ac_prog; ac_word=$2
11189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11190$as_echo_n "checking for $ac_word... " >&6; }
11191if ${ac_cv_path_XARGS+:} false; then :
11192  $as_echo_n "(cached) " >&6
11193else
11194  case $XARGS in
11195  [\\/]* | ?:[\\/]*)
11196  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11197  ;;
11198  *)
11199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11200for as_dir in $PATH
11201do
11202  IFS=$as_save_IFS
11203  test -z "$as_dir" && as_dir=.
11204    for ac_exec_ext in '' $ac_executable_extensions; do
11205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11206    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11208    break 2
11209  fi
11210done
11211  done
11212IFS=$as_save_IFS
11213
11214  ;;
11215esac
11216fi
11217XARGS=$ac_cv_path_XARGS
11218if test -n "$XARGS"; then
11219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11220$as_echo "$XARGS" >&6; }
11221else
11222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11223$as_echo "no" >&6; }
11224fi
11225
11226
11227  test -n "$XARGS" && break
11228done
11229
11230  else
11231    # The variable is set, but is it from the command line or the environment?
11232
11233    # Try to remove the string !XARGS! from our list.
11234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11236      # If it failed, the variable was not from the command line. Ignore it,
11237      # but warn the user (except for BASH, which is always set by the calling BASH).
11238      if test "xXARGS" != xBASH; then
11239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11240$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11241      fi
11242      # Try to locate tool using the code snippet
11243      for ac_prog in xargs
11244do
11245  # Extract the first word of "$ac_prog", so it can be a program name with args.
11246set dummy $ac_prog; ac_word=$2
11247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11248$as_echo_n "checking for $ac_word... " >&6; }
11249if ${ac_cv_path_XARGS+:} false; then :
11250  $as_echo_n "(cached) " >&6
11251else
11252  case $XARGS in
11253  [\\/]* | ?:[\\/]*)
11254  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11255  ;;
11256  *)
11257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11258for as_dir in $PATH
11259do
11260  IFS=$as_save_IFS
11261  test -z "$as_dir" && as_dir=.
11262    for ac_exec_ext in '' $ac_executable_extensions; do
11263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11264    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11266    break 2
11267  fi
11268done
11269  done
11270IFS=$as_save_IFS
11271
11272  ;;
11273esac
11274fi
11275XARGS=$ac_cv_path_XARGS
11276if test -n "$XARGS"; then
11277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11278$as_echo "$XARGS" >&6; }
11279else
11280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11281$as_echo "no" >&6; }
11282fi
11283
11284
11285  test -n "$XARGS" && break
11286done
11287
11288    else
11289      # If it succeeded, then it was overridden by the user. We will use it
11290      # for the tool.
11291
11292      # First remove it from the list of overridden variables, so we can test
11293      # for unknown variables in the end.
11294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11295
11296      # Check if the provided tool contains a complete path.
11297      tool_specified="$XARGS"
11298      tool_basename="${tool_specified##*/}"
11299      if test "x$tool_basename" = "x$tool_specified"; then
11300        # A command without a complete path is provided, search $PATH.
11301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11302$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11303        # Extract the first word of "$tool_basename", so it can be a program name with args.
11304set dummy $tool_basename; ac_word=$2
11305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11306$as_echo_n "checking for $ac_word... " >&6; }
11307if ${ac_cv_path_XARGS+:} false; then :
11308  $as_echo_n "(cached) " >&6
11309else
11310  case $XARGS in
11311  [\\/]* | ?:[\\/]*)
11312  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11313  ;;
11314  *)
11315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11316for as_dir in $PATH
11317do
11318  IFS=$as_save_IFS
11319  test -z "$as_dir" && as_dir=.
11320    for ac_exec_ext in '' $ac_executable_extensions; do
11321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11322    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11324    break 2
11325  fi
11326done
11327  done
11328IFS=$as_save_IFS
11329
11330  ;;
11331esac
11332fi
11333XARGS=$ac_cv_path_XARGS
11334if test -n "$XARGS"; then
11335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11336$as_echo "$XARGS" >&6; }
11337else
11338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11339$as_echo "no" >&6; }
11340fi
11341
11342
11343        if test "x$XARGS" = x; then
11344          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11345        fi
11346      else
11347        # Otherwise we believe it is a complete path. Use it as it is.
11348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11349$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11351$as_echo_n "checking for XARGS... " >&6; }
11352        if test ! -x "$tool_specified"; then
11353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11354$as_echo "not found" >&6; }
11355          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11356        fi
11357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11358$as_echo "$tool_specified" >&6; }
11359      fi
11360    fi
11361  fi
11362
11363
11364
11365  if test "x$XARGS" = x; then
11366    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11367  fi
11368
11369
11370
11371  # Then required tools that require some special treatment.
11372
11373
11374  # Publish this variable in the help.
11375
11376
11377  if test "x$AWK" = x; then
11378    # The variable is not set by user, try to locate tool using the code snippet
11379    for ac_prog in gawk mawk nawk awk
11380do
11381  # Extract the first word of "$ac_prog", so it can be a program name with args.
11382set dummy $ac_prog; ac_word=$2
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11384$as_echo_n "checking for $ac_word... " >&6; }
11385if ${ac_cv_prog_AWK+:} false; then :
11386  $as_echo_n "(cached) " >&6
11387else
11388  if test -n "$AWK"; then
11389  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11390else
11391as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11392for as_dir in $PATH
11393do
11394  IFS=$as_save_IFS
11395  test -z "$as_dir" && as_dir=.
11396    for ac_exec_ext in '' $ac_executable_extensions; do
11397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11398    ac_cv_prog_AWK="$ac_prog"
11399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11400    break 2
11401  fi
11402done
11403  done
11404IFS=$as_save_IFS
11405
11406fi
11407fi
11408AWK=$ac_cv_prog_AWK
11409if test -n "$AWK"; then
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11411$as_echo "$AWK" >&6; }
11412else
11413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
11415fi
11416
11417
11418  test -n "$AWK" && break
11419done
11420
11421  else
11422    # The variable is set, but is it from the command line or the environment?
11423
11424    # Try to remove the string !AWK! from our list.
11425    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11426    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11427      # If it failed, the variable was not from the command line. Ignore it,
11428      # but warn the user (except for BASH, which is always set by the calling BASH).
11429      if test "xAWK" != xBASH; then
11430        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11431$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11432      fi
11433      # Try to locate tool using the code snippet
11434      for ac_prog in gawk mawk nawk awk
11435do
11436  # Extract the first word of "$ac_prog", so it can be a program name with args.
11437set dummy $ac_prog; ac_word=$2
11438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11439$as_echo_n "checking for $ac_word... " >&6; }
11440if ${ac_cv_prog_AWK+:} false; then :
11441  $as_echo_n "(cached) " >&6
11442else
11443  if test -n "$AWK"; then
11444  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11445else
11446as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11447for as_dir in $PATH
11448do
11449  IFS=$as_save_IFS
11450  test -z "$as_dir" && as_dir=.
11451    for ac_exec_ext in '' $ac_executable_extensions; do
11452  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11453    ac_cv_prog_AWK="$ac_prog"
11454    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11455    break 2
11456  fi
11457done
11458  done
11459IFS=$as_save_IFS
11460
11461fi
11462fi
11463AWK=$ac_cv_prog_AWK
11464if test -n "$AWK"; then
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11466$as_echo "$AWK" >&6; }
11467else
11468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470fi
11471
11472
11473  test -n "$AWK" && break
11474done
11475
11476    else
11477      # If it succeeded, then it was overridden by the user. We will use it
11478      # for the tool.
11479
11480      # First remove it from the list of overridden variables, so we can test
11481      # for unknown variables in the end.
11482      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11483
11484      # Check if the provided tool contains a complete path.
11485      tool_specified="$AWK"
11486      tool_basename="${tool_specified##*/}"
11487      if test "x$tool_basename" = "x$tool_specified"; then
11488        # A command without a complete path is provided, search $PATH.
11489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11490$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11491        # Extract the first word of "$tool_basename", so it can be a program name with args.
11492set dummy $tool_basename; ac_word=$2
11493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11494$as_echo_n "checking for $ac_word... " >&6; }
11495if ${ac_cv_path_AWK+:} false; then :
11496  $as_echo_n "(cached) " >&6
11497else
11498  case $AWK in
11499  [\\/]* | ?:[\\/]*)
11500  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11501  ;;
11502  *)
11503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11504for as_dir in $PATH
11505do
11506  IFS=$as_save_IFS
11507  test -z "$as_dir" && as_dir=.
11508    for ac_exec_ext in '' $ac_executable_extensions; do
11509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11510    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11512    break 2
11513  fi
11514done
11515  done
11516IFS=$as_save_IFS
11517
11518  ;;
11519esac
11520fi
11521AWK=$ac_cv_path_AWK
11522if test -n "$AWK"; then
11523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11524$as_echo "$AWK" >&6; }
11525else
11526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11527$as_echo "no" >&6; }
11528fi
11529
11530
11531        if test "x$AWK" = x; then
11532          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11533        fi
11534      else
11535        # Otherwise we believe it is a complete path. Use it as it is.
11536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11537$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11538        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11539$as_echo_n "checking for AWK... " >&6; }
11540        if test ! -x "$tool_specified"; then
11541          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11542$as_echo "not found" >&6; }
11543          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11544        fi
11545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11546$as_echo "$tool_specified" >&6; }
11547      fi
11548    fi
11549  fi
11550
11551
11552  if test "x$AWK" = x; then
11553    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11554  fi
11555
11556
11557
11558
11559  # Publish this variable in the help.
11560
11561
11562  if test "x$GREP" = x; then
11563    # The variable is not set by user, try to locate tool using the code snippet
11564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11565$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11566if ${ac_cv_path_GREP+:} false; then :
11567  $as_echo_n "(cached) " >&6
11568else
11569  if test -z "$GREP"; then
11570  ac_path_GREP_found=false
11571  # Loop through the user's path and test for each of PROGNAME-LIST
11572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11573for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11574do
11575  IFS=$as_save_IFS
11576  test -z "$as_dir" && as_dir=.
11577    for ac_prog in grep ggrep; do
11578    for ac_exec_ext in '' $ac_executable_extensions; do
11579      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11580      as_fn_executable_p "$ac_path_GREP" || continue
11581# Check for GNU ac_path_GREP and select it if it is found.
11582  # Check for GNU $ac_path_GREP
11583case `"$ac_path_GREP" --version 2>&1` in
11584*GNU*)
11585  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11586*)
11587  ac_count=0
11588  $as_echo_n 0123456789 >"conftest.in"
11589  while :
11590  do
11591    cat "conftest.in" "conftest.in" >"conftest.tmp"
11592    mv "conftest.tmp" "conftest.in"
11593    cp "conftest.in" "conftest.nl"
11594    $as_echo 'GREP' >> "conftest.nl"
11595    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11596    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11597    as_fn_arith $ac_count + 1 && ac_count=$as_val
11598    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11599      # Best one so far, save it but keep looking for a better one
11600      ac_cv_path_GREP="$ac_path_GREP"
11601      ac_path_GREP_max=$ac_count
11602    fi
11603    # 10*(2^10) chars as input seems more than enough
11604    test $ac_count -gt 10 && break
11605  done
11606  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11607esac
11608
11609      $ac_path_GREP_found && break 3
11610    done
11611  done
11612  done
11613IFS=$as_save_IFS
11614  if test -z "$ac_cv_path_GREP"; then
11615    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11616  fi
11617else
11618  ac_cv_path_GREP=$GREP
11619fi
11620
11621fi
11622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11623$as_echo "$ac_cv_path_GREP" >&6; }
11624 GREP="$ac_cv_path_GREP"
11625
11626
11627  else
11628    # The variable is set, but is it from the command line or the environment?
11629
11630    # Try to remove the string !GREP! from our list.
11631    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11632    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11633      # If it failed, the variable was not from the command line. Ignore it,
11634      # but warn the user (except for BASH, which is always set by the calling BASH).
11635      if test "xGREP" != xBASH; then
11636        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11637$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11638      fi
11639      # Try to locate tool using the code snippet
11640      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11641$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11642if ${ac_cv_path_GREP+:} false; then :
11643  $as_echo_n "(cached) " >&6
11644else
11645  if test -z "$GREP"; then
11646  ac_path_GREP_found=false
11647  # Loop through the user's path and test for each of PROGNAME-LIST
11648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11649for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11650do
11651  IFS=$as_save_IFS
11652  test -z "$as_dir" && as_dir=.
11653    for ac_prog in grep ggrep; do
11654    for ac_exec_ext in '' $ac_executable_extensions; do
11655      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11656      as_fn_executable_p "$ac_path_GREP" || continue
11657# Check for GNU ac_path_GREP and select it if it is found.
11658  # Check for GNU $ac_path_GREP
11659case `"$ac_path_GREP" --version 2>&1` in
11660*GNU*)
11661  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11662*)
11663  ac_count=0
11664  $as_echo_n 0123456789 >"conftest.in"
11665  while :
11666  do
11667    cat "conftest.in" "conftest.in" >"conftest.tmp"
11668    mv "conftest.tmp" "conftest.in"
11669    cp "conftest.in" "conftest.nl"
11670    $as_echo 'GREP' >> "conftest.nl"
11671    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11672    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11673    as_fn_arith $ac_count + 1 && ac_count=$as_val
11674    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11675      # Best one so far, save it but keep looking for a better one
11676      ac_cv_path_GREP="$ac_path_GREP"
11677      ac_path_GREP_max=$ac_count
11678    fi
11679    # 10*(2^10) chars as input seems more than enough
11680    test $ac_count -gt 10 && break
11681  done
11682  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11683esac
11684
11685      $ac_path_GREP_found && break 3
11686    done
11687  done
11688  done
11689IFS=$as_save_IFS
11690  if test -z "$ac_cv_path_GREP"; then
11691    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11692  fi
11693else
11694  ac_cv_path_GREP=$GREP
11695fi
11696
11697fi
11698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11699$as_echo "$ac_cv_path_GREP" >&6; }
11700 GREP="$ac_cv_path_GREP"
11701
11702
11703    else
11704      # If it succeeded, then it was overridden by the user. We will use it
11705      # for the tool.
11706
11707      # First remove it from the list of overridden variables, so we can test
11708      # for unknown variables in the end.
11709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11710
11711      # Check if the provided tool contains a complete path.
11712      tool_specified="$GREP"
11713      tool_basename="${tool_specified##*/}"
11714      if test "x$tool_basename" = "x$tool_specified"; then
11715        # A command without a complete path is provided, search $PATH.
11716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11717$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11718        # Extract the first word of "$tool_basename", so it can be a program name with args.
11719set dummy $tool_basename; ac_word=$2
11720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11721$as_echo_n "checking for $ac_word... " >&6; }
11722if ${ac_cv_path_GREP+:} false; then :
11723  $as_echo_n "(cached) " >&6
11724else
11725  case $GREP in
11726  [\\/]* | ?:[\\/]*)
11727  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11728  ;;
11729  *)
11730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11731for as_dir in $PATH
11732do
11733  IFS=$as_save_IFS
11734  test -z "$as_dir" && as_dir=.
11735    for ac_exec_ext in '' $ac_executable_extensions; do
11736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11737    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11739    break 2
11740  fi
11741done
11742  done
11743IFS=$as_save_IFS
11744
11745  ;;
11746esac
11747fi
11748GREP=$ac_cv_path_GREP
11749if test -n "$GREP"; then
11750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11751$as_echo "$GREP" >&6; }
11752else
11753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11754$as_echo "no" >&6; }
11755fi
11756
11757
11758        if test "x$GREP" = x; then
11759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11760        fi
11761      else
11762        # Otherwise we believe it is a complete path. Use it as it is.
11763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11764$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11766$as_echo_n "checking for GREP... " >&6; }
11767        if test ! -x "$tool_specified"; then
11768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11769$as_echo "not found" >&6; }
11770          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11771        fi
11772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11773$as_echo "$tool_specified" >&6; }
11774      fi
11775    fi
11776  fi
11777
11778
11779  if test "x$GREP" = x; then
11780    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11781  fi
11782
11783
11784
11785
11786  # Publish this variable in the help.
11787
11788
11789  if test "x$EGREP" = x; then
11790    # The variable is not set by user, try to locate tool using the code snippet
11791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11792$as_echo_n "checking for egrep... " >&6; }
11793if ${ac_cv_path_EGREP+:} false; then :
11794  $as_echo_n "(cached) " >&6
11795else
11796  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11797   then ac_cv_path_EGREP="$GREP -E"
11798   else
11799     if test -z "$EGREP"; then
11800  ac_path_EGREP_found=false
11801  # Loop through the user's path and test for each of PROGNAME-LIST
11802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11803for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11804do
11805  IFS=$as_save_IFS
11806  test -z "$as_dir" && as_dir=.
11807    for ac_prog in egrep; do
11808    for ac_exec_ext in '' $ac_executable_extensions; do
11809      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11810      as_fn_executable_p "$ac_path_EGREP" || continue
11811# Check for GNU ac_path_EGREP and select it if it is found.
11812  # Check for GNU $ac_path_EGREP
11813case `"$ac_path_EGREP" --version 2>&1` in
11814*GNU*)
11815  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11816*)
11817  ac_count=0
11818  $as_echo_n 0123456789 >"conftest.in"
11819  while :
11820  do
11821    cat "conftest.in" "conftest.in" >"conftest.tmp"
11822    mv "conftest.tmp" "conftest.in"
11823    cp "conftest.in" "conftest.nl"
11824    $as_echo 'EGREP' >> "conftest.nl"
11825    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11826    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11827    as_fn_arith $ac_count + 1 && ac_count=$as_val
11828    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11829      # Best one so far, save it but keep looking for a better one
11830      ac_cv_path_EGREP="$ac_path_EGREP"
11831      ac_path_EGREP_max=$ac_count
11832    fi
11833    # 10*(2^10) chars as input seems more than enough
11834    test $ac_count -gt 10 && break
11835  done
11836  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11837esac
11838
11839      $ac_path_EGREP_found && break 3
11840    done
11841  done
11842  done
11843IFS=$as_save_IFS
11844  if test -z "$ac_cv_path_EGREP"; then
11845    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11846  fi
11847else
11848  ac_cv_path_EGREP=$EGREP
11849fi
11850
11851   fi
11852fi
11853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11854$as_echo "$ac_cv_path_EGREP" >&6; }
11855 EGREP="$ac_cv_path_EGREP"
11856
11857
11858  else
11859    # The variable is set, but is it from the command line or the environment?
11860
11861    # Try to remove the string !EGREP! from our list.
11862    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11863    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11864      # If it failed, the variable was not from the command line. Ignore it,
11865      # but warn the user (except for BASH, which is always set by the calling BASH).
11866      if test "xEGREP" != xBASH; then
11867        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11868$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11869      fi
11870      # Try to locate tool using the code snippet
11871      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11872$as_echo_n "checking for egrep... " >&6; }
11873if ${ac_cv_path_EGREP+:} false; then :
11874  $as_echo_n "(cached) " >&6
11875else
11876  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11877   then ac_cv_path_EGREP="$GREP -E"
11878   else
11879     if test -z "$EGREP"; then
11880  ac_path_EGREP_found=false
11881  # Loop through the user's path and test for each of PROGNAME-LIST
11882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11883for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11884do
11885  IFS=$as_save_IFS
11886  test -z "$as_dir" && as_dir=.
11887    for ac_prog in egrep; do
11888    for ac_exec_ext in '' $ac_executable_extensions; do
11889      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11890      as_fn_executable_p "$ac_path_EGREP" || continue
11891# Check for GNU ac_path_EGREP and select it if it is found.
11892  # Check for GNU $ac_path_EGREP
11893case `"$ac_path_EGREP" --version 2>&1` in
11894*GNU*)
11895  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11896*)
11897  ac_count=0
11898  $as_echo_n 0123456789 >"conftest.in"
11899  while :
11900  do
11901    cat "conftest.in" "conftest.in" >"conftest.tmp"
11902    mv "conftest.tmp" "conftest.in"
11903    cp "conftest.in" "conftest.nl"
11904    $as_echo 'EGREP' >> "conftest.nl"
11905    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11906    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11907    as_fn_arith $ac_count + 1 && ac_count=$as_val
11908    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11909      # Best one so far, save it but keep looking for a better one
11910      ac_cv_path_EGREP="$ac_path_EGREP"
11911      ac_path_EGREP_max=$ac_count
11912    fi
11913    # 10*(2^10) chars as input seems more than enough
11914    test $ac_count -gt 10 && break
11915  done
11916  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11917esac
11918
11919      $ac_path_EGREP_found && break 3
11920    done
11921  done
11922  done
11923IFS=$as_save_IFS
11924  if test -z "$ac_cv_path_EGREP"; then
11925    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11926  fi
11927else
11928  ac_cv_path_EGREP=$EGREP
11929fi
11930
11931   fi
11932fi
11933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11934$as_echo "$ac_cv_path_EGREP" >&6; }
11935 EGREP="$ac_cv_path_EGREP"
11936
11937
11938    else
11939      # If it succeeded, then it was overridden by the user. We will use it
11940      # for the tool.
11941
11942      # First remove it from the list of overridden variables, so we can test
11943      # for unknown variables in the end.
11944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11945
11946      # Check if the provided tool contains a complete path.
11947      tool_specified="$EGREP"
11948      tool_basename="${tool_specified##*/}"
11949      if test "x$tool_basename" = "x$tool_specified"; then
11950        # A command without a complete path is provided, search $PATH.
11951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11952$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11953        # Extract the first word of "$tool_basename", so it can be a program name with args.
11954set dummy $tool_basename; ac_word=$2
11955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11956$as_echo_n "checking for $ac_word... " >&6; }
11957if ${ac_cv_path_EGREP+:} false; then :
11958  $as_echo_n "(cached) " >&6
11959else
11960  case $EGREP in
11961  [\\/]* | ?:[\\/]*)
11962  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11963  ;;
11964  *)
11965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11966for as_dir in $PATH
11967do
11968  IFS=$as_save_IFS
11969  test -z "$as_dir" && as_dir=.
11970    for ac_exec_ext in '' $ac_executable_extensions; do
11971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11972    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11974    break 2
11975  fi
11976done
11977  done
11978IFS=$as_save_IFS
11979
11980  ;;
11981esac
11982fi
11983EGREP=$ac_cv_path_EGREP
11984if test -n "$EGREP"; then
11985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11986$as_echo "$EGREP" >&6; }
11987else
11988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11989$as_echo "no" >&6; }
11990fi
11991
11992
11993        if test "x$EGREP" = x; then
11994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11995        fi
11996      else
11997        # Otherwise we believe it is a complete path. Use it as it is.
11998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
11999$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12001$as_echo_n "checking for EGREP... " >&6; }
12002        if test ! -x "$tool_specified"; then
12003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12004$as_echo "not found" >&6; }
12005          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12006        fi
12007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12008$as_echo "$tool_specified" >&6; }
12009      fi
12010    fi
12011  fi
12012
12013
12014  if test "x$EGREP" = x; then
12015    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12016  fi
12017
12018
12019
12020
12021  # Publish this variable in the help.
12022
12023
12024  if test "x$FGREP" = x; then
12025    # The variable is not set by user, try to locate tool using the code snippet
12026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12027$as_echo_n "checking for fgrep... " >&6; }
12028if ${ac_cv_path_FGREP+:} false; then :
12029  $as_echo_n "(cached) " >&6
12030else
12031  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12032   then ac_cv_path_FGREP="$GREP -F"
12033   else
12034     if test -z "$FGREP"; then
12035  ac_path_FGREP_found=false
12036  # Loop through the user's path and test for each of PROGNAME-LIST
12037  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12038for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12039do
12040  IFS=$as_save_IFS
12041  test -z "$as_dir" && as_dir=.
12042    for ac_prog in fgrep; do
12043    for ac_exec_ext in '' $ac_executable_extensions; do
12044      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12045      as_fn_executable_p "$ac_path_FGREP" || continue
12046# Check for GNU ac_path_FGREP and select it if it is found.
12047  # Check for GNU $ac_path_FGREP
12048case `"$ac_path_FGREP" --version 2>&1` in
12049*GNU*)
12050  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12051*)
12052  ac_count=0
12053  $as_echo_n 0123456789 >"conftest.in"
12054  while :
12055  do
12056    cat "conftest.in" "conftest.in" >"conftest.tmp"
12057    mv "conftest.tmp" "conftest.in"
12058    cp "conftest.in" "conftest.nl"
12059    $as_echo 'FGREP' >> "conftest.nl"
12060    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12061    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12062    as_fn_arith $ac_count + 1 && ac_count=$as_val
12063    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12064      # Best one so far, save it but keep looking for a better one
12065      ac_cv_path_FGREP="$ac_path_FGREP"
12066      ac_path_FGREP_max=$ac_count
12067    fi
12068    # 10*(2^10) chars as input seems more than enough
12069    test $ac_count -gt 10 && break
12070  done
12071  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12072esac
12073
12074      $ac_path_FGREP_found && break 3
12075    done
12076  done
12077  done
12078IFS=$as_save_IFS
12079  if test -z "$ac_cv_path_FGREP"; then
12080    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12081  fi
12082else
12083  ac_cv_path_FGREP=$FGREP
12084fi
12085
12086   fi
12087fi
12088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12089$as_echo "$ac_cv_path_FGREP" >&6; }
12090 FGREP="$ac_cv_path_FGREP"
12091
12092
12093  else
12094    # The variable is set, but is it from the command line or the environment?
12095
12096    # Try to remove the string !FGREP! from our list.
12097    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12098    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12099      # If it failed, the variable was not from the command line. Ignore it,
12100      # but warn the user (except for BASH, which is always set by the calling BASH).
12101      if test "xFGREP" != xBASH; then
12102        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12103$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12104      fi
12105      # Try to locate tool using the code snippet
12106      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12107$as_echo_n "checking for fgrep... " >&6; }
12108if ${ac_cv_path_FGREP+:} false; then :
12109  $as_echo_n "(cached) " >&6
12110else
12111  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12112   then ac_cv_path_FGREP="$GREP -F"
12113   else
12114     if test -z "$FGREP"; then
12115  ac_path_FGREP_found=false
12116  # Loop through the user's path and test for each of PROGNAME-LIST
12117  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12118for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12119do
12120  IFS=$as_save_IFS
12121  test -z "$as_dir" && as_dir=.
12122    for ac_prog in fgrep; do
12123    for ac_exec_ext in '' $ac_executable_extensions; do
12124      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12125      as_fn_executable_p "$ac_path_FGREP" || continue
12126# Check for GNU ac_path_FGREP and select it if it is found.
12127  # Check for GNU $ac_path_FGREP
12128case `"$ac_path_FGREP" --version 2>&1` in
12129*GNU*)
12130  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12131*)
12132  ac_count=0
12133  $as_echo_n 0123456789 >"conftest.in"
12134  while :
12135  do
12136    cat "conftest.in" "conftest.in" >"conftest.tmp"
12137    mv "conftest.tmp" "conftest.in"
12138    cp "conftest.in" "conftest.nl"
12139    $as_echo 'FGREP' >> "conftest.nl"
12140    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12141    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12142    as_fn_arith $ac_count + 1 && ac_count=$as_val
12143    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12144      # Best one so far, save it but keep looking for a better one
12145      ac_cv_path_FGREP="$ac_path_FGREP"
12146      ac_path_FGREP_max=$ac_count
12147    fi
12148    # 10*(2^10) chars as input seems more than enough
12149    test $ac_count -gt 10 && break
12150  done
12151  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12152esac
12153
12154      $ac_path_FGREP_found && break 3
12155    done
12156  done
12157  done
12158IFS=$as_save_IFS
12159  if test -z "$ac_cv_path_FGREP"; then
12160    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12161  fi
12162else
12163  ac_cv_path_FGREP=$FGREP
12164fi
12165
12166   fi
12167fi
12168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12169$as_echo "$ac_cv_path_FGREP" >&6; }
12170 FGREP="$ac_cv_path_FGREP"
12171
12172
12173    else
12174      # If it succeeded, then it was overridden by the user. We will use it
12175      # for the tool.
12176
12177      # First remove it from the list of overridden variables, so we can test
12178      # for unknown variables in the end.
12179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12180
12181      # Check if the provided tool contains a complete path.
12182      tool_specified="$FGREP"
12183      tool_basename="${tool_specified##*/}"
12184      if test "x$tool_basename" = "x$tool_specified"; then
12185        # A command without a complete path is provided, search $PATH.
12186        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12187$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12188        # Extract the first word of "$tool_basename", so it can be a program name with args.
12189set dummy $tool_basename; ac_word=$2
12190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12191$as_echo_n "checking for $ac_word... " >&6; }
12192if ${ac_cv_path_FGREP+:} false; then :
12193  $as_echo_n "(cached) " >&6
12194else
12195  case $FGREP in
12196  [\\/]* | ?:[\\/]*)
12197  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12198  ;;
12199  *)
12200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12201for as_dir in $PATH
12202do
12203  IFS=$as_save_IFS
12204  test -z "$as_dir" && as_dir=.
12205    for ac_exec_ext in '' $ac_executable_extensions; do
12206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12207    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12209    break 2
12210  fi
12211done
12212  done
12213IFS=$as_save_IFS
12214
12215  ;;
12216esac
12217fi
12218FGREP=$ac_cv_path_FGREP
12219if test -n "$FGREP"; then
12220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12221$as_echo "$FGREP" >&6; }
12222else
12223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12224$as_echo "no" >&6; }
12225fi
12226
12227
12228        if test "x$FGREP" = x; then
12229          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12230        fi
12231      else
12232        # Otherwise we believe it is a complete path. Use it as it is.
12233        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12234$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12236$as_echo_n "checking for FGREP... " >&6; }
12237        if test ! -x "$tool_specified"; then
12238          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12239$as_echo "not found" >&6; }
12240          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12241        fi
12242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12243$as_echo "$tool_specified" >&6; }
12244      fi
12245    fi
12246  fi
12247
12248
12249  if test "x$FGREP" = x; then
12250    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12251  fi
12252
12253
12254
12255
12256  # Publish this variable in the help.
12257
12258
12259  if test "x$SED" = x; then
12260    # The variable is not set by user, try to locate tool using the code snippet
12261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12262$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12263if ${ac_cv_path_SED+:} false; then :
12264  $as_echo_n "(cached) " >&6
12265else
12266            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12267     for ac_i in 1 2 3 4 5 6 7; do
12268       ac_script="$ac_script$as_nl$ac_script"
12269     done
12270     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12271     { ac_script=; unset ac_script;}
12272     if test -z "$SED"; then
12273  ac_path_SED_found=false
12274  # Loop through the user's path and test for each of PROGNAME-LIST
12275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12276for as_dir in $PATH
12277do
12278  IFS=$as_save_IFS
12279  test -z "$as_dir" && as_dir=.
12280    for ac_prog in sed gsed; do
12281    for ac_exec_ext in '' $ac_executable_extensions; do
12282      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12283      as_fn_executable_p "$ac_path_SED" || continue
12284# Check for GNU ac_path_SED and select it if it is found.
12285  # Check for GNU $ac_path_SED
12286case `"$ac_path_SED" --version 2>&1` in
12287*GNU*)
12288  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12289*)
12290  ac_count=0
12291  $as_echo_n 0123456789 >"conftest.in"
12292  while :
12293  do
12294    cat "conftest.in" "conftest.in" >"conftest.tmp"
12295    mv "conftest.tmp" "conftest.in"
12296    cp "conftest.in" "conftest.nl"
12297    $as_echo '' >> "conftest.nl"
12298    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12299    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12300    as_fn_arith $ac_count + 1 && ac_count=$as_val
12301    if test $ac_count -gt ${ac_path_SED_max-0}; then
12302      # Best one so far, save it but keep looking for a better one
12303      ac_cv_path_SED="$ac_path_SED"
12304      ac_path_SED_max=$ac_count
12305    fi
12306    # 10*(2^10) chars as input seems more than enough
12307    test $ac_count -gt 10 && break
12308  done
12309  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12310esac
12311
12312      $ac_path_SED_found && break 3
12313    done
12314  done
12315  done
12316IFS=$as_save_IFS
12317  if test -z "$ac_cv_path_SED"; then
12318    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12319  fi
12320else
12321  ac_cv_path_SED=$SED
12322fi
12323
12324fi
12325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12326$as_echo "$ac_cv_path_SED" >&6; }
12327 SED="$ac_cv_path_SED"
12328  rm -f conftest.sed
12329
12330  else
12331    # The variable is set, but is it from the command line or the environment?
12332
12333    # Try to remove the string !SED! from our list.
12334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12336      # If it failed, the variable was not from the command line. Ignore it,
12337      # but warn the user (except for BASH, which is always set by the calling BASH).
12338      if test "xSED" != xBASH; then
12339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12340$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12341      fi
12342      # Try to locate tool using the code snippet
12343      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12344$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12345if ${ac_cv_path_SED+:} false; then :
12346  $as_echo_n "(cached) " >&6
12347else
12348            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12349     for ac_i in 1 2 3 4 5 6 7; do
12350       ac_script="$ac_script$as_nl$ac_script"
12351     done
12352     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12353     { ac_script=; unset ac_script;}
12354     if test -z "$SED"; then
12355  ac_path_SED_found=false
12356  # Loop through the user's path and test for each of PROGNAME-LIST
12357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12358for as_dir in $PATH
12359do
12360  IFS=$as_save_IFS
12361  test -z "$as_dir" && as_dir=.
12362    for ac_prog in sed gsed; do
12363    for ac_exec_ext in '' $ac_executable_extensions; do
12364      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12365      as_fn_executable_p "$ac_path_SED" || continue
12366# Check for GNU ac_path_SED and select it if it is found.
12367  # Check for GNU $ac_path_SED
12368case `"$ac_path_SED" --version 2>&1` in
12369*GNU*)
12370  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12371*)
12372  ac_count=0
12373  $as_echo_n 0123456789 >"conftest.in"
12374  while :
12375  do
12376    cat "conftest.in" "conftest.in" >"conftest.tmp"
12377    mv "conftest.tmp" "conftest.in"
12378    cp "conftest.in" "conftest.nl"
12379    $as_echo '' >> "conftest.nl"
12380    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12381    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12382    as_fn_arith $ac_count + 1 && ac_count=$as_val
12383    if test $ac_count -gt ${ac_path_SED_max-0}; then
12384      # Best one so far, save it but keep looking for a better one
12385      ac_cv_path_SED="$ac_path_SED"
12386      ac_path_SED_max=$ac_count
12387    fi
12388    # 10*(2^10) chars as input seems more than enough
12389    test $ac_count -gt 10 && break
12390  done
12391  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12392esac
12393
12394      $ac_path_SED_found && break 3
12395    done
12396  done
12397  done
12398IFS=$as_save_IFS
12399  if test -z "$ac_cv_path_SED"; then
12400    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12401  fi
12402else
12403  ac_cv_path_SED=$SED
12404fi
12405
12406fi
12407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12408$as_echo "$ac_cv_path_SED" >&6; }
12409 SED="$ac_cv_path_SED"
12410  rm -f conftest.sed
12411
12412    else
12413      # If it succeeded, then it was overridden by the user. We will use it
12414      # for the tool.
12415
12416      # First remove it from the list of overridden variables, so we can test
12417      # for unknown variables in the end.
12418      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12419
12420      # Check if the provided tool contains a complete path.
12421      tool_specified="$SED"
12422      tool_basename="${tool_specified##*/}"
12423      if test "x$tool_basename" = "x$tool_specified"; then
12424        # A command without a complete path is provided, search $PATH.
12425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12426$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12427        # Extract the first word of "$tool_basename", so it can be a program name with args.
12428set dummy $tool_basename; ac_word=$2
12429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12430$as_echo_n "checking for $ac_word... " >&6; }
12431if ${ac_cv_path_SED+:} false; then :
12432  $as_echo_n "(cached) " >&6
12433else
12434  case $SED in
12435  [\\/]* | ?:[\\/]*)
12436  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12437  ;;
12438  *)
12439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12440for as_dir in $PATH
12441do
12442  IFS=$as_save_IFS
12443  test -z "$as_dir" && as_dir=.
12444    for ac_exec_ext in '' $ac_executable_extensions; do
12445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12446    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12448    break 2
12449  fi
12450done
12451  done
12452IFS=$as_save_IFS
12453
12454  ;;
12455esac
12456fi
12457SED=$ac_cv_path_SED
12458if test -n "$SED"; then
12459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12460$as_echo "$SED" >&6; }
12461else
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12463$as_echo "no" >&6; }
12464fi
12465
12466
12467        if test "x$SED" = x; then
12468          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12469        fi
12470      else
12471        # Otherwise we believe it is a complete path. Use it as it is.
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12473$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12474        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12475$as_echo_n "checking for SED... " >&6; }
12476        if test ! -x "$tool_specified"; then
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12478$as_echo "not found" >&6; }
12479          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12480        fi
12481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12482$as_echo "$tool_specified" >&6; }
12483      fi
12484    fi
12485  fi
12486
12487
12488  if test "x$SED" = x; then
12489    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12490  fi
12491
12492
12493
12494  # Always force rm.
12495  RM="$RM -f"
12496
12497  # pwd behaves differently on various platforms and some don't support the -L flag.
12498  # Always use the bash builtin pwd to get uniform behavior.
12499  THEPWDCMD=pwd
12500
12501  # These are not required on all platforms
12502
12503
12504  # Publish this variable in the help.
12505
12506
12507  if test "x$CYGPATH" = x; then
12508    # The variable is not set by user, try to locate tool using the code snippet
12509    for ac_prog in cygpath
12510do
12511  # Extract the first word of "$ac_prog", so it can be a program name with args.
12512set dummy $ac_prog; ac_word=$2
12513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12514$as_echo_n "checking for $ac_word... " >&6; }
12515if ${ac_cv_path_CYGPATH+:} false; then :
12516  $as_echo_n "(cached) " >&6
12517else
12518  case $CYGPATH in
12519  [\\/]* | ?:[\\/]*)
12520  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12521  ;;
12522  *)
12523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12524for as_dir in $PATH
12525do
12526  IFS=$as_save_IFS
12527  test -z "$as_dir" && as_dir=.
12528    for ac_exec_ext in '' $ac_executable_extensions; do
12529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12530    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12532    break 2
12533  fi
12534done
12535  done
12536IFS=$as_save_IFS
12537
12538  ;;
12539esac
12540fi
12541CYGPATH=$ac_cv_path_CYGPATH
12542if test -n "$CYGPATH"; then
12543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12544$as_echo "$CYGPATH" >&6; }
12545else
12546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12547$as_echo "no" >&6; }
12548fi
12549
12550
12551  test -n "$CYGPATH" && break
12552done
12553
12554  else
12555    # The variable is set, but is it from the command line or the environment?
12556
12557    # Try to remove the string !CYGPATH! from our list.
12558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12560      # If it failed, the variable was not from the command line. Ignore it,
12561      # but warn the user (except for BASH, which is always set by the calling BASH).
12562      if test "xCYGPATH" != xBASH; then
12563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12564$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12565      fi
12566      # Try to locate tool using the code snippet
12567      for ac_prog in cygpath
12568do
12569  # Extract the first word of "$ac_prog", so it can be a program name with args.
12570set dummy $ac_prog; ac_word=$2
12571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12572$as_echo_n "checking for $ac_word... " >&6; }
12573if ${ac_cv_path_CYGPATH+:} false; then :
12574  $as_echo_n "(cached) " >&6
12575else
12576  case $CYGPATH in
12577  [\\/]* | ?:[\\/]*)
12578  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12579  ;;
12580  *)
12581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12582for as_dir in $PATH
12583do
12584  IFS=$as_save_IFS
12585  test -z "$as_dir" && as_dir=.
12586    for ac_exec_ext in '' $ac_executable_extensions; do
12587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12588    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12590    break 2
12591  fi
12592done
12593  done
12594IFS=$as_save_IFS
12595
12596  ;;
12597esac
12598fi
12599CYGPATH=$ac_cv_path_CYGPATH
12600if test -n "$CYGPATH"; then
12601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12602$as_echo "$CYGPATH" >&6; }
12603else
12604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12605$as_echo "no" >&6; }
12606fi
12607
12608
12609  test -n "$CYGPATH" && break
12610done
12611
12612    else
12613      # If it succeeded, then it was overridden by the user. We will use it
12614      # for the tool.
12615
12616      # First remove it from the list of overridden variables, so we can test
12617      # for unknown variables in the end.
12618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12619
12620      # Check if the provided tool contains a complete path.
12621      tool_specified="$CYGPATH"
12622      tool_basename="${tool_specified##*/}"
12623      if test "x$tool_basename" = "x$tool_specified"; then
12624        # A command without a complete path is provided, search $PATH.
12625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12626$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12627        # Extract the first word of "$tool_basename", so it can be a program name with args.
12628set dummy $tool_basename; ac_word=$2
12629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12630$as_echo_n "checking for $ac_word... " >&6; }
12631if ${ac_cv_path_CYGPATH+:} false; then :
12632  $as_echo_n "(cached) " >&6
12633else
12634  case $CYGPATH in
12635  [\\/]* | ?:[\\/]*)
12636  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12637  ;;
12638  *)
12639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12640for as_dir in $PATH
12641do
12642  IFS=$as_save_IFS
12643  test -z "$as_dir" && as_dir=.
12644    for ac_exec_ext in '' $ac_executable_extensions; do
12645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12646    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12648    break 2
12649  fi
12650done
12651  done
12652IFS=$as_save_IFS
12653
12654  ;;
12655esac
12656fi
12657CYGPATH=$ac_cv_path_CYGPATH
12658if test -n "$CYGPATH"; then
12659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12660$as_echo "$CYGPATH" >&6; }
12661else
12662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12663$as_echo "no" >&6; }
12664fi
12665
12666
12667        if test "x$CYGPATH" = x; then
12668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12669        fi
12670      else
12671        # Otherwise we believe it is a complete path. Use it as it is.
12672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12673$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12675$as_echo_n "checking for CYGPATH... " >&6; }
12676        if test ! -x "$tool_specified"; then
12677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12678$as_echo "not found" >&6; }
12679          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12680        fi
12681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12682$as_echo "$tool_specified" >&6; }
12683      fi
12684    fi
12685  fi
12686
12687
12688
12689
12690  # Publish this variable in the help.
12691
12692
12693  if test "x$READLINK" = x; then
12694    # The variable is not set by user, try to locate tool using the code snippet
12695    for ac_prog in greadlink readlink
12696do
12697  # Extract the first word of "$ac_prog", so it can be a program name with args.
12698set dummy $ac_prog; ac_word=$2
12699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12700$as_echo_n "checking for $ac_word... " >&6; }
12701if ${ac_cv_path_READLINK+:} false; then :
12702  $as_echo_n "(cached) " >&6
12703else
12704  case $READLINK in
12705  [\\/]* | ?:[\\/]*)
12706  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12707  ;;
12708  *)
12709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12710for as_dir in $PATH
12711do
12712  IFS=$as_save_IFS
12713  test -z "$as_dir" && as_dir=.
12714    for ac_exec_ext in '' $ac_executable_extensions; do
12715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12716    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12718    break 2
12719  fi
12720done
12721  done
12722IFS=$as_save_IFS
12723
12724  ;;
12725esac
12726fi
12727READLINK=$ac_cv_path_READLINK
12728if test -n "$READLINK"; then
12729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12730$as_echo "$READLINK" >&6; }
12731else
12732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12733$as_echo "no" >&6; }
12734fi
12735
12736
12737  test -n "$READLINK" && break
12738done
12739
12740  else
12741    # The variable is set, but is it from the command line or the environment?
12742
12743    # Try to remove the string !READLINK! from our list.
12744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12746      # If it failed, the variable was not from the command line. Ignore it,
12747      # but warn the user (except for BASH, which is always set by the calling BASH).
12748      if test "xREADLINK" != xBASH; then
12749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12750$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12751      fi
12752      # Try to locate tool using the code snippet
12753      for ac_prog in greadlink readlink
12754do
12755  # Extract the first word of "$ac_prog", so it can be a program name with args.
12756set dummy $ac_prog; ac_word=$2
12757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12758$as_echo_n "checking for $ac_word... " >&6; }
12759if ${ac_cv_path_READLINK+:} false; then :
12760  $as_echo_n "(cached) " >&6
12761else
12762  case $READLINK in
12763  [\\/]* | ?:[\\/]*)
12764  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12765  ;;
12766  *)
12767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12768for as_dir in $PATH
12769do
12770  IFS=$as_save_IFS
12771  test -z "$as_dir" && as_dir=.
12772    for ac_exec_ext in '' $ac_executable_extensions; do
12773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12774    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12776    break 2
12777  fi
12778done
12779  done
12780IFS=$as_save_IFS
12781
12782  ;;
12783esac
12784fi
12785READLINK=$ac_cv_path_READLINK
12786if test -n "$READLINK"; then
12787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12788$as_echo "$READLINK" >&6; }
12789else
12790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12791$as_echo "no" >&6; }
12792fi
12793
12794
12795  test -n "$READLINK" && break
12796done
12797
12798    else
12799      # If it succeeded, then it was overridden by the user. We will use it
12800      # for the tool.
12801
12802      # First remove it from the list of overridden variables, so we can test
12803      # for unknown variables in the end.
12804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12805
12806      # Check if the provided tool contains a complete path.
12807      tool_specified="$READLINK"
12808      tool_basename="${tool_specified##*/}"
12809      if test "x$tool_basename" = "x$tool_specified"; then
12810        # A command without a complete path is provided, search $PATH.
12811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12812$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12813        # Extract the first word of "$tool_basename", so it can be a program name with args.
12814set dummy $tool_basename; ac_word=$2
12815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12816$as_echo_n "checking for $ac_word... " >&6; }
12817if ${ac_cv_path_READLINK+:} false; then :
12818  $as_echo_n "(cached) " >&6
12819else
12820  case $READLINK in
12821  [\\/]* | ?:[\\/]*)
12822  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12823  ;;
12824  *)
12825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12826for as_dir in $PATH
12827do
12828  IFS=$as_save_IFS
12829  test -z "$as_dir" && as_dir=.
12830    for ac_exec_ext in '' $ac_executable_extensions; do
12831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12832    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12834    break 2
12835  fi
12836done
12837  done
12838IFS=$as_save_IFS
12839
12840  ;;
12841esac
12842fi
12843READLINK=$ac_cv_path_READLINK
12844if test -n "$READLINK"; then
12845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12846$as_echo "$READLINK" >&6; }
12847else
12848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12849$as_echo "no" >&6; }
12850fi
12851
12852
12853        if test "x$READLINK" = x; then
12854          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12855        fi
12856      else
12857        # Otherwise we believe it is a complete path. Use it as it is.
12858        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12859$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12860        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12861$as_echo_n "checking for READLINK... " >&6; }
12862        if test ! -x "$tool_specified"; then
12863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12864$as_echo "not found" >&6; }
12865          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12866        fi
12867        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12868$as_echo "$tool_specified" >&6; }
12869      fi
12870    fi
12871  fi
12872
12873
12874
12875
12876  # Publish this variable in the help.
12877
12878
12879  if test "x$DF" = x; then
12880    # The variable is not set by user, try to locate tool using the code snippet
12881    for ac_prog in df
12882do
12883  # Extract the first word of "$ac_prog", so it can be a program name with args.
12884set dummy $ac_prog; ac_word=$2
12885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12886$as_echo_n "checking for $ac_word... " >&6; }
12887if ${ac_cv_path_DF+:} false; then :
12888  $as_echo_n "(cached) " >&6
12889else
12890  case $DF in
12891  [\\/]* | ?:[\\/]*)
12892  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12893  ;;
12894  *)
12895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12896for as_dir in $PATH
12897do
12898  IFS=$as_save_IFS
12899  test -z "$as_dir" && as_dir=.
12900    for ac_exec_ext in '' $ac_executable_extensions; do
12901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12902    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12904    break 2
12905  fi
12906done
12907  done
12908IFS=$as_save_IFS
12909
12910  ;;
12911esac
12912fi
12913DF=$ac_cv_path_DF
12914if test -n "$DF"; then
12915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12916$as_echo "$DF" >&6; }
12917else
12918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12919$as_echo "no" >&6; }
12920fi
12921
12922
12923  test -n "$DF" && break
12924done
12925
12926  else
12927    # The variable is set, but is it from the command line or the environment?
12928
12929    # Try to remove the string !DF! from our list.
12930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12932      # If it failed, the variable was not from the command line. Ignore it,
12933      # but warn the user (except for BASH, which is always set by the calling BASH).
12934      if test "xDF" != xBASH; then
12935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12936$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12937      fi
12938      # Try to locate tool using the code snippet
12939      for ac_prog in df
12940do
12941  # Extract the first word of "$ac_prog", so it can be a program name with args.
12942set dummy $ac_prog; ac_word=$2
12943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12944$as_echo_n "checking for $ac_word... " >&6; }
12945if ${ac_cv_path_DF+:} false; then :
12946  $as_echo_n "(cached) " >&6
12947else
12948  case $DF in
12949  [\\/]* | ?:[\\/]*)
12950  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12951  ;;
12952  *)
12953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12954for as_dir in $PATH
12955do
12956  IFS=$as_save_IFS
12957  test -z "$as_dir" && as_dir=.
12958    for ac_exec_ext in '' $ac_executable_extensions; do
12959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12960    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12962    break 2
12963  fi
12964done
12965  done
12966IFS=$as_save_IFS
12967
12968  ;;
12969esac
12970fi
12971DF=$ac_cv_path_DF
12972if test -n "$DF"; then
12973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12974$as_echo "$DF" >&6; }
12975else
12976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12977$as_echo "no" >&6; }
12978fi
12979
12980
12981  test -n "$DF" && break
12982done
12983
12984    else
12985      # If it succeeded, then it was overridden by the user. We will use it
12986      # for the tool.
12987
12988      # First remove it from the list of overridden variables, so we can test
12989      # for unknown variables in the end.
12990      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12991
12992      # Check if the provided tool contains a complete path.
12993      tool_specified="$DF"
12994      tool_basename="${tool_specified##*/}"
12995      if test "x$tool_basename" = "x$tool_specified"; then
12996        # A command without a complete path is provided, search $PATH.
12997        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12998$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
12999        # Extract the first word of "$tool_basename", so it can be a program name with args.
13000set dummy $tool_basename; ac_word=$2
13001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13002$as_echo_n "checking for $ac_word... " >&6; }
13003if ${ac_cv_path_DF+:} false; then :
13004  $as_echo_n "(cached) " >&6
13005else
13006  case $DF in
13007  [\\/]* | ?:[\\/]*)
13008  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13009  ;;
13010  *)
13011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13012for as_dir in $PATH
13013do
13014  IFS=$as_save_IFS
13015  test -z "$as_dir" && as_dir=.
13016    for ac_exec_ext in '' $ac_executable_extensions; do
13017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13018    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13020    break 2
13021  fi
13022done
13023  done
13024IFS=$as_save_IFS
13025
13026  ;;
13027esac
13028fi
13029DF=$ac_cv_path_DF
13030if test -n "$DF"; then
13031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13032$as_echo "$DF" >&6; }
13033else
13034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13035$as_echo "no" >&6; }
13036fi
13037
13038
13039        if test "x$DF" = x; then
13040          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13041        fi
13042      else
13043        # Otherwise we believe it is a complete path. Use it as it is.
13044        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13045$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13046        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13047$as_echo_n "checking for DF... " >&6; }
13048        if test ! -x "$tool_specified"; then
13049          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13050$as_echo "not found" >&6; }
13051          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13052        fi
13053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13054$as_echo "$tool_specified" >&6; }
13055      fi
13056    fi
13057  fi
13058
13059
13060
13061
13062  # Publish this variable in the help.
13063
13064
13065  if test "x$SETFILE" = x; then
13066    # The variable is not set by user, try to locate tool using the code snippet
13067    for ac_prog in SetFile
13068do
13069  # Extract the first word of "$ac_prog", so it can be a program name with args.
13070set dummy $ac_prog; ac_word=$2
13071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13072$as_echo_n "checking for $ac_word... " >&6; }
13073if ${ac_cv_path_SETFILE+:} false; then :
13074  $as_echo_n "(cached) " >&6
13075else
13076  case $SETFILE in
13077  [\\/]* | ?:[\\/]*)
13078  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13079  ;;
13080  *)
13081  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13082for as_dir in $PATH
13083do
13084  IFS=$as_save_IFS
13085  test -z "$as_dir" && as_dir=.
13086    for ac_exec_ext in '' $ac_executable_extensions; do
13087  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13088    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13089    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13090    break 2
13091  fi
13092done
13093  done
13094IFS=$as_save_IFS
13095
13096  ;;
13097esac
13098fi
13099SETFILE=$ac_cv_path_SETFILE
13100if test -n "$SETFILE"; then
13101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13102$as_echo "$SETFILE" >&6; }
13103else
13104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13105$as_echo "no" >&6; }
13106fi
13107
13108
13109  test -n "$SETFILE" && break
13110done
13111
13112  else
13113    # The variable is set, but is it from the command line or the environment?
13114
13115    # Try to remove the string !SETFILE! from our list.
13116    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13117    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13118      # If it failed, the variable was not from the command line. Ignore it,
13119      # but warn the user (except for BASH, which is always set by the calling BASH).
13120      if test "xSETFILE" != xBASH; then
13121        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13122$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13123      fi
13124      # Try to locate tool using the code snippet
13125      for ac_prog in SetFile
13126do
13127  # Extract the first word of "$ac_prog", so it can be a program name with args.
13128set dummy $ac_prog; ac_word=$2
13129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13130$as_echo_n "checking for $ac_word... " >&6; }
13131if ${ac_cv_path_SETFILE+:} false; then :
13132  $as_echo_n "(cached) " >&6
13133else
13134  case $SETFILE in
13135  [\\/]* | ?:[\\/]*)
13136  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13137  ;;
13138  *)
13139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140for as_dir in $PATH
13141do
13142  IFS=$as_save_IFS
13143  test -z "$as_dir" && as_dir=.
13144    for ac_exec_ext in '' $ac_executable_extensions; do
13145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13146    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13148    break 2
13149  fi
13150done
13151  done
13152IFS=$as_save_IFS
13153
13154  ;;
13155esac
13156fi
13157SETFILE=$ac_cv_path_SETFILE
13158if test -n "$SETFILE"; then
13159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13160$as_echo "$SETFILE" >&6; }
13161else
13162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13163$as_echo "no" >&6; }
13164fi
13165
13166
13167  test -n "$SETFILE" && break
13168done
13169
13170    else
13171      # If it succeeded, then it was overridden by the user. We will use it
13172      # for the tool.
13173
13174      # First remove it from the list of overridden variables, so we can test
13175      # for unknown variables in the end.
13176      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13177
13178      # Check if the provided tool contains a complete path.
13179      tool_specified="$SETFILE"
13180      tool_basename="${tool_specified##*/}"
13181      if test "x$tool_basename" = "x$tool_specified"; then
13182        # A command without a complete path is provided, search $PATH.
13183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13184$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13185        # Extract the first word of "$tool_basename", so it can be a program name with args.
13186set dummy $tool_basename; ac_word=$2
13187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13188$as_echo_n "checking for $ac_word... " >&6; }
13189if ${ac_cv_path_SETFILE+:} false; then :
13190  $as_echo_n "(cached) " >&6
13191else
13192  case $SETFILE in
13193  [\\/]* | ?:[\\/]*)
13194  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13195  ;;
13196  *)
13197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13198for as_dir in $PATH
13199do
13200  IFS=$as_save_IFS
13201  test -z "$as_dir" && as_dir=.
13202    for ac_exec_ext in '' $ac_executable_extensions; do
13203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13204    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13206    break 2
13207  fi
13208done
13209  done
13210IFS=$as_save_IFS
13211
13212  ;;
13213esac
13214fi
13215SETFILE=$ac_cv_path_SETFILE
13216if test -n "$SETFILE"; then
13217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13218$as_echo "$SETFILE" >&6; }
13219else
13220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13221$as_echo "no" >&6; }
13222fi
13223
13224
13225        if test "x$SETFILE" = x; then
13226          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13227        fi
13228      else
13229        # Otherwise we believe it is a complete path. Use it as it is.
13230        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13231$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13232        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13233$as_echo_n "checking for SETFILE... " >&6; }
13234        if test ! -x "$tool_specified"; then
13235          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13236$as_echo "not found" >&6; }
13237          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13238        fi
13239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13240$as_echo "$tool_specified" >&6; }
13241      fi
13242    fi
13243  fi
13244
13245
13246
13247
13248  # Publish this variable in the help.
13249
13250
13251  if test "x$CPIO" = x; then
13252    # The variable is not set by user, try to locate tool using the code snippet
13253    for ac_prog in cpio bsdcpio
13254do
13255  # Extract the first word of "$ac_prog", so it can be a program name with args.
13256set dummy $ac_prog; ac_word=$2
13257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13258$as_echo_n "checking for $ac_word... " >&6; }
13259if ${ac_cv_path_CPIO+:} false; then :
13260  $as_echo_n "(cached) " >&6
13261else
13262  case $CPIO in
13263  [\\/]* | ?:[\\/]*)
13264  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13265  ;;
13266  *)
13267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13268for as_dir in $PATH
13269do
13270  IFS=$as_save_IFS
13271  test -z "$as_dir" && as_dir=.
13272    for ac_exec_ext in '' $ac_executable_extensions; do
13273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13274    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13276    break 2
13277  fi
13278done
13279  done
13280IFS=$as_save_IFS
13281
13282  ;;
13283esac
13284fi
13285CPIO=$ac_cv_path_CPIO
13286if test -n "$CPIO"; then
13287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13288$as_echo "$CPIO" >&6; }
13289else
13290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291$as_echo "no" >&6; }
13292fi
13293
13294
13295  test -n "$CPIO" && break
13296done
13297
13298  else
13299    # The variable is set, but is it from the command line or the environment?
13300
13301    # Try to remove the string !CPIO! from our list.
13302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13304      # If it failed, the variable was not from the command line. Ignore it,
13305      # but warn the user (except for BASH, which is always set by the calling BASH).
13306      if test "xCPIO" != xBASH; then
13307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13308$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13309      fi
13310      # Try to locate tool using the code snippet
13311      for ac_prog in cpio bsdcpio
13312do
13313  # Extract the first word of "$ac_prog", so it can be a program name with args.
13314set dummy $ac_prog; ac_word=$2
13315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13316$as_echo_n "checking for $ac_word... " >&6; }
13317if ${ac_cv_path_CPIO+:} false; then :
13318  $as_echo_n "(cached) " >&6
13319else
13320  case $CPIO in
13321  [\\/]* | ?:[\\/]*)
13322  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13323  ;;
13324  *)
13325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13326for as_dir in $PATH
13327do
13328  IFS=$as_save_IFS
13329  test -z "$as_dir" && as_dir=.
13330    for ac_exec_ext in '' $ac_executable_extensions; do
13331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13332    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13334    break 2
13335  fi
13336done
13337  done
13338IFS=$as_save_IFS
13339
13340  ;;
13341esac
13342fi
13343CPIO=$ac_cv_path_CPIO
13344if test -n "$CPIO"; then
13345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13346$as_echo "$CPIO" >&6; }
13347else
13348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13349$as_echo "no" >&6; }
13350fi
13351
13352
13353  test -n "$CPIO" && break
13354done
13355
13356    else
13357      # If it succeeded, then it was overridden by the user. We will use it
13358      # for the tool.
13359
13360      # First remove it from the list of overridden variables, so we can test
13361      # for unknown variables in the end.
13362      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13363
13364      # Check if the provided tool contains a complete path.
13365      tool_specified="$CPIO"
13366      tool_basename="${tool_specified##*/}"
13367      if test "x$tool_basename" = "x$tool_specified"; then
13368        # A command without a complete path is provided, search $PATH.
13369        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13370$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13371        # Extract the first word of "$tool_basename", so it can be a program name with args.
13372set dummy $tool_basename; ac_word=$2
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13374$as_echo_n "checking for $ac_word... " >&6; }
13375if ${ac_cv_path_CPIO+:} false; then :
13376  $as_echo_n "(cached) " >&6
13377else
13378  case $CPIO in
13379  [\\/]* | ?:[\\/]*)
13380  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13381  ;;
13382  *)
13383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13384for as_dir in $PATH
13385do
13386  IFS=$as_save_IFS
13387  test -z "$as_dir" && as_dir=.
13388    for ac_exec_ext in '' $ac_executable_extensions; do
13389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13390    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13392    break 2
13393  fi
13394done
13395  done
13396IFS=$as_save_IFS
13397
13398  ;;
13399esac
13400fi
13401CPIO=$ac_cv_path_CPIO
13402if test -n "$CPIO"; then
13403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13404$as_echo "$CPIO" >&6; }
13405else
13406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13407$as_echo "no" >&6; }
13408fi
13409
13410
13411        if test "x$CPIO" = x; then
13412          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13413        fi
13414      else
13415        # Otherwise we believe it is a complete path. Use it as it is.
13416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13417$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13419$as_echo_n "checking for CPIO... " >&6; }
13420        if test ! -x "$tool_specified"; then
13421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13422$as_echo "not found" >&6; }
13423          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13424        fi
13425        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13426$as_echo "$tool_specified" >&6; }
13427      fi
13428    fi
13429  fi
13430
13431
13432
13433
13434# Now we can determine OpenJDK build and target platforms. This is required to
13435# have early on.
13436# Make sure we can run config.sub.
13437$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13438  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13439
13440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13441$as_echo_n "checking build system type... " >&6; }
13442if ${ac_cv_build+:} false; then :
13443  $as_echo_n "(cached) " >&6
13444else
13445  ac_build_alias=$build_alias
13446test "x$ac_build_alias" = x &&
13447  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13448test "x$ac_build_alias" = x &&
13449  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13450ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13451  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13452
13453fi
13454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13455$as_echo "$ac_cv_build" >&6; }
13456case $ac_cv_build in
13457*-*-*) ;;
13458*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13459esac
13460build=$ac_cv_build
13461ac_save_IFS=$IFS; IFS='-'
13462set x $ac_cv_build
13463shift
13464build_cpu=$1
13465build_vendor=$2
13466shift; shift
13467# Remember, the first character of IFS is used to create $*,
13468# except with old shells:
13469build_os=$*
13470IFS=$ac_save_IFS
13471case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13472
13473
13474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13475$as_echo_n "checking host system type... " >&6; }
13476if ${ac_cv_host+:} false; then :
13477  $as_echo_n "(cached) " >&6
13478else
13479  if test "x$host_alias" = x; then
13480  ac_cv_host=$ac_cv_build
13481else
13482  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13483    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13484fi
13485
13486fi
13487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13488$as_echo "$ac_cv_host" >&6; }
13489case $ac_cv_host in
13490*-*-*) ;;
13491*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13492esac
13493host=$ac_cv_host
13494ac_save_IFS=$IFS; IFS='-'
13495set x $ac_cv_host
13496shift
13497host_cpu=$1
13498host_vendor=$2
13499shift; shift
13500# Remember, the first character of IFS is used to create $*,
13501# except with old shells:
13502host_os=$*
13503IFS=$ac_save_IFS
13504case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13505
13506
13507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13508$as_echo_n "checking target system type... " >&6; }
13509if ${ac_cv_target+:} false; then :
13510  $as_echo_n "(cached) " >&6
13511else
13512  if test "x$target_alias" = x; then
13513  ac_cv_target=$ac_cv_host
13514else
13515  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13516    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13517fi
13518
13519fi
13520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13521$as_echo "$ac_cv_target" >&6; }
13522case $ac_cv_target in
13523*-*-*) ;;
13524*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13525esac
13526target=$ac_cv_target
13527ac_save_IFS=$IFS; IFS='-'
13528set x $ac_cv_target
13529shift
13530target_cpu=$1
13531target_vendor=$2
13532shift; shift
13533# Remember, the first character of IFS is used to create $*,
13534# except with old shells:
13535target_os=$*
13536IFS=$ac_save_IFS
13537case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13538
13539
13540# The aliases save the names the user supplied, while $host etc.
13541# will get canonicalized.
13542test -n "$target_alias" &&
13543  test "$program_prefix$program_suffix$program_transform_name" = \
13544    NONENONEs,x,x, &&
13545  program_prefix=${target_alias}-
13546
13547  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13548  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13549  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13550  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13551  # to use the configure naming style.
13552
13553
13554
13555
13556
13557  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13558  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13559  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13560  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13561  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13562  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13563
13564
13565
13566  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13567
13568  case "$build_os" in
13569    *linux*)
13570      VAR_OS=linux
13571      VAR_OS_TYPE=unix
13572      ;;
13573    *solaris*)
13574      VAR_OS=solaris
13575      VAR_OS_TYPE=unix
13576      ;;
13577    *darwin*)
13578      VAR_OS=macosx
13579      VAR_OS_TYPE=unix
13580      ;;
13581    *bsd*)
13582      VAR_OS=bsd
13583      VAR_OS_TYPE=unix
13584      ;;
13585    *cygwin*)
13586      VAR_OS=windows
13587      VAR_OS_ENV=windows.cygwin
13588      ;;
13589    *mingw*)
13590      VAR_OS=windows
13591      VAR_OS_ENV=windows.msys
13592      ;;
13593    *aix*)
13594      VAR_OS=aix
13595      VAR_OS_TYPE=unix
13596      ;;
13597    *)
13598      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13599      ;;
13600  esac
13601
13602
13603  # First argument is the cpu name from the trip/quad
13604  case "$build_cpu" in
13605    x86_64)
13606      VAR_CPU=x86_64
13607      VAR_CPU_ARCH=x86
13608      VAR_CPU_BITS=64
13609      VAR_CPU_ENDIAN=little
13610      ;;
13611    i?86)
13612      VAR_CPU=x86
13613      VAR_CPU_ARCH=x86
13614      VAR_CPU_BITS=32
13615      VAR_CPU_ENDIAN=little
13616      ;;
13617    arm*)
13618      VAR_CPU=arm
13619      VAR_CPU_ARCH=arm
13620      VAR_CPU_BITS=32
13621      VAR_CPU_ENDIAN=little
13622      ;;
13623    aarch64)
13624      VAR_CPU=aarch64
13625      VAR_CPU_ARCH=aarch64
13626      VAR_CPU_BITS=64
13627      VAR_CPU_ENDIAN=little
13628      ;;
13629    powerpc)
13630      VAR_CPU=ppc
13631      VAR_CPU_ARCH=ppc
13632      VAR_CPU_BITS=32
13633      VAR_CPU_ENDIAN=big
13634      ;;
13635    powerpc64)
13636      VAR_CPU=ppc64
13637      VAR_CPU_ARCH=ppc
13638      VAR_CPU_BITS=64
13639      VAR_CPU_ENDIAN=big
13640      ;;
13641    powerpc64le)
13642      VAR_CPU=ppc64
13643      VAR_CPU_ARCH=ppc
13644      VAR_CPU_BITS=64
13645      VAR_CPU_ENDIAN=little
13646      ;;
13647    s390)
13648      VAR_CPU=s390
13649      VAR_CPU_ARCH=s390
13650      VAR_CPU_BITS=32
13651      VAR_CPU_ENDIAN=big
13652      ;;
13653    s390x)
13654      VAR_CPU=s390x
13655      VAR_CPU_ARCH=s390
13656      VAR_CPU_BITS=64
13657      VAR_CPU_ENDIAN=big
13658      ;;
13659    sparc)
13660      VAR_CPU=sparc
13661      VAR_CPU_ARCH=sparc
13662      VAR_CPU_BITS=32
13663      VAR_CPU_ENDIAN=big
13664      ;;
13665    sparcv9|sparc64)
13666      VAR_CPU=sparcv9
13667      VAR_CPU_ARCH=sparc
13668      VAR_CPU_BITS=64
13669      VAR_CPU_ENDIAN=big
13670      ;;
13671    *)
13672      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13673      ;;
13674  esac
13675
13676  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13677  OPENJDK_BUILD_OS="$VAR_OS"
13678  if test "x$VAR_OS_TYPE" != x; then
13679    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13680  else
13681    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13682  fi
13683  if test "x$VAR_OS_ENV" != x; then
13684    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13685  else
13686    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13687  fi
13688  OPENJDK_BUILD_CPU="$VAR_CPU"
13689  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13690  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13691  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13692
13693
13694
13695
13696
13697
13698
13699
13700  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13701$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13703$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13704
13705  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13706
13707  case "$host_os" in
13708    *linux*)
13709      VAR_OS=linux
13710      VAR_OS_TYPE=unix
13711      ;;
13712    *solaris*)
13713      VAR_OS=solaris
13714      VAR_OS_TYPE=unix
13715      ;;
13716    *darwin*)
13717      VAR_OS=macosx
13718      VAR_OS_TYPE=unix
13719      ;;
13720    *bsd*)
13721      VAR_OS=bsd
13722      VAR_OS_TYPE=unix
13723      ;;
13724    *cygwin*)
13725      VAR_OS=windows
13726      VAR_OS_ENV=windows.cygwin
13727      ;;
13728    *mingw*)
13729      VAR_OS=windows
13730      VAR_OS_ENV=windows.msys
13731      ;;
13732    *aix*)
13733      VAR_OS=aix
13734      VAR_OS_TYPE=unix
13735      ;;
13736    *)
13737      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13738      ;;
13739  esac
13740
13741
13742  # First argument is the cpu name from the trip/quad
13743  case "$host_cpu" in
13744    x86_64)
13745      VAR_CPU=x86_64
13746      VAR_CPU_ARCH=x86
13747      VAR_CPU_BITS=64
13748      VAR_CPU_ENDIAN=little
13749      ;;
13750    i?86)
13751      VAR_CPU=x86
13752      VAR_CPU_ARCH=x86
13753      VAR_CPU_BITS=32
13754      VAR_CPU_ENDIAN=little
13755      ;;
13756    arm*)
13757      VAR_CPU=arm
13758      VAR_CPU_ARCH=arm
13759      VAR_CPU_BITS=32
13760      VAR_CPU_ENDIAN=little
13761      ;;
13762    aarch64)
13763      VAR_CPU=aarch64
13764      VAR_CPU_ARCH=aarch64
13765      VAR_CPU_BITS=64
13766      VAR_CPU_ENDIAN=little
13767      ;;
13768    powerpc)
13769      VAR_CPU=ppc
13770      VAR_CPU_ARCH=ppc
13771      VAR_CPU_BITS=32
13772      VAR_CPU_ENDIAN=big
13773      ;;
13774    powerpc64)
13775      VAR_CPU=ppc64
13776      VAR_CPU_ARCH=ppc
13777      VAR_CPU_BITS=64
13778      VAR_CPU_ENDIAN=big
13779      ;;
13780    powerpc64le)
13781      VAR_CPU=ppc64
13782      VAR_CPU_ARCH=ppc
13783      VAR_CPU_BITS=64
13784      VAR_CPU_ENDIAN=little
13785      ;;
13786    s390)
13787      VAR_CPU=s390
13788      VAR_CPU_ARCH=s390
13789      VAR_CPU_BITS=32
13790      VAR_CPU_ENDIAN=big
13791      ;;
13792    s390x)
13793      VAR_CPU=s390x
13794      VAR_CPU_ARCH=s390
13795      VAR_CPU_BITS=64
13796      VAR_CPU_ENDIAN=big
13797      ;;
13798    sparc)
13799      VAR_CPU=sparc
13800      VAR_CPU_ARCH=sparc
13801      VAR_CPU_BITS=32
13802      VAR_CPU_ENDIAN=big
13803      ;;
13804    sparcv9|sparc64)
13805      VAR_CPU=sparcv9
13806      VAR_CPU_ARCH=sparc
13807      VAR_CPU_BITS=64
13808      VAR_CPU_ENDIAN=big
13809      ;;
13810    *)
13811      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13812      ;;
13813  esac
13814
13815  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13816  OPENJDK_TARGET_OS="$VAR_OS"
13817  if test "x$VAR_OS_TYPE" != x; then
13818    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13819  else
13820    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13821  fi
13822  if test "x$VAR_OS_ENV" != x; then
13823    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13824  else
13825    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13826  fi
13827  OPENJDK_TARGET_CPU="$VAR_CPU"
13828  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13829  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13830  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13831
13832
13833
13834
13835
13836
13837
13838
13839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13840$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13842$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13843
13844
13845
13846# Check whether --with-target-bits was given.
13847if test "${with_target_bits+set}" = set; then :
13848  withval=$with_target_bits;
13849fi
13850
13851
13852  # We have three types of compiles:
13853  # native  == normal compilation, target system == build system
13854  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13855  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13856  #
13857  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13858    # We're doing a proper cross-compilation
13859    COMPILE_TYPE="cross"
13860  else
13861    COMPILE_TYPE="native"
13862  fi
13863
13864  if test "x$with_target_bits" != x; then
13865    if test "x$COMPILE_TYPE" = "xcross"; then
13866      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13867    fi
13868
13869    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13870      # A reduced build is requested
13871      COMPILE_TYPE="reduced"
13872      OPENJDK_TARGET_CPU_BITS=32
13873      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13874        OPENJDK_TARGET_CPU=x86
13875      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13876        OPENJDK_TARGET_CPU=sparc
13877      else
13878        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13879      fi
13880    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13881      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
13882    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13883      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13884$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13885    else
13886      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13887    fi
13888  fi
13889
13890
13891  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13892$as_echo_n "checking compilation type... " >&6; }
13893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13894$as_echo "$COMPILE_TYPE" >&6; }
13895
13896
13897  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13898    REQUIRED_OS_NAME=SunOS
13899    REQUIRED_OS_VERSION=5.10
13900  fi
13901  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13902    REQUIRED_OS_NAME=Linux
13903    REQUIRED_OS_VERSION=2.6
13904  fi
13905  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13906    REQUIRED_OS_NAME=Windows
13907    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13908      REQUIRED_OS_VERSION=5.2
13909    else
13910      REQUIRED_OS_VERSION=5.1
13911    fi
13912  fi
13913  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13914    REQUIRED_OS_NAME=Darwin
13915    REQUIRED_OS_VERSION=11.2
13916  fi
13917
13918
13919
13920
13921
13922  # Also store the legacy naming of the cpu.
13923  # Ie i586 and amd64 instead of x86 and x86_64
13924  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13925  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13926    OPENJDK_TARGET_CPU_LEGACY="i586"
13927  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13928    # On all platforms except MacOSX replace x86_64 with amd64.
13929    OPENJDK_TARGET_CPU_LEGACY="amd64"
13930  fi
13931
13932
13933  # And the second legacy naming of the cpu.
13934  # Ie i386 and amd64 instead of x86 and x86_64.
13935  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13936  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13937    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13938  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13939    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13940  fi
13941
13942
13943  # This is the name of the cpu (but using i386 and amd64 instead of
13944  # x86 and x86_64, respectively), preceeded by a /, to be used when
13945  # locating libraries. On macosx, it's empty, though.
13946  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13947  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13948    OPENJDK_TARGET_CPU_LIBDIR=""
13949  fi
13950
13951
13952  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13953  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13954  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13955  OPENJDK_TARGET_CPU_ISADIR=""
13956  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13957    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13958      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13959    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13960      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13961    fi
13962  fi
13963
13964
13965  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13966  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13967  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13968    # On linux only, we replace x86 with i386.
13969    OPENJDK_TARGET_CPU_OSARCH="i386"
13970  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13971    # On all platforms except macosx, we replace x86_64 with amd64.
13972    OPENJDK_TARGET_CPU_OSARCH="amd64"
13973  fi
13974
13975
13976  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13977  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13978    OPENJDK_TARGET_CPU_JLI="i386"
13979  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13980    # On all platforms except macosx, we replace x86_64 with amd64.
13981    OPENJDK_TARGET_CPU_JLI="amd64"
13982  fi
13983  # Now setup the -D flags for building libjli.
13984  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13985  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13986    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13987      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13988    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13989      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13990    fi
13991  fi
13992
13993
13994  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13995      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13996  else
13997      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13998  fi
13999
14000
14001  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14002    A_LP64="LP64:="
14003    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14004    # unpack200.exe
14005    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14006      ADD_LP64="-D_LP64=1"
14007    fi
14008  fi
14009  LP64=$A_LP64
14010
14011
14012  if test "x$COMPILE_TYPE" = "xcross"; then
14013    # FIXME: ... or should this include reduced builds..?
14014    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14015  else
14016    DEFINE_CROSS_COMPILE_ARCH=""
14017  fi
14018
14019
14020  # ZERO_ARCHDEF is used to enable architecture-specific code
14021  case "${OPENJDK_TARGET_CPU}" in
14022    ppc)     ZERO_ARCHDEF=PPC32 ;;
14023    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14024    s390*)   ZERO_ARCHDEF=S390  ;;
14025    sparc*)  ZERO_ARCHDEF=SPARC ;;
14026    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14027    x86)     ZERO_ARCHDEF=IA32  ;;
14028    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14029  esac
14030
14031
14032
14033
14034# Continue setting up basic stuff. Most remaining code require fundamental tools.
14035
14036  # Save the current directory this script was started from
14037  CURDIR="$PWD"
14038
14039  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14040    PATH_SEP=";"
14041
14042  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14043  if test $SRC_ROOT_LENGTH -gt 100; then
14044    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14045  fi
14046
14047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14049$as_echo_n "checking cygwin release... " >&6; }
14050    CYGWIN_VERSION=`$UNAME -r`
14051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14052$as_echo "$CYGWIN_VERSION" >&6; }
14053    WINDOWS_ENV_VENDOR='cygwin'
14054    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14055
14056    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14057    if test "x$CYGWIN_VERSION_OK" = x; then
14058      { $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
14059$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;}
14060      as_fn_error $? "Cannot continue" "$LINENO" 5
14061    fi
14062    if test "x$CYGPATH" = x; then
14063      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14064    fi
14065    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14066$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14067    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14068    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14069    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14070    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14071    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14072$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14073    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14074    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14075    if test "x$test_cygdrive_prefix" = x; then
14076      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14077    fi
14078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14079    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14080$as_echo_n "checking msys release... " >&6; }
14081    MSYS_VERSION=`$UNAME -r`
14082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14083$as_echo "$MSYS_VERSION" >&6; }
14084
14085    WINDOWS_ENV_VENDOR='msys'
14086    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14087
14088    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14089$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14090    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14091    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14092
14093  windows_path="$MSYS_ROOT_PATH"
14094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14095    unix_path=`$CYGPATH -u "$windows_path"`
14096    MSYS_ROOT_PATH="$unix_path"
14097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14099    MSYS_ROOT_PATH="$unix_path"
14100  fi
14101
14102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14103$as_echo "$MSYS_ROOT_PATH" >&6; }
14104    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14105  else
14106    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14107  fi
14108
14109  # Test if windows or unix (cygwin/msys) find is first in path.
14110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14111$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14112  FIND_BINARY_OUTPUT=`find --version 2>&1`
14113  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14114    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14115$as_echo "unix style" >&6; }
14116  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14117    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14118$as_echo "Windows" >&6; }
14119    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14120$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14121    { $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
14122$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14123    as_fn_error $? "Cannot continue" "$LINENO" 5
14124  else
14125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14126$as_echo "unknown" >&6; }
14127    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14128$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14129  fi
14130
14131  else
14132    PATH_SEP=":"
14133  fi
14134
14135
14136  # We get the top-level directory from the supporting wrappers.
14137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14138$as_echo_n "checking for top-level directory... " >&6; }
14139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14140$as_echo "$TOPDIR" >&6; }
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-stile (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-stile (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  # Locate the directory of this script.
14400  AUTOCONF_DIR=$TOPDIR/common/autoconf
14401
14402
14403  # Setup default logging of stdout and stderr to build.log in the output root.
14404  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14405  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14406  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14407
14408
14409
14410
14411
14412# Check if it's a pure open build or if custom sources are to be used.
14413
14414  # Check whether --enable-openjdk-only was given.
14415if test "${enable_openjdk_only+set}" = set; then :
14416  enableval=$enable_openjdk_only;
14417else
14418  enable_openjdk_only="no"
14419fi
14420
14421
14422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14423$as_echo_n "checking for presence of closed sources... " >&6; }
14424  if test -d "$SRC_ROOT/jdk/src/closed"; then
14425    CLOSED_SOURCE_PRESENT=yes
14426  else
14427    CLOSED_SOURCE_PRESENT=no
14428  fi
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14430$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14431
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14433$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14434  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14436$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14437
14438  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14439    OPENJDK=true
14440    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14441      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14442$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14443    fi
14444  else
14445    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14446      OPENJDK=true
14447    else
14448      OPENJDK=false
14449    fi
14450  fi
14451
14452  if test "x$OPENJDK" = "xtrue"; then
14453    SET_OPENJDK="OPENJDK=true"
14454  fi
14455
14456
14457
14458  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14459  # the IncludeCustomExtension macro.
14460
14461
14462# Check whether --with-custom-make-dir was given.
14463if test "${with_custom_make_dir+set}" = set; then :
14464  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
14465$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14466fi
14467
14468
14469
14470
14471# These are needed to be able to create a configuration name (and thus the output directory)
14472
14473  ###############################################################################
14474  #
14475  # Check which variant of the JDK that we want to build.
14476  # Currently we have:
14477  #    normal:   standard edition
14478  # but the custom make system may add other variants
14479  #
14480  # Effectively the JDK variant gives a name to a specific set of
14481  # modules to compile into the JDK. In the future, these modules
14482  # might even be Jigsaw modules.
14483  #
14484  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14485$as_echo_n "checking which variant of the JDK to build... " >&6; }
14486
14487# Check whether --with-jdk-variant was given.
14488if test "${with_jdk_variant+set}" = set; then :
14489  withval=$with_jdk_variant;
14490fi
14491
14492
14493  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14494    JDK_VARIANT="normal"
14495  else
14496    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14497  fi
14498
14499
14500
14501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14502$as_echo "$JDK_VARIANT" >&6; }
14503
14504
14505###############################################################################
14506#
14507# Check which interpreter of the JVM we want to build.
14508# Currently we have:
14509#    template: Template interpreter (the default)
14510#    cpp     : C++ interpreter
14511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14512$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14513
14514# Check whether --with-jvm-interpreter was given.
14515if test "${with_jvm_interpreter+set}" = set; then :
14516  withval=$with_jvm_interpreter;
14517fi
14518
14519
14520if test "x$with_jvm_interpreter" = x; then
14521     with_jvm_interpreter="template"
14522fi
14523
14524JVM_INTERPRETER="$with_jvm_interpreter"
14525
14526if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14527   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14528fi
14529
14530
14531
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14533$as_echo "$with_jvm_interpreter" >&6; }
14534
14535
14536
14537  ###############################################################################
14538  #
14539  # Check which variants of the JVM that we want to build.
14540  # Currently we have:
14541  #    server: normal interpreter and a tiered C1/C2 compiler
14542  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14543  #    minimal1: reduced form of client with optional VM services and features stripped out
14544  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14545  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14546  #    zero: no machine code interpreter, no compiler
14547  #    zeroshark: zero interpreter and shark/llvm compiler backend
14548#    core: interpreter only, no compiler (only works on some platforms)
14549  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14550$as_echo_n "checking which variants of the JVM to build... " >&6; }
14551
14552# Check whether --with-jvm-variants was given.
14553if test "${with_jvm_variants+set}" = set; then :
14554  withval=$with_jvm_variants;
14555fi
14556
14557
14558  if test "x$with_jvm_variants" = x; then
14559    with_jvm_variants="server"
14560  fi
14561
14562  JVM_VARIANTS=",$with_jvm_variants,"
14563  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,//'`
14564
14565  if test "x$TEST_VARIANTS" != "x,"; then
14566     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14567  fi
14568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14569$as_echo "$with_jvm_variants" >&6; }
14570
14571  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14572  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14573  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14574  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14575  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14576  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14577  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14578
14579  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14580    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14581      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14582    fi
14583  fi
14584  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14585    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14586      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14587    fi
14588  fi
14589  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14590    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14591      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14592    fi
14593  fi
14594
14595  # Replace the commas with AND for use in the build directory name.
14596  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14597  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/'`
14598  if test "x$COUNT_VARIANTS" != "x,1"; then
14599    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14600  else
14601    BUILDING_MULTIPLE_JVM_VARIANTS=no
14602  fi
14603
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613  INCLUDE_SA=true
14614  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14615    INCLUDE_SA=false
14616  fi
14617  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14618    INCLUDE_SA=false
14619  fi
14620  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14621    INCLUDE_SA=false
14622  fi
14623  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14624    INCLUDE_SA=false
14625  fi
14626
14627
14628  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14629    MACOSX_UNIVERSAL="true"
14630  fi
14631
14632
14633
14634
14635  ###############################################################################
14636  #
14637  # Set the debug level
14638  #    release: no debug information, all optimizations, no asserts.
14639  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14640  #    fastdebug: debug information (-g), all optimizations, all asserts
14641  #    slowdebug: debug information (-g), no optimizations, all asserts
14642  #
14643  DEBUG_LEVEL="release"
14644  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14645$as_echo_n "checking which debug level to use... " >&6; }
14646  # Check whether --enable-debug was given.
14647if test "${enable_debug+set}" = set; then :
14648  enableval=$enable_debug;
14649        ENABLE_DEBUG="${enableval}"
14650        DEBUG_LEVEL="fastdebug"
14651
14652else
14653  ENABLE_DEBUG="no"
14654fi
14655
14656
14657
14658# Check whether --with-debug-level was given.
14659if test "${with_debug_level+set}" = set; then :
14660  withval=$with_debug_level;
14661        DEBUG_LEVEL="${withval}"
14662        if test "x$ENABLE_DEBUG" = xyes; then
14663          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14664        fi
14665
14666fi
14667
14668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14669$as_echo "$DEBUG_LEVEL" >&6; }
14670
14671  if test "x$DEBUG_LEVEL" != xrelease && \
14672      test "x$DEBUG_LEVEL" != xoptimized && \
14673      test "x$DEBUG_LEVEL" != xfastdebug && \
14674      test "x$DEBUG_LEVEL" != xslowdebug; then
14675    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14676  fi
14677
14678
14679  ###############################################################################
14680  #
14681  # Setup legacy vars/targets and new vars to deal with different debug levels.
14682  #
14683
14684  case $DEBUG_LEVEL in
14685    release )
14686      VARIANT="OPT"
14687      FASTDEBUG="false"
14688      DEBUG_CLASSFILES="false"
14689      BUILD_VARIANT_RELEASE=""
14690      HOTSPOT_DEBUG_LEVEL="product"
14691      HOTSPOT_EXPORT="product"
14692      ;;
14693    fastdebug )
14694      VARIANT="DBG"
14695      FASTDEBUG="true"
14696      DEBUG_CLASSFILES="true"
14697      BUILD_VARIANT_RELEASE="-fastdebug"
14698      HOTSPOT_DEBUG_LEVEL="fastdebug"
14699      HOTSPOT_EXPORT="fastdebug"
14700      ;;
14701    slowdebug )
14702      VARIANT="DBG"
14703      FASTDEBUG="false"
14704      DEBUG_CLASSFILES="true"
14705      BUILD_VARIANT_RELEASE="-debug"
14706      HOTSPOT_DEBUG_LEVEL="debug"
14707      HOTSPOT_EXPORT="debug"
14708      ;;
14709    optimized )
14710      VARIANT="OPT"
14711      FASTDEBUG="false"
14712      DEBUG_CLASSFILES="false"
14713      BUILD_VARIANT_RELEASE="-optimized"
14714      HOTSPOT_DEBUG_LEVEL="optimized"
14715      HOTSPOT_EXPORT="optimized"
14716      ;;
14717  esac
14718
14719  # The debug level 'optimized' is a little special because it is currently only
14720  # applicable to the HotSpot build where it means to build a completely
14721  # optimized version of the VM without any debugging code (like for the
14722  # 'release' debug level which is called 'product' in the HotSpot build) but
14723  # with the exception that it can contain additional code which is otherwise
14724  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14725  # test new and/or experimental features which are not intended for customer
14726  # shipment. Because these new features need to be tested and benchmarked in
14727  # real world scenarios, we want to build the containing JDK at the 'release'
14728  # debug level.
14729  if test "x$DEBUG_LEVEL" = xoptimized; then
14730    DEBUG_LEVEL="release"
14731  fi
14732
14733  #####
14734  # Generate the legacy makefile targets for hotspot.
14735  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14736  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14737  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14738  # But until then ...
14739  HOTSPOT_TARGET=""
14740
14741  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14742    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14743  fi
14744
14745  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14746    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14747  fi
14748
14749  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14750    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14751  fi
14752
14753  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14754    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14755  fi
14756
14757  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14758    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14759  fi
14760
14761  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14762    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14763  fi
14764
14765  if test "x$JVM_VARIANT_CORE" = xtrue; then
14766    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14767  fi
14768
14769  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14770
14771  # On Macosx universal binaries are produced, but they only contain
14772  # 64 bit intel. This invalidates control of which jvms are built
14773  # from configure, but only server is valid anyway. Fix this
14774  # when hotspot makefiles are rewritten.
14775  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14776    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14777  fi
14778
14779  #####
14780
14781
14782
14783
14784
14785
14786
14787
14788# With basic setup done, call the custom early hook.
14789
14790
14791# Check if we have devkits, extra paths or sysroot set.
14792
14793
14794# Check whether --with-devkit was given.
14795if test "${with_devkit+set}" = set; then :
14796  withval=$with_devkit;
14797
14798  # Only process if variable expands to non-empty
14799
14800  if test "x$with_devkit" != x; then
14801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14802
14803  # Input might be given as Windows format, start by converting to
14804  # unix format.
14805  path="$with_devkit"
14806  new_path=`$CYGPATH -u "$path"`
14807
14808  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14809  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14810  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14811  # "foo.exe" is OK but "foo" is an error.
14812  #
14813  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14814  # It is also a way to make sure we got the proper file name for the real test later on.
14815  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14816  if test "x$test_shortpath" = x; then
14817    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14818$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14819    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14820  fi
14821
14822  # Call helper function which possibly converts this using DOS-style short mode.
14823  # If so, the updated path is stored in $new_path.
14824
14825  input_path="$new_path"
14826  # Check if we need to convert this using DOS-style short mode. If the path
14827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14828  # take no chances and rewrite it.
14829  # Note: m4 eats our [], so we need to use [ and ] instead.
14830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14831  if test "x$has_forbidden_chars" != x; then
14832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14833    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14834    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14835    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14836      # Going to short mode and back again did indeed matter. Since short mode is
14837      # case insensitive, let's make it lowercase to improve readability.
14838      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14839      # Now convert it back to Unix-stile (cygpath)
14840      input_path=`$CYGPATH -u "$shortmode_path"`
14841      new_path="$input_path"
14842    fi
14843  fi
14844
14845  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14846  if test "x$test_cygdrive_prefix" = x; then
14847    # As a simple fix, exclude /usr/bin since it's not a real path.
14848    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14849      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14850      # a path prefixed by /cygdrive for fixpath to work.
14851      new_path="$CYGWIN_ROOT_PATH$input_path"
14852    fi
14853  fi
14854
14855
14856  if test "x$path" != "x$new_path"; then
14857    with_devkit="$new_path"
14858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14859$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14860  fi
14861
14862    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14863
14864  path="$with_devkit"
14865  has_colon=`$ECHO $path | $GREP ^.:`
14866  new_path="$path"
14867  if test "x$has_colon" = x; then
14868    # Not in mixed or Windows style, start by that.
14869    new_path=`cmd //c echo $path`
14870  fi
14871
14872
14873  input_path="$new_path"
14874  # Check if we need to convert this using DOS-style short mode. If the path
14875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14876  # take no chances and rewrite it.
14877  # Note: m4 eats our [], so we need to use [ and ] instead.
14878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14879  if test "x$has_forbidden_chars" != x; then
14880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14881    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14882  fi
14883
14884
14885  windows_path="$new_path"
14886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14887    unix_path=`$CYGPATH -u "$windows_path"`
14888    new_path="$unix_path"
14889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14891    new_path="$unix_path"
14892  fi
14893
14894  if test "x$path" != "x$new_path"; then
14895    with_devkit="$new_path"
14896    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14897$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14898  fi
14899
14900  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14901  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14902
14903    else
14904      # We're on a unix platform. Hooray! :)
14905      path="$with_devkit"
14906      has_space=`$ECHO "$path" | $GREP " "`
14907      if test "x$has_space" != x; then
14908        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14909$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14910        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14911      fi
14912
14913      # Use eval to expand a potential ~
14914      eval path="$path"
14915      if test ! -f "$path" && test ! -d "$path"; then
14916        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14917      fi
14918
14919      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14920    fi
14921  fi
14922
14923        DEVKIT_ROOT="$with_devkit"
14924        # Check for a meta data info file in the root of the devkit
14925        if test -f "$DEVKIT_ROOT/devkit.info"; then
14926          # This potentially sets the following:
14927          # DEVKIT_NAME: A descriptive name of the devkit
14928          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14929          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14930          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14931          . $DEVKIT_ROOT/devkit.info
14932        fi
14933
14934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14935$as_echo_n "checking for devkit... " >&6; }
14936        if test "x$DEVKIT_NAME" != x; then
14937          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14938$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14939        else
14940          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14941$as_echo "$DEVKIT_ROOT" >&6; }
14942        fi
14943
14944        if test "x$DEVKIT_EXTRA_PATH" != x; then
14945
14946  if test "x$DEVKIT_EXTRA_PATH" != x; then
14947    if test "x$EXTRA_PATH" = x; then
14948      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14949    else
14950      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14951    fi
14952  fi
14953
14954        fi
14955
14956        # Fallback default of just /bin if DEVKIT_PATH is not defined
14957        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14958          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14959        fi
14960
14961  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14962    if test "x$TOOLCHAIN_PATH" = x; then
14963      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14964    else
14965      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14966    fi
14967  fi
14968
14969
14970        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14971        # places for backwards compatiblity.
14972        if test "x$DEVKIT_SYSROOT" != x; then
14973          SYSROOT="$DEVKIT_SYSROOT"
14974        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14975          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14976        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14977          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14978        fi
14979
14980
14981fi
14982
14983
14984  # You can force the sysroot if the sysroot encoded into the compiler tools
14985  # is not correct.
14986
14987# Check whether --with-sys-root was given.
14988if test "${with_sys_root+set}" = set; then :
14989  withval=$with_sys_root; SYSROOT=$with_sys_root
14990
14991fi
14992
14993
14994
14995# Check whether --with-sysroot was given.
14996if test "${with_sysroot+set}" = set; then :
14997  withval=$with_sysroot; SYSROOT=$with_sysroot
14998
14999fi
15000
15001
15002
15003# Check whether --with-tools-dir was given.
15004if test "${with_tools_dir+set}" = set; then :
15005  withval=$with_tools_dir;
15006  if test "x$with_tools_dir" != x; then
15007    if test "x$TOOLCHAIN_PATH" = x; then
15008      TOOLCHAIN_PATH="$with_tools_dir"
15009    else
15010      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15011    fi
15012  fi
15013
15014
15015fi
15016
15017
15018
15019# Check whether --with-toolchain-path was given.
15020if test "${with_toolchain_path+set}" = set; then :
15021  withval=$with_toolchain_path;
15022  if test "x$with_toolchain_path" != x; then
15023    if test "x$TOOLCHAIN_PATH" = x; then
15024      TOOLCHAIN_PATH="$with_toolchain_path"
15025    else
15026      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15027    fi
15028  fi
15029
15030
15031fi
15032
15033
15034
15035# Check whether --with-extra-path was given.
15036if test "${with_extra_path+set}" = set; then :
15037  withval=$with_extra_path;
15038  if test "x$with_extra_path" != x; then
15039    if test "x$EXTRA_PATH" = x; then
15040      EXTRA_PATH="$with_extra_path"
15041    else
15042      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15043    fi
15044  fi
15045
15046
15047fi
15048
15049
15050  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15051    # detect if Xcode is installed by running xcodebuild -version
15052    # if no Xcode installed, xcodebuild exits with 1
15053    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15054    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15055      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15056      # fall back on the stub binary in /usr/bin/xcodebuild
15057      # Extract the first word of "xcodebuild", so it can be a program name with args.
15058set dummy xcodebuild; ac_word=$2
15059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15060$as_echo_n "checking for $ac_word... " >&6; }
15061if ${ac_cv_path_XCODEBUILD+:} false; then :
15062  $as_echo_n "(cached) " >&6
15063else
15064  case $XCODEBUILD in
15065  [\\/]* | ?:[\\/]*)
15066  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15067  ;;
15068  *)
15069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15070for as_dir in $TOOLCHAIN_PATH
15071do
15072  IFS=$as_save_IFS
15073  test -z "$as_dir" && as_dir=.
15074    for ac_exec_ext in '' $ac_executable_extensions; do
15075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15076    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15078    break 2
15079  fi
15080done
15081  done
15082IFS=$as_save_IFS
15083
15084  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15085  ;;
15086esac
15087fi
15088XCODEBUILD=$ac_cv_path_XCODEBUILD
15089if test -n "$XCODEBUILD"; then
15090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15091$as_echo "$XCODEBUILD" >&6; }
15092else
15093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15094$as_echo "no" >&6; }
15095fi
15096
15097
15098    else
15099      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15100      # when only the command line tools are installed there are no SDKs, so headers
15101      # are copied into the system frameworks
15102      XCODEBUILD=
15103
15104    fi
15105
15106    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15107$as_echo_n "checking for sdk name... " >&6; }
15108
15109# Check whether --with-sdk-name was given.
15110if test "${with_sdk_name+set}" = set; then :
15111  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15112
15113fi
15114
15115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15116$as_echo "$SDKNAME" >&6; }
15117
15118    # if toolchain path is specified then don't rely on system headers, they may not compile
15119    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15120    test -z "$TOOLCHAIN_PATH" && \
15121      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15122
15123    if test -z "$SYSROOT"; then
15124      if test -n "$XCODEBUILD"; then
15125        # if we don't have system headers, use default SDK name (last resort)
15126        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15127          SDKNAME=${SDKNAME:-macosx}
15128        fi
15129
15130        if test -n "$SDKNAME"; then
15131          # Call xcodebuild to determine SYSROOT
15132          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15133        fi
15134      else
15135        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15136          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
15137        fi
15138      fi
15139    else
15140      # warn user if --with-sdk-name was also set
15141      if test -n "$with_sdk_name"; then
15142        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15143$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15144      fi
15145    fi
15146
15147    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15148      # If no system framework headers, then SYSROOT must be set, or we won't build
15149      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
15150    fi
15151
15152    # Perform a basic sanity test
15153    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15154      if test -z "$SYSROOT"; then
15155        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
15156      else
15157        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15158      fi
15159    fi
15160
15161    # set SDKROOT too, Xcode tools will pick it up
15162    SDKROOT=$SYSROOT
15163
15164  fi
15165
15166  # Prepend the extra path to the global path
15167
15168  if test "x$EXTRA_PATH" != x; then
15169    if test "x$PATH" = x; then
15170      PATH="$EXTRA_PATH"
15171    else
15172      PATH="$EXTRA_PATH:$PATH"
15173    fi
15174  fi
15175
15176
15177  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15178    # Add extra search paths on solaris for utilities like ar and as etc...
15179    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15180  fi
15181
15182  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15183$as_echo_n "checking for sysroot... " >&6; }
15184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15185$as_echo "$SYSROOT" >&6; }
15186  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15187$as_echo_n "checking for toolchain path... " >&6; }
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15189$as_echo "$TOOLCHAIN_PATH" >&6; }
15190  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15191$as_echo_n "checking for extra path... " >&6; }
15192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15193$as_echo "$EXTRA_PATH" >&6; }
15194
15195
15196# To properly create a configuration name, we need to have the OpenJDK target
15197# and options (variants and debug level) parsed.
15198
15199
15200
15201# Check whether --with-conf-name was given.
15202if test "${with_conf_name+set}" = set; then :
15203  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15204fi
15205
15206
15207  # Test from where we are running configure, in or outside of src root.
15208  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15209$as_echo_n "checking where to store configuration... " >&6; }
15210  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15211      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15212      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15213    # We are running configure from the src root.
15214    # Create a default ./build/target-variant-debuglevel output root.
15215    if test "x${CONF_NAME}" = x; then
15216      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15217$as_echo "in default location" >&6; }
15218      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15219    else
15220      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15221$as_echo "in build directory with custom name" >&6; }
15222    fi
15223    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15224    $MKDIR -p "$OUTPUT_ROOT"
15225    if test ! -d "$OUTPUT_ROOT"; then
15226      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15227    fi
15228  else
15229    # We are running configure from outside of the src dir.
15230    # Then use the current directory as output dir!
15231    # If configuration is situated in normal build directory, just use the build
15232    # directory name as configuration name, otherwise use the complete path.
15233    if test "x${CONF_NAME}" = x; then
15234      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15235    fi
15236    OUTPUT_ROOT="$CURDIR"
15237    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15238$as_echo "in current directory" >&6; }
15239
15240    # WARNING: This might be a bad thing to do. You need to be sure you want to
15241    # have a configuration in this directory. Do some sanity checks!
15242
15243    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15244      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15245      # other files
15246      files_present=`$LS $OUTPUT_ROOT`
15247      # Configure has already touched config.log and confdefs.h in the current dir when this check
15248      # is performed.
15249      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15250      | $TR -d '\n'`
15251      if test "x$filtered_files" != x; then
15252        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15253$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15254        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15255$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15256        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15257$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15258        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15259$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15260        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15261$as_echo "$as_me: seriously mess up just about everything." >&6;}
15262        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15263$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15264        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15265$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15266        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15267      fi
15268    fi
15269  fi
15270  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15271$as_echo_n "checking what configuration name to use... " >&6; }
15272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15273$as_echo "$CONF_NAME" >&6; }
15274
15275
15276  # Only process if variable expands to non-empty
15277
15278  if test "x$OUTPUT_ROOT" != x; then
15279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15280
15281  # Input might be given as Windows format, start by converting to
15282  # unix format.
15283  path="$OUTPUT_ROOT"
15284  new_path=`$CYGPATH -u "$path"`
15285
15286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15289  # "foo.exe" is OK but "foo" is an error.
15290  #
15291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15292  # It is also a way to make sure we got the proper file name for the real test later on.
15293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15294  if test "x$test_shortpath" = x; then
15295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15296$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15297    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15298  fi
15299
15300  # Call helper function which possibly converts this using DOS-style short mode.
15301  # If so, the updated path is stored in $new_path.
15302
15303  input_path="$new_path"
15304  # Check if we need to convert this using DOS-style short mode. If the path
15305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15306  # take no chances and rewrite it.
15307  # Note: m4 eats our [], so we need to use [ and ] instead.
15308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15309  if test "x$has_forbidden_chars" != x; then
15310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15314      # Going to short mode and back again did indeed matter. Since short mode is
15315      # case insensitive, let's make it lowercase to improve readability.
15316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15317      # Now convert it back to Unix-stile (cygpath)
15318      input_path=`$CYGPATH -u "$shortmode_path"`
15319      new_path="$input_path"
15320    fi
15321  fi
15322
15323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15324  if test "x$test_cygdrive_prefix" = x; then
15325    # As a simple fix, exclude /usr/bin since it's not a real path.
15326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15328      # a path prefixed by /cygdrive for fixpath to work.
15329      new_path="$CYGWIN_ROOT_PATH$input_path"
15330    fi
15331  fi
15332
15333
15334  if test "x$path" != "x$new_path"; then
15335    OUTPUT_ROOT="$new_path"
15336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15337$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15338  fi
15339
15340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15341
15342  path="$OUTPUT_ROOT"
15343  has_colon=`$ECHO $path | $GREP ^.:`
15344  new_path="$path"
15345  if test "x$has_colon" = x; then
15346    # Not in mixed or Windows style, start by that.
15347    new_path=`cmd //c echo $path`
15348  fi
15349
15350
15351  input_path="$new_path"
15352  # Check if we need to convert this using DOS-style short mode. If the path
15353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15354  # take no chances and rewrite it.
15355  # Note: m4 eats our [], so we need to use [ and ] instead.
15356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15357  if test "x$has_forbidden_chars" != x; then
15358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15360  fi
15361
15362
15363  windows_path="$new_path"
15364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15365    unix_path=`$CYGPATH -u "$windows_path"`
15366    new_path="$unix_path"
15367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15369    new_path="$unix_path"
15370  fi
15371
15372  if test "x$path" != "x$new_path"; then
15373    OUTPUT_ROOT="$new_path"
15374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15375$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15376  fi
15377
15378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15380
15381    else
15382      # We're on a unix platform. Hooray! :)
15383      path="$OUTPUT_ROOT"
15384      has_space=`$ECHO "$path" | $GREP " "`
15385      if test "x$has_space" != x; then
15386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15387$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15389      fi
15390
15391      # Use eval to expand a potential ~
15392      eval path="$path"
15393      if test ! -f "$path" && test ! -d "$path"; then
15394        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15395      fi
15396
15397      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15398    fi
15399  fi
15400
15401
15402  SPEC=$OUTPUT_ROOT/spec.gmk
15403
15404  CONF_NAME=$CONF_NAME
15405
15406  OUTPUT_ROOT=$OUTPUT_ROOT
15407
15408
15409  # The spec.gmk file contains all variables for the make system.
15410  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15411
15412  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15413  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15414
15415  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15416  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15417
15418  # The compare.sh is used to compare the build output to other builds.
15419  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15420
15421  # The generated Makefile knows where the spec.gmk is and where the source is.
15422  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15423  # which will look for generated configurations
15424  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15425
15426
15427
15428# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15429
15430  for ac_prog in apt-get yum port pkgutil pkgadd
15431do
15432  # Extract the first word of "$ac_prog", so it can be a program name with args.
15433set dummy $ac_prog; ac_word=$2
15434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15435$as_echo_n "checking for $ac_word... " >&6; }
15436if ${ac_cv_prog_PKGHANDLER+:} false; then :
15437  $as_echo_n "(cached) " >&6
15438else
15439  if test -n "$PKGHANDLER"; then
15440  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15441else
15442as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15443for as_dir in $PATH
15444do
15445  IFS=$as_save_IFS
15446  test -z "$as_dir" && as_dir=.
15447    for ac_exec_ext in '' $ac_executable_extensions; do
15448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15449    ac_cv_prog_PKGHANDLER="$ac_prog"
15450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15451    break 2
15452  fi
15453done
15454  done
15455IFS=$as_save_IFS
15456
15457fi
15458fi
15459PKGHANDLER=$ac_cv_prog_PKGHANDLER
15460if test -n "$PKGHANDLER"; then
15461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15462$as_echo "$PKGHANDLER" >&6; }
15463else
15464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15465$as_echo "no" >&6; }
15466fi
15467
15468
15469  test -n "$PKGHANDLER" && break
15470done
15471
15472
15473
15474# Setup tools that requires more complex handling, or that is not needed by the configure script.
15475
15476
15477  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15478  if test "x$MAKE" != x; then
15479    # User has supplied a make, test it.
15480    if test ! -f "$MAKE"; then
15481      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15482    fi
15483
15484  MAKE_CANDIDATE=""$MAKE""
15485  DESCRIPTION="user supplied MAKE=$MAKE"
15486  if test "x$MAKE_CANDIDATE" != x; then
15487    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15488$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15489    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15490    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15491    if test "x$IS_GNU_MAKE" = x; then
15492      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15493$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15494    else
15495      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15496      if test "x$IS_MODERN_MAKE" = x; then
15497        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15498$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15499      else
15500        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15501          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15502            MAKE_EXPECTED_ENV='cygwin'
15503          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15504            MAKE_EXPECTED_ENV='msys'
15505          else
15506            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15507          fi
15508          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15509          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15510        else
15511          # Not relevant for non-Windows
15512          IS_MAKE_CORRECT_ENV=true
15513        fi
15514        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15515          { $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
15516$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;}
15517        else
15518          FOUND_MAKE=$MAKE_CANDIDATE
15519
15520  # Only process if variable expands to non-empty
15521
15522  if test "x$FOUND_MAKE" != x; then
15523    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15524
15525  # First separate the path from the arguments. This will split at the first
15526  # space.
15527  complete="$FOUND_MAKE"
15528  path="${complete%% *}"
15529  tmp="$complete EOL"
15530  arguments="${tmp#* }"
15531
15532  # Input might be given as Windows format, start by converting to
15533  # unix format.
15534  new_path=`$CYGPATH -u "$path"`
15535
15536  # Now try to locate executable using which
15537  new_path=`$WHICH "$new_path" 2> /dev/null`
15538  # bat and cmd files are not always considered executable in cygwin causing which
15539  # to not find them
15540  if test "x$new_path" = x \
15541      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15542      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15543    new_path=`$CYGPATH -u "$path"`
15544  fi
15545  if test "x$new_path" = x; then
15546    # Oops. Which didn't find the executable.
15547    # The splitting of arguments from the executable at a space might have been incorrect,
15548    # since paths with space are more likely in Windows. Give it another try with the whole
15549    # argument.
15550    path="$complete"
15551    arguments="EOL"
15552    new_path=`$CYGPATH -u "$path"`
15553    new_path=`$WHICH "$new_path" 2> /dev/null`
15554    # bat and cmd files are not always considered executable in cygwin causing which
15555    # to not find them
15556    if test "x$new_path" = x \
15557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15559      new_path=`$CYGPATH -u "$path"`
15560    fi
15561    if test "x$new_path" = x; then
15562      # It's still not found. Now this is an unrecoverable error.
15563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15564$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15565      has_space=`$ECHO "$complete" | $GREP " "`
15566      if test "x$has_space" != x; then
15567        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15568$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15569      fi
15570      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15571    fi
15572  fi
15573
15574  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15575  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15576  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15577  # "foo.exe" is OK but "foo" is an error.
15578  #
15579  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15580  # It is also a way to make sure we got the proper file name for the real test later on.
15581  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15582  if test "x$test_shortpath" = x; then
15583    # Short path failed, file does not exist as specified.
15584    # Try adding .exe or .cmd
15585    if test -f "${new_path}.exe"; then
15586      input_to_shortpath="${new_path}.exe"
15587    elif test -f "${new_path}.cmd"; then
15588      input_to_shortpath="${new_path}.cmd"
15589    else
15590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15591$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15592      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15593$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15594      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15595    fi
15596  else
15597    input_to_shortpath="$new_path"
15598  fi
15599
15600  # Call helper function which possibly converts this using DOS-style short mode.
15601  # If so, the updated path is stored in $new_path.
15602  new_path="$input_to_shortpath"
15603
15604  input_path="$input_to_shortpath"
15605  # Check if we need to convert this using DOS-style short mode. If the path
15606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15607  # take no chances and rewrite it.
15608  # Note: m4 eats our [], so we need to use [ and ] instead.
15609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15610  if test "x$has_forbidden_chars" != x; then
15611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15615      # Going to short mode and back again did indeed matter. Since short mode is
15616      # case insensitive, let's make it lowercase to improve readability.
15617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15618      # Now convert it back to Unix-stile (cygpath)
15619      input_path=`$CYGPATH -u "$shortmode_path"`
15620      new_path="$input_path"
15621    fi
15622  fi
15623
15624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15625  if test "x$test_cygdrive_prefix" = x; then
15626    # As a simple fix, exclude /usr/bin since it's not a real path.
15627    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15629      # a path prefixed by /cygdrive for fixpath to work.
15630      new_path="$CYGWIN_ROOT_PATH$input_path"
15631    fi
15632  fi
15633
15634  # remove trailing .exe if any
15635  new_path="${new_path/%.exe/}"
15636
15637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15638
15639  # First separate the path from the arguments. This will split at the first
15640  # space.
15641  complete="$FOUND_MAKE"
15642  path="${complete%% *}"
15643  tmp="$complete EOL"
15644  arguments="${tmp#* }"
15645
15646  # Input might be given as Windows format, start by converting to
15647  # unix format.
15648  new_path="$path"
15649
15650  windows_path="$new_path"
15651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15652    unix_path=`$CYGPATH -u "$windows_path"`
15653    new_path="$unix_path"
15654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15656    new_path="$unix_path"
15657  fi
15658
15659
15660  # Now try to locate executable using which
15661  new_path=`$WHICH "$new_path" 2> /dev/null`
15662
15663  if test "x$new_path" = x; then
15664    # Oops. Which didn't find the executable.
15665    # The splitting of arguments from the executable at a space might have been incorrect,
15666    # since paths with space are more likely in Windows. Give it another try with the whole
15667    # argument.
15668    path="$complete"
15669    arguments="EOL"
15670    new_path="$path"
15671
15672  windows_path="$new_path"
15673  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15674    unix_path=`$CYGPATH -u "$windows_path"`
15675    new_path="$unix_path"
15676  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15677    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15678    new_path="$unix_path"
15679  fi
15680
15681
15682    new_path=`$WHICH "$new_path" 2> /dev/null`
15683    # bat and cmd files are not always considered executable in MSYS causing which
15684    # to not find them
15685    if test "x$new_path" = x \
15686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15688      new_path="$path"
15689
15690  windows_path="$new_path"
15691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15692    unix_path=`$CYGPATH -u "$windows_path"`
15693    new_path="$unix_path"
15694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15696    new_path="$unix_path"
15697  fi
15698
15699    fi
15700
15701    if test "x$new_path" = x; then
15702      # It's still not found. Now this is an unrecoverable error.
15703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15704$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15705      has_space=`$ECHO "$complete" | $GREP " "`
15706      if test "x$has_space" != x; then
15707        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15708$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15709      fi
15710      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15711    fi
15712  fi
15713
15714  # Now new_path has a complete unix path to the binary
15715  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15716    # Keep paths in /bin as-is, but remove trailing .exe if any
15717    new_path="${new_path/%.exe/}"
15718    # Do not save /bin paths to all_fixpath_prefixes!
15719  else
15720    # Not in mixed or Windows style, start by that.
15721    new_path=`cmd //c echo $new_path`
15722
15723  input_path="$new_path"
15724  # Check if we need to convert this using DOS-style short mode. If the path
15725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15726  # take no chances and rewrite it.
15727  # Note: m4 eats our [], so we need to use [ and ] instead.
15728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15729  if test "x$has_forbidden_chars" != x; then
15730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15732  fi
15733
15734    # Output is in $new_path
15735
15736  windows_path="$new_path"
15737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15738    unix_path=`$CYGPATH -u "$windows_path"`
15739    new_path="$unix_path"
15740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15742    new_path="$unix_path"
15743  fi
15744
15745    # remove trailing .exe if any
15746    new_path="${new_path/%.exe/}"
15747
15748    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15749    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15750  fi
15751
15752    else
15753      # We're on a unix platform. Hooray! :)
15754      # First separate the path from the arguments. This will split at the first
15755      # space.
15756      complete="$FOUND_MAKE"
15757      path="${complete%% *}"
15758      tmp="$complete EOL"
15759      arguments="${tmp#* }"
15760
15761      # Cannot rely on the command "which" here since it doesn't always work.
15762      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15763      if test -z "$is_absolute_path"; then
15764        # Path to executable is not absolute. Find it.
15765        IFS_save="$IFS"
15766        IFS=:
15767        for p in $PATH; do
15768          if test -f "$p/$path" && test -x "$p/$path"; then
15769            new_path="$p/$path"
15770            break
15771          fi
15772        done
15773        IFS="$IFS_save"
15774      else
15775        # This is an absolute path, we can use it without further modifications.
15776        new_path="$path"
15777      fi
15778
15779      if test "x$new_path" = x; then
15780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15781$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15782        has_space=`$ECHO "$complete" | $GREP " "`
15783        if test "x$has_space" != x; then
15784          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15785$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15786        fi
15787        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15788      fi
15789    fi
15790
15791    # Now join together the path and the arguments once again
15792    if test "x$arguments" != xEOL; then
15793      new_complete="$new_path ${arguments% *}"
15794    else
15795      new_complete="$new_path"
15796    fi
15797
15798    if test "x$complete" != "x$new_complete"; then
15799      FOUND_MAKE="$new_complete"
15800      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15801$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15802    fi
15803  fi
15804
15805        fi
15806      fi
15807    fi
15808  fi
15809
15810    if test "x$FOUND_MAKE" = x; then
15811      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15812    fi
15813  else
15814    # Try our hardest to locate a correct version of GNU make
15815    for ac_prog in gmake
15816do
15817  # Extract the first word of "$ac_prog", so it can be a program name with args.
15818set dummy $ac_prog; ac_word=$2
15819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15820$as_echo_n "checking for $ac_word... " >&6; }
15821if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15822  $as_echo_n "(cached) " >&6
15823else
15824  case $CHECK_GMAKE in
15825  [\\/]* | ?:[\\/]*)
15826  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15827  ;;
15828  *)
15829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15830for as_dir in $PATH
15831do
15832  IFS=$as_save_IFS
15833  test -z "$as_dir" && as_dir=.
15834    for ac_exec_ext in '' $ac_executable_extensions; do
15835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15836    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15838    break 2
15839  fi
15840done
15841  done
15842IFS=$as_save_IFS
15843
15844  ;;
15845esac
15846fi
15847CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15848if test -n "$CHECK_GMAKE"; then
15849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15850$as_echo "$CHECK_GMAKE" >&6; }
15851else
15852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15853$as_echo "no" >&6; }
15854fi
15855
15856
15857  test -n "$CHECK_GMAKE" && break
15858done
15859
15860
15861  MAKE_CANDIDATE=""$CHECK_GMAKE""
15862  DESCRIPTION="gmake in PATH"
15863  if test "x$MAKE_CANDIDATE" != x; then
15864    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15865$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15866    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15867    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15868    if test "x$IS_GNU_MAKE" = x; then
15869      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15870$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15871    else
15872      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15873      if test "x$IS_MODERN_MAKE" = x; then
15874        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
15875$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
15876      else
15877        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15878          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15879            MAKE_EXPECTED_ENV='cygwin'
15880          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15881            MAKE_EXPECTED_ENV='msys'
15882          else
15883            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15884          fi
15885          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15886          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15887        else
15888          # Not relevant for non-Windows
15889          IS_MAKE_CORRECT_ENV=true
15890        fi
15891        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15892          { $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
15893$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;}
15894        else
15895          FOUND_MAKE=$MAKE_CANDIDATE
15896
15897  # Only process if variable expands to non-empty
15898
15899  if test "x$FOUND_MAKE" != x; then
15900    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15901
15902  # First separate the path from the arguments. This will split at the first
15903  # space.
15904  complete="$FOUND_MAKE"
15905  path="${complete%% *}"
15906  tmp="$complete EOL"
15907  arguments="${tmp#* }"
15908
15909  # Input might be given as Windows format, start by converting to
15910  # unix format.
15911  new_path=`$CYGPATH -u "$path"`
15912
15913  # Now try to locate executable using which
15914  new_path=`$WHICH "$new_path" 2> /dev/null`
15915  # bat and cmd files are not always considered executable in cygwin causing which
15916  # to not find them
15917  if test "x$new_path" = x \
15918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15920    new_path=`$CYGPATH -u "$path"`
15921  fi
15922  if test "x$new_path" = x; then
15923    # Oops. Which didn't find the executable.
15924    # The splitting of arguments from the executable at a space might have been incorrect,
15925    # since paths with space are more likely in Windows. Give it another try with the whole
15926    # argument.
15927    path="$complete"
15928    arguments="EOL"
15929    new_path=`$CYGPATH -u "$path"`
15930    new_path=`$WHICH "$new_path" 2> /dev/null`
15931    # bat and cmd files are not always considered executable in cygwin causing which
15932    # to not find them
15933    if test "x$new_path" = x \
15934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15936      new_path=`$CYGPATH -u "$path"`
15937    fi
15938    if test "x$new_path" = x; then
15939      # It's still not found. Now this is an unrecoverable error.
15940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15941$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15942      has_space=`$ECHO "$complete" | $GREP " "`
15943      if test "x$has_space" != x; then
15944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15946      fi
15947      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15948    fi
15949  fi
15950
15951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15954  # "foo.exe" is OK but "foo" is an error.
15955  #
15956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15957  # It is also a way to make sure we got the proper file name for the real test later on.
15958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15959  if test "x$test_shortpath" = x; then
15960    # Short path failed, file does not exist as specified.
15961    # Try adding .exe or .cmd
15962    if test -f "${new_path}.exe"; then
15963      input_to_shortpath="${new_path}.exe"
15964    elif test -f "${new_path}.cmd"; then
15965      input_to_shortpath="${new_path}.cmd"
15966    else
15967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15968$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15971      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15972    fi
15973  else
15974    input_to_shortpath="$new_path"
15975  fi
15976
15977  # Call helper function which possibly converts this using DOS-style short mode.
15978  # If so, the updated path is stored in $new_path.
15979  new_path="$input_to_shortpath"
15980
15981  input_path="$input_to_shortpath"
15982  # Check if we need to convert this using DOS-style short mode. If the path
15983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15984  # take no chances and rewrite it.
15985  # Note: m4 eats our [], so we need to use [ and ] instead.
15986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15987  if test "x$has_forbidden_chars" != x; then
15988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15992      # Going to short mode and back again did indeed matter. Since short mode is
15993      # case insensitive, let's make it lowercase to improve readability.
15994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15995      # Now convert it back to Unix-stile (cygpath)
15996      input_path=`$CYGPATH -u "$shortmode_path"`
15997      new_path="$input_path"
15998    fi
15999  fi
16000
16001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16002  if test "x$test_cygdrive_prefix" = x; then
16003    # As a simple fix, exclude /usr/bin since it's not a real path.
16004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16006      # a path prefixed by /cygdrive for fixpath to work.
16007      new_path="$CYGWIN_ROOT_PATH$input_path"
16008    fi
16009  fi
16010
16011  # remove trailing .exe if any
16012  new_path="${new_path/%.exe/}"
16013
16014    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16015
16016  # First separate the path from the arguments. This will split at the first
16017  # space.
16018  complete="$FOUND_MAKE"
16019  path="${complete%% *}"
16020  tmp="$complete EOL"
16021  arguments="${tmp#* }"
16022
16023  # Input might be given as Windows format, start by converting to
16024  # unix format.
16025  new_path="$path"
16026
16027  windows_path="$new_path"
16028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16029    unix_path=`$CYGPATH -u "$windows_path"`
16030    new_path="$unix_path"
16031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16033    new_path="$unix_path"
16034  fi
16035
16036
16037  # Now try to locate executable using which
16038  new_path=`$WHICH "$new_path" 2> /dev/null`
16039
16040  if test "x$new_path" = x; then
16041    # Oops. Which didn't find the executable.
16042    # The splitting of arguments from the executable at a space might have been incorrect,
16043    # since paths with space are more likely in Windows. Give it another try with the whole
16044    # argument.
16045    path="$complete"
16046    arguments="EOL"
16047    new_path="$path"
16048
16049  windows_path="$new_path"
16050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16051    unix_path=`$CYGPATH -u "$windows_path"`
16052    new_path="$unix_path"
16053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16055    new_path="$unix_path"
16056  fi
16057
16058
16059    new_path=`$WHICH "$new_path" 2> /dev/null`
16060    # bat and cmd files are not always considered executable in MSYS causing which
16061    # to not find them
16062    if test "x$new_path" = x \
16063        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16064        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16065      new_path="$path"
16066
16067  windows_path="$new_path"
16068  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16069    unix_path=`$CYGPATH -u "$windows_path"`
16070    new_path="$unix_path"
16071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16072    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16073    new_path="$unix_path"
16074  fi
16075
16076    fi
16077
16078    if test "x$new_path" = x; then
16079      # It's still not found. Now this is an unrecoverable error.
16080      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16081$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16082      has_space=`$ECHO "$complete" | $GREP " "`
16083      if test "x$has_space" != x; then
16084        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16085$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16086      fi
16087      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16088    fi
16089  fi
16090
16091  # Now new_path has a complete unix path to the binary
16092  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16093    # Keep paths in /bin as-is, but remove trailing .exe if any
16094    new_path="${new_path/%.exe/}"
16095    # Do not save /bin paths to all_fixpath_prefixes!
16096  else
16097    # Not in mixed or Windows style, start by that.
16098    new_path=`cmd //c echo $new_path`
16099
16100  input_path="$new_path"
16101  # Check if we need to convert this using DOS-style short mode. If the path
16102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16103  # take no chances and rewrite it.
16104  # Note: m4 eats our [], so we need to use [ and ] instead.
16105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16106  if test "x$has_forbidden_chars" != x; then
16107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16109  fi
16110
16111    # Output is in $new_path
16112
16113  windows_path="$new_path"
16114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16115    unix_path=`$CYGPATH -u "$windows_path"`
16116    new_path="$unix_path"
16117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16119    new_path="$unix_path"
16120  fi
16121
16122    # remove trailing .exe if any
16123    new_path="${new_path/%.exe/}"
16124
16125    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16126    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16127  fi
16128
16129    else
16130      # We're on a unix platform. Hooray! :)
16131      # First separate the path from the arguments. This will split at the first
16132      # space.
16133      complete="$FOUND_MAKE"
16134      path="${complete%% *}"
16135      tmp="$complete EOL"
16136      arguments="${tmp#* }"
16137
16138      # Cannot rely on the command "which" here since it doesn't always work.
16139      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16140      if test -z "$is_absolute_path"; then
16141        # Path to executable is not absolute. Find it.
16142        IFS_save="$IFS"
16143        IFS=:
16144        for p in $PATH; do
16145          if test -f "$p/$path" && test -x "$p/$path"; then
16146            new_path="$p/$path"
16147            break
16148          fi
16149        done
16150        IFS="$IFS_save"
16151      else
16152        # This is an absolute path, we can use it without further modifications.
16153        new_path="$path"
16154      fi
16155
16156      if test "x$new_path" = x; then
16157        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16158$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16159        has_space=`$ECHO "$complete" | $GREP " "`
16160        if test "x$has_space" != x; then
16161          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16162$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16163        fi
16164        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16165      fi
16166    fi
16167
16168    # Now join together the path and the arguments once again
16169    if test "x$arguments" != xEOL; then
16170      new_complete="$new_path ${arguments% *}"
16171    else
16172      new_complete="$new_path"
16173    fi
16174
16175    if test "x$complete" != "x$new_complete"; then
16176      FOUND_MAKE="$new_complete"
16177      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16178$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16179    fi
16180  fi
16181
16182        fi
16183      fi
16184    fi
16185  fi
16186
16187
16188    if test "x$FOUND_MAKE" = x; then
16189      for ac_prog in make
16190do
16191  # Extract the first word of "$ac_prog", so it can be a program name with args.
16192set dummy $ac_prog; ac_word=$2
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16194$as_echo_n "checking for $ac_word... " >&6; }
16195if ${ac_cv_path_CHECK_MAKE+:} false; then :
16196  $as_echo_n "(cached) " >&6
16197else
16198  case $CHECK_MAKE in
16199  [\\/]* | ?:[\\/]*)
16200  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16201  ;;
16202  *)
16203  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16204for as_dir in $PATH
16205do
16206  IFS=$as_save_IFS
16207  test -z "$as_dir" && as_dir=.
16208    for ac_exec_ext in '' $ac_executable_extensions; do
16209  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16210    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16211    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16212    break 2
16213  fi
16214done
16215  done
16216IFS=$as_save_IFS
16217
16218  ;;
16219esac
16220fi
16221CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16222if test -n "$CHECK_MAKE"; then
16223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16224$as_echo "$CHECK_MAKE" >&6; }
16225else
16226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16227$as_echo "no" >&6; }
16228fi
16229
16230
16231  test -n "$CHECK_MAKE" && break
16232done
16233
16234
16235  MAKE_CANDIDATE=""$CHECK_MAKE""
16236  DESCRIPTION="make in PATH"
16237  if test "x$MAKE_CANDIDATE" != x; then
16238    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16239$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16240    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16241    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16242    if test "x$IS_GNU_MAKE" = x; then
16243      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16244$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16245    else
16246      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16247      if test "x$IS_MODERN_MAKE" = x; then
16248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16249$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16250      else
16251        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16252          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16253            MAKE_EXPECTED_ENV='cygwin'
16254          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16255            MAKE_EXPECTED_ENV='msys'
16256          else
16257            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16258          fi
16259          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16260          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16261        else
16262          # Not relevant for non-Windows
16263          IS_MAKE_CORRECT_ENV=true
16264        fi
16265        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16266          { $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
16267$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;}
16268        else
16269          FOUND_MAKE=$MAKE_CANDIDATE
16270
16271  # Only process if variable expands to non-empty
16272
16273  if test "x$FOUND_MAKE" != x; then
16274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16275
16276  # First separate the path from the arguments. This will split at the first
16277  # space.
16278  complete="$FOUND_MAKE"
16279  path="${complete%% *}"
16280  tmp="$complete EOL"
16281  arguments="${tmp#* }"
16282
16283  # Input might be given as Windows format, start by converting to
16284  # unix format.
16285  new_path=`$CYGPATH -u "$path"`
16286
16287  # Now try to locate executable using which
16288  new_path=`$WHICH "$new_path" 2> /dev/null`
16289  # bat and cmd files are not always considered executable in cygwin causing which
16290  # to not find them
16291  if test "x$new_path" = x \
16292      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16293      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16294    new_path=`$CYGPATH -u "$path"`
16295  fi
16296  if test "x$new_path" = x; then
16297    # Oops. Which didn't find the executable.
16298    # The splitting of arguments from the executable at a space might have been incorrect,
16299    # since paths with space are more likely in Windows. Give it another try with the whole
16300    # argument.
16301    path="$complete"
16302    arguments="EOL"
16303    new_path=`$CYGPATH -u "$path"`
16304    new_path=`$WHICH "$new_path" 2> /dev/null`
16305    # bat and cmd files are not always considered executable in cygwin causing which
16306    # to not find them
16307    if test "x$new_path" = x \
16308        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16309        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16310      new_path=`$CYGPATH -u "$path"`
16311    fi
16312    if test "x$new_path" = x; then
16313      # It's still not found. Now this is an unrecoverable error.
16314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16315$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16316      has_space=`$ECHO "$complete" | $GREP " "`
16317      if test "x$has_space" != x; then
16318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16320      fi
16321      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16322    fi
16323  fi
16324
16325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16328  # "foo.exe" is OK but "foo" is an error.
16329  #
16330  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16331  # It is also a way to make sure we got the proper file name for the real test later on.
16332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16333  if test "x$test_shortpath" = x; then
16334    # Short path failed, file does not exist as specified.
16335    # Try adding .exe or .cmd
16336    if test -f "${new_path}.exe"; then
16337      input_to_shortpath="${new_path}.exe"
16338    elif test -f "${new_path}.cmd"; then
16339      input_to_shortpath="${new_path}.cmd"
16340    else
16341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16342$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16343      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16344$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16345      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16346    fi
16347  else
16348    input_to_shortpath="$new_path"
16349  fi
16350
16351  # Call helper function which possibly converts this using DOS-style short mode.
16352  # If so, the updated path is stored in $new_path.
16353  new_path="$input_to_shortpath"
16354
16355  input_path="$input_to_shortpath"
16356  # Check if we need to convert this using DOS-style short mode. If the path
16357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16358  # take no chances and rewrite it.
16359  # Note: m4 eats our [], so we need to use [ and ] instead.
16360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16361  if test "x$has_forbidden_chars" != x; then
16362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16366      # Going to short mode and back again did indeed matter. Since short mode is
16367      # case insensitive, let's make it lowercase to improve readability.
16368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16369      # Now convert it back to Unix-stile (cygpath)
16370      input_path=`$CYGPATH -u "$shortmode_path"`
16371      new_path="$input_path"
16372    fi
16373  fi
16374
16375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16376  if test "x$test_cygdrive_prefix" = x; then
16377    # As a simple fix, exclude /usr/bin since it's not a real path.
16378    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16380      # a path prefixed by /cygdrive for fixpath to work.
16381      new_path="$CYGWIN_ROOT_PATH$input_path"
16382    fi
16383  fi
16384
16385  # remove trailing .exe if any
16386  new_path="${new_path/%.exe/}"
16387
16388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16389
16390  # First separate the path from the arguments. This will split at the first
16391  # space.
16392  complete="$FOUND_MAKE"
16393  path="${complete%% *}"
16394  tmp="$complete EOL"
16395  arguments="${tmp#* }"
16396
16397  # Input might be given as Windows format, start by converting to
16398  # unix format.
16399  new_path="$path"
16400
16401  windows_path="$new_path"
16402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16403    unix_path=`$CYGPATH -u "$windows_path"`
16404    new_path="$unix_path"
16405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16407    new_path="$unix_path"
16408  fi
16409
16410
16411  # Now try to locate executable using which
16412  new_path=`$WHICH "$new_path" 2> /dev/null`
16413
16414  if test "x$new_path" = x; then
16415    # Oops. Which didn't find the executable.
16416    # The splitting of arguments from the executable at a space might have been incorrect,
16417    # since paths with space are more likely in Windows. Give it another try with the whole
16418    # argument.
16419    path="$complete"
16420    arguments="EOL"
16421    new_path="$path"
16422
16423  windows_path="$new_path"
16424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16425    unix_path=`$CYGPATH -u "$windows_path"`
16426    new_path="$unix_path"
16427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16429    new_path="$unix_path"
16430  fi
16431
16432
16433    new_path=`$WHICH "$new_path" 2> /dev/null`
16434    # bat and cmd files are not always considered executable in MSYS causing which
16435    # to not find them
16436    if test "x$new_path" = x \
16437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16439      new_path="$path"
16440
16441  windows_path="$new_path"
16442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16443    unix_path=`$CYGPATH -u "$windows_path"`
16444    new_path="$unix_path"
16445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16447    new_path="$unix_path"
16448  fi
16449
16450    fi
16451
16452    if test "x$new_path" = x; then
16453      # It's still not found. Now this is an unrecoverable error.
16454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16455$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16456      has_space=`$ECHO "$complete" | $GREP " "`
16457      if test "x$has_space" != x; then
16458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16460      fi
16461      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16462    fi
16463  fi
16464
16465  # Now new_path has a complete unix path to the binary
16466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16467    # Keep paths in /bin as-is, but remove trailing .exe if any
16468    new_path="${new_path/%.exe/}"
16469    # Do not save /bin paths to all_fixpath_prefixes!
16470  else
16471    # Not in mixed or Windows style, start by that.
16472    new_path=`cmd //c echo $new_path`
16473
16474  input_path="$new_path"
16475  # Check if we need to convert this using DOS-style short mode. If the path
16476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16477  # take no chances and rewrite it.
16478  # Note: m4 eats our [], so we need to use [ and ] instead.
16479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16480  if test "x$has_forbidden_chars" != x; then
16481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16483  fi
16484
16485    # Output is in $new_path
16486
16487  windows_path="$new_path"
16488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16489    unix_path=`$CYGPATH -u "$windows_path"`
16490    new_path="$unix_path"
16491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16493    new_path="$unix_path"
16494  fi
16495
16496    # remove trailing .exe if any
16497    new_path="${new_path/%.exe/}"
16498
16499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16501  fi
16502
16503    else
16504      # We're on a unix platform. Hooray! :)
16505      # First separate the path from the arguments. This will split at the first
16506      # space.
16507      complete="$FOUND_MAKE"
16508      path="${complete%% *}"
16509      tmp="$complete EOL"
16510      arguments="${tmp#* }"
16511
16512      # Cannot rely on the command "which" here since it doesn't always work.
16513      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16514      if test -z "$is_absolute_path"; then
16515        # Path to executable is not absolute. Find it.
16516        IFS_save="$IFS"
16517        IFS=:
16518        for p in $PATH; do
16519          if test -f "$p/$path" && test -x "$p/$path"; then
16520            new_path="$p/$path"
16521            break
16522          fi
16523        done
16524        IFS="$IFS_save"
16525      else
16526        # This is an absolute path, we can use it without further modifications.
16527        new_path="$path"
16528      fi
16529
16530      if test "x$new_path" = x; then
16531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16532$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16533        has_space=`$ECHO "$complete" | $GREP " "`
16534        if test "x$has_space" != x; then
16535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16537        fi
16538        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16539      fi
16540    fi
16541
16542    # Now join together the path and the arguments once again
16543    if test "x$arguments" != xEOL; then
16544      new_complete="$new_path ${arguments% *}"
16545    else
16546      new_complete="$new_path"
16547    fi
16548
16549    if test "x$complete" != "x$new_complete"; then
16550      FOUND_MAKE="$new_complete"
16551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16552$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16553    fi
16554  fi
16555
16556        fi
16557      fi
16558    fi
16559  fi
16560
16561    fi
16562
16563    if test "x$FOUND_MAKE" = x; then
16564      if test "x$TOOLCHAIN_PATH" != x; then
16565        # We have a toolchain path, check that as well before giving up.
16566        OLD_PATH=$PATH
16567        PATH=$TOOLCHAIN_PATH:$PATH
16568        for ac_prog in gmake
16569do
16570  # Extract the first word of "$ac_prog", so it can be a program name with args.
16571set dummy $ac_prog; ac_word=$2
16572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16573$as_echo_n "checking for $ac_word... " >&6; }
16574if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16575  $as_echo_n "(cached) " >&6
16576else
16577  case $CHECK_TOOLSDIR_GMAKE in
16578  [\\/]* | ?:[\\/]*)
16579  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16580  ;;
16581  *)
16582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16583for as_dir in $PATH
16584do
16585  IFS=$as_save_IFS
16586  test -z "$as_dir" && as_dir=.
16587    for ac_exec_ext in '' $ac_executable_extensions; do
16588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16589    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16591    break 2
16592  fi
16593done
16594  done
16595IFS=$as_save_IFS
16596
16597  ;;
16598esac
16599fi
16600CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16601if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16603$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16604else
16605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16606$as_echo "no" >&6; }
16607fi
16608
16609
16610  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16611done
16612
16613
16614  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16615  DESCRIPTION="gmake in tools-dir"
16616  if test "x$MAKE_CANDIDATE" != x; then
16617    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16618$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16619    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16620    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16621    if test "x$IS_GNU_MAKE" = x; then
16622      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16623$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16624    else
16625      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16626      if test "x$IS_MODERN_MAKE" = x; then
16627        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
16628$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
16629      else
16630        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16631          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16632            MAKE_EXPECTED_ENV='cygwin'
16633          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16634            MAKE_EXPECTED_ENV='msys'
16635          else
16636            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16637          fi
16638          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16639          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16640        else
16641          # Not relevant for non-Windows
16642          IS_MAKE_CORRECT_ENV=true
16643        fi
16644        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16645          { $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
16646$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;}
16647        else
16648          FOUND_MAKE=$MAKE_CANDIDATE
16649
16650  # Only process if variable expands to non-empty
16651
16652  if test "x$FOUND_MAKE" != x; then
16653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16654
16655  # First separate the path from the arguments. This will split at the first
16656  # space.
16657  complete="$FOUND_MAKE"
16658  path="${complete%% *}"
16659  tmp="$complete EOL"
16660  arguments="${tmp#* }"
16661
16662  # Input might be given as Windows format, start by converting to
16663  # unix format.
16664  new_path=`$CYGPATH -u "$path"`
16665
16666  # Now try to locate executable using which
16667  new_path=`$WHICH "$new_path" 2> /dev/null`
16668  # bat and cmd files are not always considered executable in cygwin causing which
16669  # to not find them
16670  if test "x$new_path" = x \
16671      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16672      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16673    new_path=`$CYGPATH -u "$path"`
16674  fi
16675  if test "x$new_path" = x; then
16676    # Oops. Which didn't find the executable.
16677    # The splitting of arguments from the executable at a space might have been incorrect,
16678    # since paths with space are more likely in Windows. Give it another try with the whole
16679    # argument.
16680    path="$complete"
16681    arguments="EOL"
16682    new_path=`$CYGPATH -u "$path"`
16683    new_path=`$WHICH "$new_path" 2> /dev/null`
16684    # bat and cmd files are not always considered executable in cygwin causing which
16685    # to not find them
16686    if test "x$new_path" = x \
16687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16689      new_path=`$CYGPATH -u "$path"`
16690    fi
16691    if test "x$new_path" = x; then
16692      # It's still not found. Now this is an unrecoverable error.
16693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16694$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16695      has_space=`$ECHO "$complete" | $GREP " "`
16696      if test "x$has_space" != x; then
16697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16699      fi
16700      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16701    fi
16702  fi
16703
16704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16707  # "foo.exe" is OK but "foo" is an error.
16708  #
16709  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16710  # It is also a way to make sure we got the proper file name for the real test later on.
16711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16712  if test "x$test_shortpath" = x; then
16713    # Short path failed, file does not exist as specified.
16714    # Try adding .exe or .cmd
16715    if test -f "${new_path}.exe"; then
16716      input_to_shortpath="${new_path}.exe"
16717    elif test -f "${new_path}.cmd"; then
16718      input_to_shortpath="${new_path}.cmd"
16719    else
16720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16721$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16722      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16723$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16724      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16725    fi
16726  else
16727    input_to_shortpath="$new_path"
16728  fi
16729
16730  # Call helper function which possibly converts this using DOS-style short mode.
16731  # If so, the updated path is stored in $new_path.
16732  new_path="$input_to_shortpath"
16733
16734  input_path="$input_to_shortpath"
16735  # Check if we need to convert this using DOS-style short mode. If the path
16736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16737  # take no chances and rewrite it.
16738  # Note: m4 eats our [], so we need to use [ and ] instead.
16739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16740  if test "x$has_forbidden_chars" != x; then
16741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16745      # Going to short mode and back again did indeed matter. Since short mode is
16746      # case insensitive, let's make it lowercase to improve readability.
16747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16748      # Now convert it back to Unix-stile (cygpath)
16749      input_path=`$CYGPATH -u "$shortmode_path"`
16750      new_path="$input_path"
16751    fi
16752  fi
16753
16754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16755  if test "x$test_cygdrive_prefix" = x; then
16756    # As a simple fix, exclude /usr/bin since it's not a real path.
16757    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16759      # a path prefixed by /cygdrive for fixpath to work.
16760      new_path="$CYGWIN_ROOT_PATH$input_path"
16761    fi
16762  fi
16763
16764  # remove trailing .exe if any
16765  new_path="${new_path/%.exe/}"
16766
16767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16768
16769  # First separate the path from the arguments. This will split at the first
16770  # space.
16771  complete="$FOUND_MAKE"
16772  path="${complete%% *}"
16773  tmp="$complete EOL"
16774  arguments="${tmp#* }"
16775
16776  # Input might be given as Windows format, start by converting to
16777  # unix format.
16778  new_path="$path"
16779
16780  windows_path="$new_path"
16781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16782    unix_path=`$CYGPATH -u "$windows_path"`
16783    new_path="$unix_path"
16784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16786    new_path="$unix_path"
16787  fi
16788
16789
16790  # Now try to locate executable using which
16791  new_path=`$WHICH "$new_path" 2> /dev/null`
16792
16793  if test "x$new_path" = x; then
16794    # Oops. Which didn't find the executable.
16795    # The splitting of arguments from the executable at a space might have been incorrect,
16796    # since paths with space are more likely in Windows. Give it another try with the whole
16797    # argument.
16798    path="$complete"
16799    arguments="EOL"
16800    new_path="$path"
16801
16802  windows_path="$new_path"
16803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16804    unix_path=`$CYGPATH -u "$windows_path"`
16805    new_path="$unix_path"
16806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16808    new_path="$unix_path"
16809  fi
16810
16811
16812    new_path=`$WHICH "$new_path" 2> /dev/null`
16813    # bat and cmd files are not always considered executable in MSYS causing which
16814    # to not find them
16815    if test "x$new_path" = x \
16816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16818      new_path="$path"
16819
16820  windows_path="$new_path"
16821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16822    unix_path=`$CYGPATH -u "$windows_path"`
16823    new_path="$unix_path"
16824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16826    new_path="$unix_path"
16827  fi
16828
16829    fi
16830
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  # Now new_path has a complete unix path to the binary
16845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16846    # Keep paths in /bin as-is, but remove trailing .exe if any
16847    new_path="${new_path/%.exe/}"
16848    # Do not save /bin paths to all_fixpath_prefixes!
16849  else
16850    # Not in mixed or Windows style, start by that.
16851    new_path=`cmd //c echo $new_path`
16852
16853  input_path="$new_path"
16854  # Check if we need to convert this using DOS-style short mode. If the path
16855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16856  # take no chances and rewrite it.
16857  # Note: m4 eats our [], so we need to use [ and ] instead.
16858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16859  if test "x$has_forbidden_chars" != x; then
16860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16862  fi
16863
16864    # Output is in $new_path
16865
16866  windows_path="$new_path"
16867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16868    unix_path=`$CYGPATH -u "$windows_path"`
16869    new_path="$unix_path"
16870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16872    new_path="$unix_path"
16873  fi
16874
16875    # remove trailing .exe if any
16876    new_path="${new_path/%.exe/}"
16877
16878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16880  fi
16881
16882    else
16883      # We're on a unix platform. Hooray! :)
16884      # First separate the path from the arguments. This will split at the first
16885      # space.
16886      complete="$FOUND_MAKE"
16887      path="${complete%% *}"
16888      tmp="$complete EOL"
16889      arguments="${tmp#* }"
16890
16891      # Cannot rely on the command "which" here since it doesn't always work.
16892      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16893      if test -z "$is_absolute_path"; then
16894        # Path to executable is not absolute. Find it.
16895        IFS_save="$IFS"
16896        IFS=:
16897        for p in $PATH; do
16898          if test -f "$p/$path" && test -x "$p/$path"; then
16899            new_path="$p/$path"
16900            break
16901          fi
16902        done
16903        IFS="$IFS_save"
16904      else
16905        # This is an absolute path, we can use it without further modifications.
16906        new_path="$path"
16907      fi
16908
16909      if test "x$new_path" = x; then
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16911$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16912        has_space=`$ECHO "$complete" | $GREP " "`
16913        if test "x$has_space" != x; then
16914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16916        fi
16917        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16918      fi
16919    fi
16920
16921    # Now join together the path and the arguments once again
16922    if test "x$arguments" != xEOL; then
16923      new_complete="$new_path ${arguments% *}"
16924    else
16925      new_complete="$new_path"
16926    fi
16927
16928    if test "x$complete" != "x$new_complete"; then
16929      FOUND_MAKE="$new_complete"
16930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16931$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16932    fi
16933  fi
16934
16935        fi
16936      fi
16937    fi
16938  fi
16939
16940        if test "x$FOUND_MAKE" = x; then
16941          for ac_prog in make
16942do
16943  # Extract the first word of "$ac_prog", so it can be a program name with args.
16944set dummy $ac_prog; ac_word=$2
16945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16946$as_echo_n "checking for $ac_word... " >&6; }
16947if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16948  $as_echo_n "(cached) " >&6
16949else
16950  case $CHECK_TOOLSDIR_MAKE in
16951  [\\/]* | ?:[\\/]*)
16952  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16953  ;;
16954  *)
16955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16956for as_dir in $PATH
16957do
16958  IFS=$as_save_IFS
16959  test -z "$as_dir" && as_dir=.
16960    for ac_exec_ext in '' $ac_executable_extensions; do
16961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16962    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16964    break 2
16965  fi
16966done
16967  done
16968IFS=$as_save_IFS
16969
16970  ;;
16971esac
16972fi
16973CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16974if test -n "$CHECK_TOOLSDIR_MAKE"; then
16975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16976$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16977else
16978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16979$as_echo "no" >&6; }
16980fi
16981
16982
16983  test -n "$CHECK_TOOLSDIR_MAKE" && break
16984done
16985
16986
16987  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16988  DESCRIPTION="make in tools-dir"
16989  if test "x$MAKE_CANDIDATE" != x; then
16990    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16991$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16992    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16993    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16994    if test "x$IS_GNU_MAKE" = x; then
16995      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16996$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16997    else
16998      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16999      if test "x$IS_MODERN_MAKE" = x; then
17000        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17001$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version 3.81 or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17002      else
17003        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17004          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17005            MAKE_EXPECTED_ENV='cygwin'
17006          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17007            MAKE_EXPECTED_ENV='msys'
17008          else
17009            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17010          fi
17011          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17012          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17013        else
17014          # Not relevant for non-Windows
17015          IS_MAKE_CORRECT_ENV=true
17016        fi
17017        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17018          { $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
17019$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;}
17020        else
17021          FOUND_MAKE=$MAKE_CANDIDATE
17022
17023  # Only process if variable expands to non-empty
17024
17025  if test "x$FOUND_MAKE" != x; then
17026    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17027
17028  # First separate the path from the arguments. This will split at the first
17029  # space.
17030  complete="$FOUND_MAKE"
17031  path="${complete%% *}"
17032  tmp="$complete EOL"
17033  arguments="${tmp#* }"
17034
17035  # Input might be given as Windows format, start by converting to
17036  # unix format.
17037  new_path=`$CYGPATH -u "$path"`
17038
17039  # Now try to locate executable using which
17040  new_path=`$WHICH "$new_path" 2> /dev/null`
17041  # bat and cmd files are not always considered executable in cygwin causing which
17042  # to not find them
17043  if test "x$new_path" = x \
17044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17046    new_path=`$CYGPATH -u "$path"`
17047  fi
17048  if test "x$new_path" = x; then
17049    # Oops. Which didn't find the executable.
17050    # The splitting of arguments from the executable at a space might have been incorrect,
17051    # since paths with space are more likely in Windows. Give it another try with the whole
17052    # argument.
17053    path="$complete"
17054    arguments="EOL"
17055    new_path=`$CYGPATH -u "$path"`
17056    new_path=`$WHICH "$new_path" 2> /dev/null`
17057    # bat and cmd files are not always considered executable in cygwin causing which
17058    # to not find them
17059    if test "x$new_path" = x \
17060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17062      new_path=`$CYGPATH -u "$path"`
17063    fi
17064    if test "x$new_path" = x; then
17065      # It's still not found. Now this is an unrecoverable error.
17066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17067$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17068      has_space=`$ECHO "$complete" | $GREP " "`
17069      if test "x$has_space" != x; then
17070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17072      fi
17073      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17074    fi
17075  fi
17076
17077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17080  # "foo.exe" is OK but "foo" is an error.
17081  #
17082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17083  # It is also a way to make sure we got the proper file name for the real test later on.
17084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17085  if test "x$test_shortpath" = x; then
17086    # Short path failed, file does not exist as specified.
17087    # Try adding .exe or .cmd
17088    if test -f "${new_path}.exe"; then
17089      input_to_shortpath="${new_path}.exe"
17090    elif test -f "${new_path}.cmd"; then
17091      input_to_shortpath="${new_path}.cmd"
17092    else
17093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17094$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17097      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17098    fi
17099  else
17100    input_to_shortpath="$new_path"
17101  fi
17102
17103  # Call helper function which possibly converts this using DOS-style short mode.
17104  # If so, the updated path is stored in $new_path.
17105  new_path="$input_to_shortpath"
17106
17107  input_path="$input_to_shortpath"
17108  # Check if we need to convert this using DOS-style short mode. If the path
17109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17110  # take no chances and rewrite it.
17111  # Note: m4 eats our [], so we need to use [ and ] instead.
17112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17113  if test "x$has_forbidden_chars" != x; then
17114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17118      # Going to short mode and back again did indeed matter. Since short mode is
17119      # case insensitive, let's make it lowercase to improve readability.
17120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17121      # Now convert it back to Unix-stile (cygpath)
17122      input_path=`$CYGPATH -u "$shortmode_path"`
17123      new_path="$input_path"
17124    fi
17125  fi
17126
17127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17128  if test "x$test_cygdrive_prefix" = x; then
17129    # As a simple fix, exclude /usr/bin since it's not a real path.
17130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17132      # a path prefixed by /cygdrive for fixpath to work.
17133      new_path="$CYGWIN_ROOT_PATH$input_path"
17134    fi
17135  fi
17136
17137  # remove trailing .exe if any
17138  new_path="${new_path/%.exe/}"
17139
17140    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17141
17142  # First separate the path from the arguments. This will split at the first
17143  # space.
17144  complete="$FOUND_MAKE"
17145  path="${complete%% *}"
17146  tmp="$complete EOL"
17147  arguments="${tmp#* }"
17148
17149  # Input might be given as Windows format, start by converting to
17150  # unix format.
17151  new_path="$path"
17152
17153  windows_path="$new_path"
17154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17155    unix_path=`$CYGPATH -u "$windows_path"`
17156    new_path="$unix_path"
17157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17159    new_path="$unix_path"
17160  fi
17161
17162
17163  # Now try to locate executable using which
17164  new_path=`$WHICH "$new_path" 2> /dev/null`
17165
17166  if test "x$new_path" = x; then
17167    # Oops. Which didn't find the executable.
17168    # The splitting of arguments from the executable at a space might have been incorrect,
17169    # since paths with space are more likely in Windows. Give it another try with the whole
17170    # argument.
17171    path="$complete"
17172    arguments="EOL"
17173    new_path="$path"
17174
17175  windows_path="$new_path"
17176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17177    unix_path=`$CYGPATH -u "$windows_path"`
17178    new_path="$unix_path"
17179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17181    new_path="$unix_path"
17182  fi
17183
17184
17185    new_path=`$WHICH "$new_path" 2> /dev/null`
17186    # bat and cmd files are not always considered executable in MSYS causing which
17187    # to not find them
17188    if test "x$new_path" = x \
17189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17191      new_path="$path"
17192
17193  windows_path="$new_path"
17194  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17195    unix_path=`$CYGPATH -u "$windows_path"`
17196    new_path="$unix_path"
17197  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17198    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17199    new_path="$unix_path"
17200  fi
17201
17202    fi
17203
17204    if test "x$new_path" = x; then
17205      # It's still not found. Now this is an unrecoverable error.
17206      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17207$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17208      has_space=`$ECHO "$complete" | $GREP " "`
17209      if test "x$has_space" != x; then
17210        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17211$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17212      fi
17213      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17214    fi
17215  fi
17216
17217  # Now new_path has a complete unix path to the binary
17218  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17219    # Keep paths in /bin as-is, but remove trailing .exe if any
17220    new_path="${new_path/%.exe/}"
17221    # Do not save /bin paths to all_fixpath_prefixes!
17222  else
17223    # Not in mixed or Windows style, start by that.
17224    new_path=`cmd //c echo $new_path`
17225
17226  input_path="$new_path"
17227  # Check if we need to convert this using DOS-style short mode. If the path
17228  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17229  # take no chances and rewrite it.
17230  # Note: m4 eats our [], so we need to use [ and ] instead.
17231  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17232  if test "x$has_forbidden_chars" != x; then
17233    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17234    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17235  fi
17236
17237    # Output is in $new_path
17238
17239  windows_path="$new_path"
17240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17241    unix_path=`$CYGPATH -u "$windows_path"`
17242    new_path="$unix_path"
17243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17245    new_path="$unix_path"
17246  fi
17247
17248    # remove trailing .exe if any
17249    new_path="${new_path/%.exe/}"
17250
17251    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17252    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17253  fi
17254
17255    else
17256      # We're on a unix platform. Hooray! :)
17257      # First separate the path from the arguments. This will split at the first
17258      # space.
17259      complete="$FOUND_MAKE"
17260      path="${complete%% *}"
17261      tmp="$complete EOL"
17262      arguments="${tmp#* }"
17263
17264      # Cannot rely on the command "which" here since it doesn't always work.
17265      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17266      if test -z "$is_absolute_path"; then
17267        # Path to executable is not absolute. Find it.
17268        IFS_save="$IFS"
17269        IFS=:
17270        for p in $PATH; do
17271          if test -f "$p/$path" && test -x "$p/$path"; then
17272            new_path="$p/$path"
17273            break
17274          fi
17275        done
17276        IFS="$IFS_save"
17277      else
17278        # This is an absolute path, we can use it without further modifications.
17279        new_path="$path"
17280      fi
17281
17282      if test "x$new_path" = x; then
17283        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17284$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17285        has_space=`$ECHO "$complete" | $GREP " "`
17286        if test "x$has_space" != x; then
17287          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17288$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17289        fi
17290        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17291      fi
17292    fi
17293
17294    # Now join together the path and the arguments once again
17295    if test "x$arguments" != xEOL; then
17296      new_complete="$new_path ${arguments% *}"
17297    else
17298      new_complete="$new_path"
17299    fi
17300
17301    if test "x$complete" != "x$new_complete"; then
17302      FOUND_MAKE="$new_complete"
17303      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17304$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17305    fi
17306  fi
17307
17308        fi
17309      fi
17310    fi
17311  fi
17312
17313        fi
17314        PATH=$OLD_PATH
17315      fi
17316    fi
17317
17318    if test "x$FOUND_MAKE" = x; then
17319      as_fn_error $? "Cannot find GNU make 3.81 or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
17320    fi
17321  fi
17322
17323  MAKE=$FOUND_MAKE
17324
17325  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17326$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17327
17328
17329  # Check if make supports the output sync option and if so, setup using it.
17330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17331$as_echo_n "checking if make --output-sync is supported... " >&6; }
17332  if $MAKE --version -O > /dev/null 2>&1; then
17333    OUTPUT_SYNC_SUPPORTED=true
17334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17335$as_echo "yes" >&6; }
17336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17337$as_echo_n "checking for output-sync value... " >&6; }
17338
17339# Check whether --with-output-sync was given.
17340if test "${with_output_sync+set}" = set; then :
17341  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17342fi
17343
17344    if test "x$OUTPUT_SYNC" = "x"; then
17345      OUTPUT_SYNC=none
17346    fi
17347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17348$as_echo "$OUTPUT_SYNC" >&6; }
17349    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17350      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17351    fi
17352  else
17353    OUTPUT_SYNC_SUPPORTED=false
17354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17355$as_echo "no" >&6; }
17356  fi
17357
17358
17359
17360
17361
17362
17363  # Test if find supports -delete
17364  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17365$as_echo_n "checking if find supports -delete... " >&6; }
17366  FIND_DELETE="-delete"
17367
17368  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17369
17370  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17371
17372  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17373  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17374    # No, it does not.
17375    rm $DELETEDIR/TestIfFindSupportsDelete
17376    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17377      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17378      FIND_DELETE="-print | xargs rm"
17379    else
17380      FIND_DELETE="-exec rm \{\} \+"
17381    fi
17382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17383$as_echo "no" >&6; }
17384  else
17385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17386$as_echo "yes" >&6; }
17387  fi
17388  rmdir $DELETEDIR
17389
17390
17391
17392  # These tools might not be installed by default,
17393  # need hint on how to install them.
17394
17395
17396
17397  # Publish this variable in the help.
17398
17399
17400  if test "x$UNZIP" = x; then
17401    # The variable is not set by user, try to locate tool using the code snippet
17402    for ac_prog in unzip
17403do
17404  # Extract the first word of "$ac_prog", so it can be a program name with args.
17405set dummy $ac_prog; ac_word=$2
17406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17407$as_echo_n "checking for $ac_word... " >&6; }
17408if ${ac_cv_path_UNZIP+:} false; then :
17409  $as_echo_n "(cached) " >&6
17410else
17411  case $UNZIP in
17412  [\\/]* | ?:[\\/]*)
17413  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17414  ;;
17415  *)
17416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17417for as_dir in $PATH
17418do
17419  IFS=$as_save_IFS
17420  test -z "$as_dir" && as_dir=.
17421    for ac_exec_ext in '' $ac_executable_extensions; do
17422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17423    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17425    break 2
17426  fi
17427done
17428  done
17429IFS=$as_save_IFS
17430
17431  ;;
17432esac
17433fi
17434UNZIP=$ac_cv_path_UNZIP
17435if test -n "$UNZIP"; then
17436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17437$as_echo "$UNZIP" >&6; }
17438else
17439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17440$as_echo "no" >&6; }
17441fi
17442
17443
17444  test -n "$UNZIP" && break
17445done
17446
17447  else
17448    # The variable is set, but is it from the command line or the environment?
17449
17450    # Try to remove the string !UNZIP! from our list.
17451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17453      # If it failed, the variable was not from the command line. Ignore it,
17454      # but warn the user (except for BASH, which is always set by the calling BASH).
17455      if test "xUNZIP" != xBASH; then
17456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17457$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17458      fi
17459      # Try to locate tool using the code snippet
17460      for ac_prog in unzip
17461do
17462  # Extract the first word of "$ac_prog", so it can be a program name with args.
17463set dummy $ac_prog; ac_word=$2
17464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17465$as_echo_n "checking for $ac_word... " >&6; }
17466if ${ac_cv_path_UNZIP+:} false; then :
17467  $as_echo_n "(cached) " >&6
17468else
17469  case $UNZIP in
17470  [\\/]* | ?:[\\/]*)
17471  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17472  ;;
17473  *)
17474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17475for as_dir in $PATH
17476do
17477  IFS=$as_save_IFS
17478  test -z "$as_dir" && as_dir=.
17479    for ac_exec_ext in '' $ac_executable_extensions; do
17480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17481    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17483    break 2
17484  fi
17485done
17486  done
17487IFS=$as_save_IFS
17488
17489  ;;
17490esac
17491fi
17492UNZIP=$ac_cv_path_UNZIP
17493if test -n "$UNZIP"; then
17494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17495$as_echo "$UNZIP" >&6; }
17496else
17497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17498$as_echo "no" >&6; }
17499fi
17500
17501
17502  test -n "$UNZIP" && break
17503done
17504
17505    else
17506      # If it succeeded, then it was overridden by the user. We will use it
17507      # for the tool.
17508
17509      # First remove it from the list of overridden variables, so we can test
17510      # for unknown variables in the end.
17511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17512
17513      # Check if the provided tool contains a complete path.
17514      tool_specified="$UNZIP"
17515      tool_basename="${tool_specified##*/}"
17516      if test "x$tool_basename" = "x$tool_specified"; then
17517        # A command without a complete path is provided, search $PATH.
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17519$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17520        # Extract the first word of "$tool_basename", so it can be a program name with args.
17521set dummy $tool_basename; ac_word=$2
17522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17523$as_echo_n "checking for $ac_word... " >&6; }
17524if ${ac_cv_path_UNZIP+:} false; then :
17525  $as_echo_n "(cached) " >&6
17526else
17527  case $UNZIP in
17528  [\\/]* | ?:[\\/]*)
17529  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17530  ;;
17531  *)
17532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17533for as_dir in $PATH
17534do
17535  IFS=$as_save_IFS
17536  test -z "$as_dir" && as_dir=.
17537    for ac_exec_ext in '' $ac_executable_extensions; do
17538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17539    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17541    break 2
17542  fi
17543done
17544  done
17545IFS=$as_save_IFS
17546
17547  ;;
17548esac
17549fi
17550UNZIP=$ac_cv_path_UNZIP
17551if test -n "$UNZIP"; then
17552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17553$as_echo "$UNZIP" >&6; }
17554else
17555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17556$as_echo "no" >&6; }
17557fi
17558
17559
17560        if test "x$UNZIP" = x; then
17561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17562        fi
17563      else
17564        # Otherwise we believe it is a complete path. Use it as it is.
17565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17566$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17568$as_echo_n "checking for UNZIP... " >&6; }
17569        if test ! -x "$tool_specified"; then
17570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17571$as_echo "not found" >&6; }
17572          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17573        fi
17574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17575$as_echo "$tool_specified" >&6; }
17576      fi
17577    fi
17578  fi
17579
17580
17581
17582  if test "x$UNZIP" = x; then
17583    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17584  fi
17585
17586
17587
17588
17589
17590  # Publish this variable in the help.
17591
17592
17593  if test "x$ZIP" = x; then
17594    # The variable is not set by user, try to locate tool using the code snippet
17595    for ac_prog in zip
17596do
17597  # Extract the first word of "$ac_prog", so it can be a program name with args.
17598set dummy $ac_prog; ac_word=$2
17599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17600$as_echo_n "checking for $ac_word... " >&6; }
17601if ${ac_cv_path_ZIP+:} false; then :
17602  $as_echo_n "(cached) " >&6
17603else
17604  case $ZIP in
17605  [\\/]* | ?:[\\/]*)
17606  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17607  ;;
17608  *)
17609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17610for as_dir in $PATH
17611do
17612  IFS=$as_save_IFS
17613  test -z "$as_dir" && as_dir=.
17614    for ac_exec_ext in '' $ac_executable_extensions; do
17615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17616    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17618    break 2
17619  fi
17620done
17621  done
17622IFS=$as_save_IFS
17623
17624  ;;
17625esac
17626fi
17627ZIP=$ac_cv_path_ZIP
17628if test -n "$ZIP"; then
17629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17630$as_echo "$ZIP" >&6; }
17631else
17632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17633$as_echo "no" >&6; }
17634fi
17635
17636
17637  test -n "$ZIP" && break
17638done
17639
17640  else
17641    # The variable is set, but is it from the command line or the environment?
17642
17643    # Try to remove the string !ZIP! from our list.
17644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17646      # If it failed, the variable was not from the command line. Ignore it,
17647      # but warn the user (except for BASH, which is always set by the calling BASH).
17648      if test "xZIP" != xBASH; then
17649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17650$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17651      fi
17652      # Try to locate tool using the code snippet
17653      for ac_prog in zip
17654do
17655  # Extract the first word of "$ac_prog", so it can be a program name with args.
17656set dummy $ac_prog; ac_word=$2
17657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17658$as_echo_n "checking for $ac_word... " >&6; }
17659if ${ac_cv_path_ZIP+:} false; then :
17660  $as_echo_n "(cached) " >&6
17661else
17662  case $ZIP in
17663  [\\/]* | ?:[\\/]*)
17664  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17665  ;;
17666  *)
17667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17668for as_dir in $PATH
17669do
17670  IFS=$as_save_IFS
17671  test -z "$as_dir" && as_dir=.
17672    for ac_exec_ext in '' $ac_executable_extensions; do
17673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17674    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17676    break 2
17677  fi
17678done
17679  done
17680IFS=$as_save_IFS
17681
17682  ;;
17683esac
17684fi
17685ZIP=$ac_cv_path_ZIP
17686if test -n "$ZIP"; then
17687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17688$as_echo "$ZIP" >&6; }
17689else
17690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17691$as_echo "no" >&6; }
17692fi
17693
17694
17695  test -n "$ZIP" && break
17696done
17697
17698    else
17699      # If it succeeded, then it was overridden by the user. We will use it
17700      # for the tool.
17701
17702      # First remove it from the list of overridden variables, so we can test
17703      # for unknown variables in the end.
17704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17705
17706      # Check if the provided tool contains a complete path.
17707      tool_specified="$ZIP"
17708      tool_basename="${tool_specified##*/}"
17709      if test "x$tool_basename" = "x$tool_specified"; then
17710        # A command without a complete path is provided, search $PATH.
17711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17712$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17713        # Extract the first word of "$tool_basename", so it can be a program name with args.
17714set dummy $tool_basename; ac_word=$2
17715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17716$as_echo_n "checking for $ac_word... " >&6; }
17717if ${ac_cv_path_ZIP+:} false; then :
17718  $as_echo_n "(cached) " >&6
17719else
17720  case $ZIP in
17721  [\\/]* | ?:[\\/]*)
17722  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17723  ;;
17724  *)
17725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17726for as_dir in $PATH
17727do
17728  IFS=$as_save_IFS
17729  test -z "$as_dir" && as_dir=.
17730    for ac_exec_ext in '' $ac_executable_extensions; do
17731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17732    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17734    break 2
17735  fi
17736done
17737  done
17738IFS=$as_save_IFS
17739
17740  ;;
17741esac
17742fi
17743ZIP=$ac_cv_path_ZIP
17744if test -n "$ZIP"; then
17745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17746$as_echo "$ZIP" >&6; }
17747else
17748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17749$as_echo "no" >&6; }
17750fi
17751
17752
17753        if test "x$ZIP" = x; then
17754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17755        fi
17756      else
17757        # Otherwise we believe it is a complete path. Use it as it is.
17758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17759$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17761$as_echo_n "checking for ZIP... " >&6; }
17762        if test ! -x "$tool_specified"; then
17763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17764$as_echo "not found" >&6; }
17765          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17766        fi
17767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17768$as_echo "$tool_specified" >&6; }
17769      fi
17770    fi
17771  fi
17772
17773
17774
17775  if test "x$ZIP" = x; then
17776    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17777  fi
17778
17779
17780
17781  # Non-required basic tools
17782
17783
17784
17785  # Publish this variable in the help.
17786
17787
17788  if test "x$LDD" = x; then
17789    # The variable is not set by user, try to locate tool using the code snippet
17790    for ac_prog in ldd
17791do
17792  # Extract the first word of "$ac_prog", so it can be a program name with args.
17793set dummy $ac_prog; ac_word=$2
17794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17795$as_echo_n "checking for $ac_word... " >&6; }
17796if ${ac_cv_path_LDD+:} false; then :
17797  $as_echo_n "(cached) " >&6
17798else
17799  case $LDD in
17800  [\\/]* | ?:[\\/]*)
17801  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17802  ;;
17803  *)
17804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17805for as_dir in $PATH
17806do
17807  IFS=$as_save_IFS
17808  test -z "$as_dir" && as_dir=.
17809    for ac_exec_ext in '' $ac_executable_extensions; do
17810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17811    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17813    break 2
17814  fi
17815done
17816  done
17817IFS=$as_save_IFS
17818
17819  ;;
17820esac
17821fi
17822LDD=$ac_cv_path_LDD
17823if test -n "$LDD"; then
17824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17825$as_echo "$LDD" >&6; }
17826else
17827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17828$as_echo "no" >&6; }
17829fi
17830
17831
17832  test -n "$LDD" && break
17833done
17834
17835  else
17836    # The variable is set, but is it from the command line or the environment?
17837
17838    # Try to remove the string !LDD! from our list.
17839    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17840    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17841      # If it failed, the variable was not from the command line. Ignore it,
17842      # but warn the user (except for BASH, which is always set by the calling BASH).
17843      if test "xLDD" != xBASH; then
17844        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17845$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17846      fi
17847      # Try to locate tool using the code snippet
17848      for ac_prog in ldd
17849do
17850  # Extract the first word of "$ac_prog", so it can be a program name with args.
17851set dummy $ac_prog; ac_word=$2
17852{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17853$as_echo_n "checking for $ac_word... " >&6; }
17854if ${ac_cv_path_LDD+:} false; then :
17855  $as_echo_n "(cached) " >&6
17856else
17857  case $LDD in
17858  [\\/]* | ?:[\\/]*)
17859  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17860  ;;
17861  *)
17862  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17863for as_dir in $PATH
17864do
17865  IFS=$as_save_IFS
17866  test -z "$as_dir" && as_dir=.
17867    for ac_exec_ext in '' $ac_executable_extensions; do
17868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17869    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17871    break 2
17872  fi
17873done
17874  done
17875IFS=$as_save_IFS
17876
17877  ;;
17878esac
17879fi
17880LDD=$ac_cv_path_LDD
17881if test -n "$LDD"; then
17882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17883$as_echo "$LDD" >&6; }
17884else
17885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17886$as_echo "no" >&6; }
17887fi
17888
17889
17890  test -n "$LDD" && break
17891done
17892
17893    else
17894      # If it succeeded, then it was overridden by the user. We will use it
17895      # for the tool.
17896
17897      # First remove it from the list of overridden variables, so we can test
17898      # for unknown variables in the end.
17899      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17900
17901      # Check if the provided tool contains a complete path.
17902      tool_specified="$LDD"
17903      tool_basename="${tool_specified##*/}"
17904      if test "x$tool_basename" = "x$tool_specified"; then
17905        # A command without a complete path is provided, search $PATH.
17906        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17907$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17908        # Extract the first word of "$tool_basename", so it can be a program name with args.
17909set dummy $tool_basename; ac_word=$2
17910{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17911$as_echo_n "checking for $ac_word... " >&6; }
17912if ${ac_cv_path_LDD+:} false; then :
17913  $as_echo_n "(cached) " >&6
17914else
17915  case $LDD in
17916  [\\/]* | ?:[\\/]*)
17917  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17918  ;;
17919  *)
17920  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17921for as_dir in $PATH
17922do
17923  IFS=$as_save_IFS
17924  test -z "$as_dir" && as_dir=.
17925    for ac_exec_ext in '' $ac_executable_extensions; do
17926  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17927    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17928    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17929    break 2
17930  fi
17931done
17932  done
17933IFS=$as_save_IFS
17934
17935  ;;
17936esac
17937fi
17938LDD=$ac_cv_path_LDD
17939if test -n "$LDD"; then
17940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17941$as_echo "$LDD" >&6; }
17942else
17943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17944$as_echo "no" >&6; }
17945fi
17946
17947
17948        if test "x$LDD" = x; then
17949          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17950        fi
17951      else
17952        # Otherwise we believe it is a complete path. Use it as it is.
17953        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17954$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17955        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17956$as_echo_n "checking for LDD... " >&6; }
17957        if test ! -x "$tool_specified"; then
17958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17959$as_echo "not found" >&6; }
17960          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17961        fi
17962        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17963$as_echo "$tool_specified" >&6; }
17964      fi
17965    fi
17966  fi
17967
17968
17969  if test "x$LDD" = "x"; then
17970    # List shared lib dependencies is used for
17971    # debug output and checking for forbidden dependencies.
17972    # We can build without it.
17973    LDD="true"
17974  fi
17975
17976
17977  # Publish this variable in the help.
17978
17979
17980  if test "x$OTOOL" = x; then
17981    # The variable is not set by user, try to locate tool using the code snippet
17982    for ac_prog in otool
17983do
17984  # Extract the first word of "$ac_prog", so it can be a program name with args.
17985set dummy $ac_prog; ac_word=$2
17986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17987$as_echo_n "checking for $ac_word... " >&6; }
17988if ${ac_cv_path_OTOOL+:} false; then :
17989  $as_echo_n "(cached) " >&6
17990else
17991  case $OTOOL in
17992  [\\/]* | ?:[\\/]*)
17993  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17994  ;;
17995  *)
17996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17997for as_dir in $PATH
17998do
17999  IFS=$as_save_IFS
18000  test -z "$as_dir" && as_dir=.
18001    for ac_exec_ext in '' $ac_executable_extensions; do
18002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18003    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18005    break 2
18006  fi
18007done
18008  done
18009IFS=$as_save_IFS
18010
18011  ;;
18012esac
18013fi
18014OTOOL=$ac_cv_path_OTOOL
18015if test -n "$OTOOL"; then
18016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18017$as_echo "$OTOOL" >&6; }
18018else
18019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18020$as_echo "no" >&6; }
18021fi
18022
18023
18024  test -n "$OTOOL" && break
18025done
18026
18027  else
18028    # The variable is set, but is it from the command line or the environment?
18029
18030    # Try to remove the string !OTOOL! from our list.
18031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18033      # If it failed, the variable was not from the command line. Ignore it,
18034      # but warn the user (except for BASH, which is always set by the calling BASH).
18035      if test "xOTOOL" != xBASH; then
18036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18037$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18038      fi
18039      # Try to locate tool using the code snippet
18040      for ac_prog in otool
18041do
18042  # Extract the first word of "$ac_prog", so it can be a program name with args.
18043set dummy $ac_prog; ac_word=$2
18044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18045$as_echo_n "checking for $ac_word... " >&6; }
18046if ${ac_cv_path_OTOOL+:} false; then :
18047  $as_echo_n "(cached) " >&6
18048else
18049  case $OTOOL in
18050  [\\/]* | ?:[\\/]*)
18051  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18052  ;;
18053  *)
18054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18055for as_dir in $PATH
18056do
18057  IFS=$as_save_IFS
18058  test -z "$as_dir" && as_dir=.
18059    for ac_exec_ext in '' $ac_executable_extensions; do
18060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18061    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18063    break 2
18064  fi
18065done
18066  done
18067IFS=$as_save_IFS
18068
18069  ;;
18070esac
18071fi
18072OTOOL=$ac_cv_path_OTOOL
18073if test -n "$OTOOL"; then
18074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18075$as_echo "$OTOOL" >&6; }
18076else
18077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18078$as_echo "no" >&6; }
18079fi
18080
18081
18082  test -n "$OTOOL" && break
18083done
18084
18085    else
18086      # If it succeeded, then it was overridden by the user. We will use it
18087      # for the tool.
18088
18089      # First remove it from the list of overridden variables, so we can test
18090      # for unknown variables in the end.
18091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18092
18093      # Check if the provided tool contains a complete path.
18094      tool_specified="$OTOOL"
18095      tool_basename="${tool_specified##*/}"
18096      if test "x$tool_basename" = "x$tool_specified"; then
18097        # A command without a complete path is provided, search $PATH.
18098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18099$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18100        # Extract the first word of "$tool_basename", so it can be a program name with args.
18101set dummy $tool_basename; ac_word=$2
18102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18103$as_echo_n "checking for $ac_word... " >&6; }
18104if ${ac_cv_path_OTOOL+:} false; then :
18105  $as_echo_n "(cached) " >&6
18106else
18107  case $OTOOL in
18108  [\\/]* | ?:[\\/]*)
18109  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18110  ;;
18111  *)
18112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18113for as_dir in $PATH
18114do
18115  IFS=$as_save_IFS
18116  test -z "$as_dir" && as_dir=.
18117    for ac_exec_ext in '' $ac_executable_extensions; do
18118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18119    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18121    break 2
18122  fi
18123done
18124  done
18125IFS=$as_save_IFS
18126
18127  ;;
18128esac
18129fi
18130OTOOL=$ac_cv_path_OTOOL
18131if test -n "$OTOOL"; then
18132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18133$as_echo "$OTOOL" >&6; }
18134else
18135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18136$as_echo "no" >&6; }
18137fi
18138
18139
18140        if test "x$OTOOL" = x; then
18141          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18142        fi
18143      else
18144        # Otherwise we believe it is a complete path. Use it as it is.
18145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18146$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18148$as_echo_n "checking for OTOOL... " >&6; }
18149        if test ! -x "$tool_specified"; then
18150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18151$as_echo "not found" >&6; }
18152          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18153        fi
18154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18155$as_echo "$tool_specified" >&6; }
18156      fi
18157    fi
18158  fi
18159
18160
18161  if test "x$OTOOL" = "x"; then
18162    OTOOL="true"
18163  fi
18164
18165
18166  # Publish this variable in the help.
18167
18168
18169  if test "x$READELF" = x; then
18170    # The variable is not set by user, try to locate tool using the code snippet
18171    for ac_prog in greadelf readelf
18172do
18173  # Extract the first word of "$ac_prog", so it can be a program name with args.
18174set dummy $ac_prog; ac_word=$2
18175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18176$as_echo_n "checking for $ac_word... " >&6; }
18177if ${ac_cv_path_READELF+:} false; then :
18178  $as_echo_n "(cached) " >&6
18179else
18180  case $READELF in
18181  [\\/]* | ?:[\\/]*)
18182  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18183  ;;
18184  *)
18185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18186for as_dir in $PATH
18187do
18188  IFS=$as_save_IFS
18189  test -z "$as_dir" && as_dir=.
18190    for ac_exec_ext in '' $ac_executable_extensions; do
18191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18192    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18194    break 2
18195  fi
18196done
18197  done
18198IFS=$as_save_IFS
18199
18200  ;;
18201esac
18202fi
18203READELF=$ac_cv_path_READELF
18204if test -n "$READELF"; then
18205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18206$as_echo "$READELF" >&6; }
18207else
18208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18209$as_echo "no" >&6; }
18210fi
18211
18212
18213  test -n "$READELF" && break
18214done
18215
18216  else
18217    # The variable is set, but is it from the command line or the environment?
18218
18219    # Try to remove the string !READELF! from our list.
18220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18222      # If it failed, the variable was not from the command line. Ignore it,
18223      # but warn the user (except for BASH, which is always set by the calling BASH).
18224      if test "xREADELF" != xBASH; then
18225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18226$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18227      fi
18228      # Try to locate tool using the code snippet
18229      for ac_prog in greadelf readelf
18230do
18231  # Extract the first word of "$ac_prog", so it can be a program name with args.
18232set dummy $ac_prog; ac_word=$2
18233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18234$as_echo_n "checking for $ac_word... " >&6; }
18235if ${ac_cv_path_READELF+:} false; then :
18236  $as_echo_n "(cached) " >&6
18237else
18238  case $READELF in
18239  [\\/]* | ?:[\\/]*)
18240  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18241  ;;
18242  *)
18243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18244for as_dir in $PATH
18245do
18246  IFS=$as_save_IFS
18247  test -z "$as_dir" && as_dir=.
18248    for ac_exec_ext in '' $ac_executable_extensions; do
18249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18250    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18252    break 2
18253  fi
18254done
18255  done
18256IFS=$as_save_IFS
18257
18258  ;;
18259esac
18260fi
18261READELF=$ac_cv_path_READELF
18262if test -n "$READELF"; then
18263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18264$as_echo "$READELF" >&6; }
18265else
18266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18267$as_echo "no" >&6; }
18268fi
18269
18270
18271  test -n "$READELF" && break
18272done
18273
18274    else
18275      # If it succeeded, then it was overridden by the user. We will use it
18276      # for the tool.
18277
18278      # First remove it from the list of overridden variables, so we can test
18279      # for unknown variables in the end.
18280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18281
18282      # Check if the provided tool contains a complete path.
18283      tool_specified="$READELF"
18284      tool_basename="${tool_specified##*/}"
18285      if test "x$tool_basename" = "x$tool_specified"; then
18286        # A command without a complete path is provided, search $PATH.
18287        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18288$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18289        # Extract the first word of "$tool_basename", so it can be a program name with args.
18290set dummy $tool_basename; ac_word=$2
18291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18292$as_echo_n "checking for $ac_word... " >&6; }
18293if ${ac_cv_path_READELF+:} false; then :
18294  $as_echo_n "(cached) " >&6
18295else
18296  case $READELF in
18297  [\\/]* | ?:[\\/]*)
18298  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18299  ;;
18300  *)
18301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18302for as_dir in $PATH
18303do
18304  IFS=$as_save_IFS
18305  test -z "$as_dir" && as_dir=.
18306    for ac_exec_ext in '' $ac_executable_extensions; do
18307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18308    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18310    break 2
18311  fi
18312done
18313  done
18314IFS=$as_save_IFS
18315
18316  ;;
18317esac
18318fi
18319READELF=$ac_cv_path_READELF
18320if test -n "$READELF"; then
18321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18322$as_echo "$READELF" >&6; }
18323else
18324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18325$as_echo "no" >&6; }
18326fi
18327
18328
18329        if test "x$READELF" = x; then
18330          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18331        fi
18332      else
18333        # Otherwise we believe it is a complete path. Use it as it is.
18334        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18335$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18337$as_echo_n "checking for READELF... " >&6; }
18338        if test ! -x "$tool_specified"; then
18339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18340$as_echo "not found" >&6; }
18341          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18342        fi
18343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18344$as_echo "$tool_specified" >&6; }
18345      fi
18346    fi
18347  fi
18348
18349
18350
18351
18352  # Publish this variable in the help.
18353
18354
18355  if test "x$HG" = x; then
18356    # The variable is not set by user, try to locate tool using the code snippet
18357    for ac_prog in hg
18358do
18359  # Extract the first word of "$ac_prog", so it can be a program name with args.
18360set dummy $ac_prog; ac_word=$2
18361{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18362$as_echo_n "checking for $ac_word... " >&6; }
18363if ${ac_cv_path_HG+:} false; then :
18364  $as_echo_n "(cached) " >&6
18365else
18366  case $HG in
18367  [\\/]* | ?:[\\/]*)
18368  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18369  ;;
18370  *)
18371  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18372for as_dir in $PATH
18373do
18374  IFS=$as_save_IFS
18375  test -z "$as_dir" && as_dir=.
18376    for ac_exec_ext in '' $ac_executable_extensions; do
18377  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18378    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18379    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18380    break 2
18381  fi
18382done
18383  done
18384IFS=$as_save_IFS
18385
18386  ;;
18387esac
18388fi
18389HG=$ac_cv_path_HG
18390if test -n "$HG"; then
18391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18392$as_echo "$HG" >&6; }
18393else
18394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18395$as_echo "no" >&6; }
18396fi
18397
18398
18399  test -n "$HG" && break
18400done
18401
18402  else
18403    # The variable is set, but is it from the command line or the environment?
18404
18405    # Try to remove the string !HG! from our list.
18406    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18407    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18408      # If it failed, the variable was not from the command line. Ignore it,
18409      # but warn the user (except for BASH, which is always set by the calling BASH).
18410      if test "xHG" != xBASH; then
18411        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18412$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18413      fi
18414      # Try to locate tool using the code snippet
18415      for ac_prog in hg
18416do
18417  # Extract the first word of "$ac_prog", so it can be a program name with args.
18418set dummy $ac_prog; ac_word=$2
18419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18420$as_echo_n "checking for $ac_word... " >&6; }
18421if ${ac_cv_path_HG+:} false; then :
18422  $as_echo_n "(cached) " >&6
18423else
18424  case $HG in
18425  [\\/]* | ?:[\\/]*)
18426  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18427  ;;
18428  *)
18429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18430for as_dir in $PATH
18431do
18432  IFS=$as_save_IFS
18433  test -z "$as_dir" && as_dir=.
18434    for ac_exec_ext in '' $ac_executable_extensions; do
18435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18436    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18438    break 2
18439  fi
18440done
18441  done
18442IFS=$as_save_IFS
18443
18444  ;;
18445esac
18446fi
18447HG=$ac_cv_path_HG
18448if test -n "$HG"; then
18449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18450$as_echo "$HG" >&6; }
18451else
18452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18453$as_echo "no" >&6; }
18454fi
18455
18456
18457  test -n "$HG" && break
18458done
18459
18460    else
18461      # If it succeeded, then it was overridden by the user. We will use it
18462      # for the tool.
18463
18464      # First remove it from the list of overridden variables, so we can test
18465      # for unknown variables in the end.
18466      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18467
18468      # Check if the provided tool contains a complete path.
18469      tool_specified="$HG"
18470      tool_basename="${tool_specified##*/}"
18471      if test "x$tool_basename" = "x$tool_specified"; then
18472        # A command without a complete path is provided, search $PATH.
18473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18474$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18475        # Extract the first word of "$tool_basename", so it can be a program name with args.
18476set dummy $tool_basename; ac_word=$2
18477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18478$as_echo_n "checking for $ac_word... " >&6; }
18479if ${ac_cv_path_HG+:} false; then :
18480  $as_echo_n "(cached) " >&6
18481else
18482  case $HG in
18483  [\\/]* | ?:[\\/]*)
18484  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18485  ;;
18486  *)
18487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18488for as_dir in $PATH
18489do
18490  IFS=$as_save_IFS
18491  test -z "$as_dir" && as_dir=.
18492    for ac_exec_ext in '' $ac_executable_extensions; do
18493  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18494    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18495    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18496    break 2
18497  fi
18498done
18499  done
18500IFS=$as_save_IFS
18501
18502  ;;
18503esac
18504fi
18505HG=$ac_cv_path_HG
18506if test -n "$HG"; then
18507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18508$as_echo "$HG" >&6; }
18509else
18510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18511$as_echo "no" >&6; }
18512fi
18513
18514
18515        if test "x$HG" = x; then
18516          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18517        fi
18518      else
18519        # Otherwise we believe it is a complete path. Use it as it is.
18520        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18521$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18523$as_echo_n "checking for HG... " >&6; }
18524        if test ! -x "$tool_specified"; then
18525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18526$as_echo "not found" >&6; }
18527          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18528        fi
18529        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18530$as_echo "$tool_specified" >&6; }
18531      fi
18532    fi
18533  fi
18534
18535
18536
18537
18538  # Publish this variable in the help.
18539
18540
18541  if test "x$STAT" = x; then
18542    # The variable is not set by user, try to locate tool using the code snippet
18543    for ac_prog in stat
18544do
18545  # Extract the first word of "$ac_prog", so it can be a program name with args.
18546set dummy $ac_prog; ac_word=$2
18547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18548$as_echo_n "checking for $ac_word... " >&6; }
18549if ${ac_cv_path_STAT+:} false; then :
18550  $as_echo_n "(cached) " >&6
18551else
18552  case $STAT in
18553  [\\/]* | ?:[\\/]*)
18554  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18555  ;;
18556  *)
18557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18558for as_dir in $PATH
18559do
18560  IFS=$as_save_IFS
18561  test -z "$as_dir" && as_dir=.
18562    for ac_exec_ext in '' $ac_executable_extensions; do
18563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18564    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18566    break 2
18567  fi
18568done
18569  done
18570IFS=$as_save_IFS
18571
18572  ;;
18573esac
18574fi
18575STAT=$ac_cv_path_STAT
18576if test -n "$STAT"; then
18577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18578$as_echo "$STAT" >&6; }
18579else
18580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18581$as_echo "no" >&6; }
18582fi
18583
18584
18585  test -n "$STAT" && break
18586done
18587
18588  else
18589    # The variable is set, but is it from the command line or the environment?
18590
18591    # Try to remove the string !STAT! from our list.
18592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18594      # If it failed, the variable was not from the command line. Ignore it,
18595      # but warn the user (except for BASH, which is always set by the calling BASH).
18596      if test "xSTAT" != xBASH; then
18597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18598$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18599      fi
18600      # Try to locate tool using the code snippet
18601      for ac_prog in stat
18602do
18603  # Extract the first word of "$ac_prog", so it can be a program name with args.
18604set dummy $ac_prog; ac_word=$2
18605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18606$as_echo_n "checking for $ac_word... " >&6; }
18607if ${ac_cv_path_STAT+:} false; then :
18608  $as_echo_n "(cached) " >&6
18609else
18610  case $STAT in
18611  [\\/]* | ?:[\\/]*)
18612  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18613  ;;
18614  *)
18615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18616for as_dir in $PATH
18617do
18618  IFS=$as_save_IFS
18619  test -z "$as_dir" && as_dir=.
18620    for ac_exec_ext in '' $ac_executable_extensions; do
18621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18622    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18624    break 2
18625  fi
18626done
18627  done
18628IFS=$as_save_IFS
18629
18630  ;;
18631esac
18632fi
18633STAT=$ac_cv_path_STAT
18634if test -n "$STAT"; then
18635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18636$as_echo "$STAT" >&6; }
18637else
18638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18639$as_echo "no" >&6; }
18640fi
18641
18642
18643  test -n "$STAT" && break
18644done
18645
18646    else
18647      # If it succeeded, then it was overridden by the user. We will use it
18648      # for the tool.
18649
18650      # First remove it from the list of overridden variables, so we can test
18651      # for unknown variables in the end.
18652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18653
18654      # Check if the provided tool contains a complete path.
18655      tool_specified="$STAT"
18656      tool_basename="${tool_specified##*/}"
18657      if test "x$tool_basename" = "x$tool_specified"; then
18658        # A command without a complete path is provided, search $PATH.
18659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18660$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18661        # Extract the first word of "$tool_basename", so it can be a program name with args.
18662set dummy $tool_basename; ac_word=$2
18663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18664$as_echo_n "checking for $ac_word... " >&6; }
18665if ${ac_cv_path_STAT+:} false; then :
18666  $as_echo_n "(cached) " >&6
18667else
18668  case $STAT in
18669  [\\/]* | ?:[\\/]*)
18670  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18671  ;;
18672  *)
18673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18674for as_dir in $PATH
18675do
18676  IFS=$as_save_IFS
18677  test -z "$as_dir" && as_dir=.
18678    for ac_exec_ext in '' $ac_executable_extensions; do
18679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18680    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18682    break 2
18683  fi
18684done
18685  done
18686IFS=$as_save_IFS
18687
18688  ;;
18689esac
18690fi
18691STAT=$ac_cv_path_STAT
18692if test -n "$STAT"; then
18693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18694$as_echo "$STAT" >&6; }
18695else
18696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18697$as_echo "no" >&6; }
18698fi
18699
18700
18701        if test "x$STAT" = x; then
18702          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18703        fi
18704      else
18705        # Otherwise we believe it is a complete path. Use it as it is.
18706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18707$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18709$as_echo_n "checking for STAT... " >&6; }
18710        if test ! -x "$tool_specified"; then
18711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18712$as_echo "not found" >&6; }
18713          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18714        fi
18715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18716$as_echo "$tool_specified" >&6; }
18717      fi
18718    fi
18719  fi
18720
18721
18722
18723
18724  # Publish this variable in the help.
18725
18726
18727  if test "x$TIME" = x; then
18728    # The variable is not set by user, try to locate tool using the code snippet
18729    for ac_prog in time
18730do
18731  # Extract the first word of "$ac_prog", so it can be a program name with args.
18732set dummy $ac_prog; ac_word=$2
18733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18734$as_echo_n "checking for $ac_word... " >&6; }
18735if ${ac_cv_path_TIME+:} false; then :
18736  $as_echo_n "(cached) " >&6
18737else
18738  case $TIME in
18739  [\\/]* | ?:[\\/]*)
18740  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18741  ;;
18742  *)
18743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18744for as_dir in $PATH
18745do
18746  IFS=$as_save_IFS
18747  test -z "$as_dir" && as_dir=.
18748    for ac_exec_ext in '' $ac_executable_extensions; do
18749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18750    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18752    break 2
18753  fi
18754done
18755  done
18756IFS=$as_save_IFS
18757
18758  ;;
18759esac
18760fi
18761TIME=$ac_cv_path_TIME
18762if test -n "$TIME"; then
18763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18764$as_echo "$TIME" >&6; }
18765else
18766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18767$as_echo "no" >&6; }
18768fi
18769
18770
18771  test -n "$TIME" && break
18772done
18773
18774  else
18775    # The variable is set, but is it from the command line or the environment?
18776
18777    # Try to remove the string !TIME! from our list.
18778    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18779    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18780      # If it failed, the variable was not from the command line. Ignore it,
18781      # but warn the user (except for BASH, which is always set by the calling BASH).
18782      if test "xTIME" != xBASH; then
18783        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18784$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18785      fi
18786      # Try to locate tool using the code snippet
18787      for ac_prog in time
18788do
18789  # Extract the first word of "$ac_prog", so it can be a program name with args.
18790set dummy $ac_prog; ac_word=$2
18791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18792$as_echo_n "checking for $ac_word... " >&6; }
18793if ${ac_cv_path_TIME+:} false; then :
18794  $as_echo_n "(cached) " >&6
18795else
18796  case $TIME in
18797  [\\/]* | ?:[\\/]*)
18798  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18799  ;;
18800  *)
18801  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18802for as_dir in $PATH
18803do
18804  IFS=$as_save_IFS
18805  test -z "$as_dir" && as_dir=.
18806    for ac_exec_ext in '' $ac_executable_extensions; do
18807  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18808    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18809    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18810    break 2
18811  fi
18812done
18813  done
18814IFS=$as_save_IFS
18815
18816  ;;
18817esac
18818fi
18819TIME=$ac_cv_path_TIME
18820if test -n "$TIME"; then
18821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18822$as_echo "$TIME" >&6; }
18823else
18824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18825$as_echo "no" >&6; }
18826fi
18827
18828
18829  test -n "$TIME" && break
18830done
18831
18832    else
18833      # If it succeeded, then it was overridden by the user. We will use it
18834      # for the tool.
18835
18836      # First remove it from the list of overridden variables, so we can test
18837      # for unknown variables in the end.
18838      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18839
18840      # Check if the provided tool contains a complete path.
18841      tool_specified="$TIME"
18842      tool_basename="${tool_specified##*/}"
18843      if test "x$tool_basename" = "x$tool_specified"; then
18844        # A command without a complete path is provided, search $PATH.
18845        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18846$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18847        # Extract the first word of "$tool_basename", so it can be a program name with args.
18848set dummy $tool_basename; ac_word=$2
18849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18850$as_echo_n "checking for $ac_word... " >&6; }
18851if ${ac_cv_path_TIME+:} false; then :
18852  $as_echo_n "(cached) " >&6
18853else
18854  case $TIME in
18855  [\\/]* | ?:[\\/]*)
18856  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18857  ;;
18858  *)
18859  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18860for as_dir in $PATH
18861do
18862  IFS=$as_save_IFS
18863  test -z "$as_dir" && as_dir=.
18864    for ac_exec_ext in '' $ac_executable_extensions; do
18865  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18866    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18867    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18868    break 2
18869  fi
18870done
18871  done
18872IFS=$as_save_IFS
18873
18874  ;;
18875esac
18876fi
18877TIME=$ac_cv_path_TIME
18878if test -n "$TIME"; then
18879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18880$as_echo "$TIME" >&6; }
18881else
18882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18883$as_echo "no" >&6; }
18884fi
18885
18886
18887        if test "x$TIME" = x; then
18888          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18889        fi
18890      else
18891        # Otherwise we believe it is a complete path. Use it as it is.
18892        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18893$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18894        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18895$as_echo_n "checking for TIME... " >&6; }
18896        if test ! -x "$tool_specified"; then
18897          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18898$as_echo "not found" >&6; }
18899          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18900        fi
18901        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18902$as_echo "$tool_specified" >&6; }
18903      fi
18904    fi
18905  fi
18906
18907
18908  # Check if it's GNU time
18909  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18910  if test "x$IS_GNU_TIME" != x; then
18911    IS_GNU_TIME=yes
18912  else
18913    IS_GNU_TIME=no
18914  fi
18915
18916
18917  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18918
18919
18920
18921  # Publish this variable in the help.
18922
18923
18924  if test "x$DSYMUTIL" = x; then
18925    # The variable is not set by user, try to locate tool using the code snippet
18926    for ac_prog in dsymutil
18927do
18928  # Extract the first word of "$ac_prog", so it can be a program name with args.
18929set dummy $ac_prog; ac_word=$2
18930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18931$as_echo_n "checking for $ac_word... " >&6; }
18932if ${ac_cv_path_DSYMUTIL+:} false; then :
18933  $as_echo_n "(cached) " >&6
18934else
18935  case $DSYMUTIL in
18936  [\\/]* | ?:[\\/]*)
18937  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18938  ;;
18939  *)
18940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18941for as_dir in $PATH
18942do
18943  IFS=$as_save_IFS
18944  test -z "$as_dir" && as_dir=.
18945    for ac_exec_ext in '' $ac_executable_extensions; do
18946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18947    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18949    break 2
18950  fi
18951done
18952  done
18953IFS=$as_save_IFS
18954
18955  ;;
18956esac
18957fi
18958DSYMUTIL=$ac_cv_path_DSYMUTIL
18959if test -n "$DSYMUTIL"; then
18960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18961$as_echo "$DSYMUTIL" >&6; }
18962else
18963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18964$as_echo "no" >&6; }
18965fi
18966
18967
18968  test -n "$DSYMUTIL" && break
18969done
18970
18971  else
18972    # The variable is set, but is it from the command line or the environment?
18973
18974    # Try to remove the string !DSYMUTIL! from our list.
18975    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18976    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18977      # If it failed, the variable was not from the command line. Ignore it,
18978      # but warn the user (except for BASH, which is always set by the calling BASH).
18979      if test "xDSYMUTIL" != xBASH; then
18980        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18981$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18982      fi
18983      # Try to locate tool using the code snippet
18984      for ac_prog in dsymutil
18985do
18986  # Extract the first word of "$ac_prog", so it can be a program name with args.
18987set dummy $ac_prog; ac_word=$2
18988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18989$as_echo_n "checking for $ac_word... " >&6; }
18990if ${ac_cv_path_DSYMUTIL+:} false; then :
18991  $as_echo_n "(cached) " >&6
18992else
18993  case $DSYMUTIL in
18994  [\\/]* | ?:[\\/]*)
18995  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18996  ;;
18997  *)
18998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18999for as_dir in $PATH
19000do
19001  IFS=$as_save_IFS
19002  test -z "$as_dir" && as_dir=.
19003    for ac_exec_ext in '' $ac_executable_extensions; do
19004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19005    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19007    break 2
19008  fi
19009done
19010  done
19011IFS=$as_save_IFS
19012
19013  ;;
19014esac
19015fi
19016DSYMUTIL=$ac_cv_path_DSYMUTIL
19017if test -n "$DSYMUTIL"; then
19018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19019$as_echo "$DSYMUTIL" >&6; }
19020else
19021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19022$as_echo "no" >&6; }
19023fi
19024
19025
19026  test -n "$DSYMUTIL" && break
19027done
19028
19029    else
19030      # If it succeeded, then it was overridden by the user. We will use it
19031      # for the tool.
19032
19033      # First remove it from the list of overridden variables, so we can test
19034      # for unknown variables in the end.
19035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19036
19037      # Check if the provided tool contains a complete path.
19038      tool_specified="$DSYMUTIL"
19039      tool_basename="${tool_specified##*/}"
19040      if test "x$tool_basename" = "x$tool_specified"; then
19041        # A command without a complete path is provided, search $PATH.
19042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19043$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19044        # Extract the first word of "$tool_basename", so it can be a program name with args.
19045set dummy $tool_basename; ac_word=$2
19046{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19047$as_echo_n "checking for $ac_word... " >&6; }
19048if ${ac_cv_path_DSYMUTIL+:} false; then :
19049  $as_echo_n "(cached) " >&6
19050else
19051  case $DSYMUTIL in
19052  [\\/]* | ?:[\\/]*)
19053  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19054  ;;
19055  *)
19056  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19057for as_dir in $PATH
19058do
19059  IFS=$as_save_IFS
19060  test -z "$as_dir" && as_dir=.
19061    for ac_exec_ext in '' $ac_executable_extensions; do
19062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19063    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19064    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19065    break 2
19066  fi
19067done
19068  done
19069IFS=$as_save_IFS
19070
19071  ;;
19072esac
19073fi
19074DSYMUTIL=$ac_cv_path_DSYMUTIL
19075if test -n "$DSYMUTIL"; then
19076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19077$as_echo "$DSYMUTIL" >&6; }
19078else
19079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19080$as_echo "no" >&6; }
19081fi
19082
19083
19084        if test "x$DSYMUTIL" = x; then
19085          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19086        fi
19087      else
19088        # Otherwise we believe it is a complete path. Use it as it is.
19089        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19090$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19091        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19092$as_echo_n "checking for DSYMUTIL... " >&6; }
19093        if test ! -x "$tool_specified"; then
19094          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19095$as_echo "not found" >&6; }
19096          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19097        fi
19098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19099$as_echo "$tool_specified" >&6; }
19100      fi
19101    fi
19102  fi
19103
19104
19105
19106  if test "x$DSYMUTIL" = x; then
19107    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19108  fi
19109
19110
19111
19112
19113
19114  # Publish this variable in the help.
19115
19116
19117  if test "x$XATTR" = x; then
19118    # The variable is not set by user, try to locate tool using the code snippet
19119    for ac_prog in xattr
19120do
19121  # Extract the first word of "$ac_prog", so it can be a program name with args.
19122set dummy $ac_prog; ac_word=$2
19123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19124$as_echo_n "checking for $ac_word... " >&6; }
19125if ${ac_cv_path_XATTR+:} false; then :
19126  $as_echo_n "(cached) " >&6
19127else
19128  case $XATTR in
19129  [\\/]* | ?:[\\/]*)
19130  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19131  ;;
19132  *)
19133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19134for as_dir in $PATH
19135do
19136  IFS=$as_save_IFS
19137  test -z "$as_dir" && as_dir=.
19138    for ac_exec_ext in '' $ac_executable_extensions; do
19139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19140    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19142    break 2
19143  fi
19144done
19145  done
19146IFS=$as_save_IFS
19147
19148  ;;
19149esac
19150fi
19151XATTR=$ac_cv_path_XATTR
19152if test -n "$XATTR"; then
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19154$as_echo "$XATTR" >&6; }
19155else
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157$as_echo "no" >&6; }
19158fi
19159
19160
19161  test -n "$XATTR" && break
19162done
19163
19164  else
19165    # The variable is set, but is it from the command line or the environment?
19166
19167    # Try to remove the string !XATTR! from our list.
19168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19170      # If it failed, the variable was not from the command line. Ignore it,
19171      # but warn the user (except for BASH, which is always set by the calling BASH).
19172      if test "xXATTR" != xBASH; then
19173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19174$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19175      fi
19176      # Try to locate tool using the code snippet
19177      for ac_prog in xattr
19178do
19179  # Extract the first word of "$ac_prog", so it can be a program name with args.
19180set dummy $ac_prog; ac_word=$2
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19182$as_echo_n "checking for $ac_word... " >&6; }
19183if ${ac_cv_path_XATTR+:} false; then :
19184  $as_echo_n "(cached) " >&6
19185else
19186  case $XATTR in
19187  [\\/]* | ?:[\\/]*)
19188  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19189  ;;
19190  *)
19191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19192for as_dir in $PATH
19193do
19194  IFS=$as_save_IFS
19195  test -z "$as_dir" && as_dir=.
19196    for ac_exec_ext in '' $ac_executable_extensions; do
19197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19198    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19200    break 2
19201  fi
19202done
19203  done
19204IFS=$as_save_IFS
19205
19206  ;;
19207esac
19208fi
19209XATTR=$ac_cv_path_XATTR
19210if test -n "$XATTR"; then
19211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19212$as_echo "$XATTR" >&6; }
19213else
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19215$as_echo "no" >&6; }
19216fi
19217
19218
19219  test -n "$XATTR" && break
19220done
19221
19222    else
19223      # If it succeeded, then it was overridden by the user. We will use it
19224      # for the tool.
19225
19226      # First remove it from the list of overridden variables, so we can test
19227      # for unknown variables in the end.
19228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19229
19230      # Check if the provided tool contains a complete path.
19231      tool_specified="$XATTR"
19232      tool_basename="${tool_specified##*/}"
19233      if test "x$tool_basename" = "x$tool_specified"; then
19234        # A command without a complete path is provided, search $PATH.
19235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19236$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19237        # Extract the first word of "$tool_basename", so it can be a program name with args.
19238set dummy $tool_basename; ac_word=$2
19239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19240$as_echo_n "checking for $ac_word... " >&6; }
19241if ${ac_cv_path_XATTR+:} false; then :
19242  $as_echo_n "(cached) " >&6
19243else
19244  case $XATTR in
19245  [\\/]* | ?:[\\/]*)
19246  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19247  ;;
19248  *)
19249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19250for as_dir in $PATH
19251do
19252  IFS=$as_save_IFS
19253  test -z "$as_dir" && as_dir=.
19254    for ac_exec_ext in '' $ac_executable_extensions; do
19255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19256    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19258    break 2
19259  fi
19260done
19261  done
19262IFS=$as_save_IFS
19263
19264  ;;
19265esac
19266fi
19267XATTR=$ac_cv_path_XATTR
19268if test -n "$XATTR"; then
19269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19270$as_echo "$XATTR" >&6; }
19271else
19272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19273$as_echo "no" >&6; }
19274fi
19275
19276
19277        if test "x$XATTR" = x; then
19278          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19279        fi
19280      else
19281        # Otherwise we believe it is a complete path. Use it as it is.
19282        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19283$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19285$as_echo_n "checking for XATTR... " >&6; }
19286        if test ! -x "$tool_specified"; then
19287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19288$as_echo "not found" >&6; }
19289          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19290        fi
19291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19292$as_echo "$tool_specified" >&6; }
19293      fi
19294    fi
19295  fi
19296
19297
19298
19299  if test "x$XATTR" = x; then
19300    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19301  fi
19302
19303
19304
19305
19306  # Publish this variable in the help.
19307
19308
19309  if test "x$CODESIGN" = x; then
19310    # The variable is not set by user, try to locate tool using the code snippet
19311    for ac_prog in codesign
19312do
19313  # Extract the first word of "$ac_prog", so it can be a program name with args.
19314set dummy $ac_prog; ac_word=$2
19315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19316$as_echo_n "checking for $ac_word... " >&6; }
19317if ${ac_cv_path_CODESIGN+:} false; then :
19318  $as_echo_n "(cached) " >&6
19319else
19320  case $CODESIGN in
19321  [\\/]* | ?:[\\/]*)
19322  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19323  ;;
19324  *)
19325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19326for as_dir in $PATH
19327do
19328  IFS=$as_save_IFS
19329  test -z "$as_dir" && as_dir=.
19330    for ac_exec_ext in '' $ac_executable_extensions; do
19331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19332    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19334    break 2
19335  fi
19336done
19337  done
19338IFS=$as_save_IFS
19339
19340  ;;
19341esac
19342fi
19343CODESIGN=$ac_cv_path_CODESIGN
19344if test -n "$CODESIGN"; then
19345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19346$as_echo "$CODESIGN" >&6; }
19347else
19348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19349$as_echo "no" >&6; }
19350fi
19351
19352
19353  test -n "$CODESIGN" && break
19354done
19355
19356  else
19357    # The variable is set, but is it from the command line or the environment?
19358
19359    # Try to remove the string !CODESIGN! from our list.
19360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19362      # If it failed, the variable was not from the command line. Ignore it,
19363      # but warn the user (except for BASH, which is always set by the calling BASH).
19364      if test "xCODESIGN" != xBASH; then
19365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19366$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19367      fi
19368      # Try to locate tool using the code snippet
19369      for ac_prog in codesign
19370do
19371  # Extract the first word of "$ac_prog", so it can be a program name with args.
19372set dummy $ac_prog; ac_word=$2
19373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19374$as_echo_n "checking for $ac_word... " >&6; }
19375if ${ac_cv_path_CODESIGN+:} false; then :
19376  $as_echo_n "(cached) " >&6
19377else
19378  case $CODESIGN in
19379  [\\/]* | ?:[\\/]*)
19380  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19381  ;;
19382  *)
19383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19384for as_dir in $PATH
19385do
19386  IFS=$as_save_IFS
19387  test -z "$as_dir" && as_dir=.
19388    for ac_exec_ext in '' $ac_executable_extensions; do
19389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19390    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19392    break 2
19393  fi
19394done
19395  done
19396IFS=$as_save_IFS
19397
19398  ;;
19399esac
19400fi
19401CODESIGN=$ac_cv_path_CODESIGN
19402if test -n "$CODESIGN"; then
19403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19404$as_echo "$CODESIGN" >&6; }
19405else
19406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19407$as_echo "no" >&6; }
19408fi
19409
19410
19411  test -n "$CODESIGN" && break
19412done
19413
19414    else
19415      # If it succeeded, then it was overridden by the user. We will use it
19416      # for the tool.
19417
19418      # First remove it from the list of overridden variables, so we can test
19419      # for unknown variables in the end.
19420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19421
19422      # Check if the provided tool contains a complete path.
19423      tool_specified="$CODESIGN"
19424      tool_basename="${tool_specified##*/}"
19425      if test "x$tool_basename" = "x$tool_specified"; then
19426        # A command without a complete path is provided, search $PATH.
19427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19428$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19429        # Extract the first word of "$tool_basename", so it can be a program name with args.
19430set dummy $tool_basename; ac_word=$2
19431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19432$as_echo_n "checking for $ac_word... " >&6; }
19433if ${ac_cv_path_CODESIGN+:} false; then :
19434  $as_echo_n "(cached) " >&6
19435else
19436  case $CODESIGN in
19437  [\\/]* | ?:[\\/]*)
19438  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19439  ;;
19440  *)
19441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19442for as_dir in $PATH
19443do
19444  IFS=$as_save_IFS
19445  test -z "$as_dir" && as_dir=.
19446    for ac_exec_ext in '' $ac_executable_extensions; do
19447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19448    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19450    break 2
19451  fi
19452done
19453  done
19454IFS=$as_save_IFS
19455
19456  ;;
19457esac
19458fi
19459CODESIGN=$ac_cv_path_CODESIGN
19460if test -n "$CODESIGN"; then
19461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19462$as_echo "$CODESIGN" >&6; }
19463else
19464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19465$as_echo "no" >&6; }
19466fi
19467
19468
19469        if test "x$CODESIGN" = x; then
19470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19471        fi
19472      else
19473        # Otherwise we believe it is a complete path. Use it as it is.
19474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19475$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19477$as_echo_n "checking for CODESIGN... " >&6; }
19478        if test ! -x "$tool_specified"; then
19479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19480$as_echo "not found" >&6; }
19481          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19482        fi
19483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19484$as_echo "$tool_specified" >&6; }
19485      fi
19486    fi
19487  fi
19488
19489
19490    if test "x$CODESIGN" != "x"; then
19491      # Verify that the openjdk_codesign certificate is present
19492      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19493$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19494      rm -f codesign-testfile
19495      touch codesign-testfile
19496      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19497      rm -f codesign-testfile
19498      if test "x$CODESIGN" = x; then
19499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19500$as_echo "no" >&6; }
19501      else
19502        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19503$as_echo "yes" >&6; }
19504      fi
19505    fi
19506  fi
19507
19508
19509  # Test if bash supports pipefail.
19510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19511$as_echo_n "checking if bash supports pipefail... " >&6; }
19512  if ${BASH} -c 'set -o pipefail'; then
19513    BASH_ARGS="$BASH_ARGS -o pipefail"
19514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19515$as_echo "yes" >&6; }
19516  else
19517    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19518$as_echo "no" >&6; }
19519  fi
19520
19521  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19522$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19523  if ${BASH} -e -c 'true'; then
19524    BASH_ARGS="$BASH_ARGS -e"
19525    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19526$as_echo "yes" >&6; }
19527  else
19528    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19529$as_echo "no" >&6; }
19530  fi
19531
19532
19533
19534
19535# Check if pkg-config is available.
19536
19537
19538if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19539	if test -n "$ac_tool_prefix"; then
19540  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19541set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19543$as_echo_n "checking for $ac_word... " >&6; }
19544if ${ac_cv_path_PKG_CONFIG+:} false; then :
19545  $as_echo_n "(cached) " >&6
19546else
19547  case $PKG_CONFIG in
19548  [\\/]* | ?:[\\/]*)
19549  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19550  ;;
19551  *)
19552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19553for as_dir in $PATH
19554do
19555  IFS=$as_save_IFS
19556  test -z "$as_dir" && as_dir=.
19557    for ac_exec_ext in '' $ac_executable_extensions; do
19558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19559    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19561    break 2
19562  fi
19563done
19564  done
19565IFS=$as_save_IFS
19566
19567  ;;
19568esac
19569fi
19570PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19571if test -n "$PKG_CONFIG"; then
19572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19573$as_echo "$PKG_CONFIG" >&6; }
19574else
19575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19576$as_echo "no" >&6; }
19577fi
19578
19579
19580fi
19581if test -z "$ac_cv_path_PKG_CONFIG"; then
19582  ac_pt_PKG_CONFIG=$PKG_CONFIG
19583  # Extract the first word of "pkg-config", so it can be a program name with args.
19584set dummy pkg-config; ac_word=$2
19585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19586$as_echo_n "checking for $ac_word... " >&6; }
19587if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19588  $as_echo_n "(cached) " >&6
19589else
19590  case $ac_pt_PKG_CONFIG in
19591  [\\/]* | ?:[\\/]*)
19592  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19593  ;;
19594  *)
19595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19596for as_dir in $PATH
19597do
19598  IFS=$as_save_IFS
19599  test -z "$as_dir" && as_dir=.
19600    for ac_exec_ext in '' $ac_executable_extensions; do
19601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19602    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19604    break 2
19605  fi
19606done
19607  done
19608IFS=$as_save_IFS
19609
19610  ;;
19611esac
19612fi
19613ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19614if test -n "$ac_pt_PKG_CONFIG"; then
19615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19616$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19617else
19618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19619$as_echo "no" >&6; }
19620fi
19621
19622  if test "x$ac_pt_PKG_CONFIG" = x; then
19623    PKG_CONFIG=""
19624  else
19625    case $cross_compiling:$ac_tool_warned in
19626yes:)
19627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19629ac_tool_warned=yes ;;
19630esac
19631    PKG_CONFIG=$ac_pt_PKG_CONFIG
19632  fi
19633else
19634  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19635fi
19636
19637fi
19638if test -n "$PKG_CONFIG"; then
19639	_pkg_min_version=0.9.0
19640	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19641$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19642	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19643		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19644$as_echo "yes" >&6; }
19645	else
19646		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19647$as_echo "no" >&6; }
19648		PKG_CONFIG=""
19649	fi
19650
19651fi
19652
19653# After basic tools have been setup, we can check build os specific details.
19654
19655  ###############################################################################
19656
19657  # Note that this is the build platform OS version!
19658
19659  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19660  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19661  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19662  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19663
19664
19665
19666
19667
19668# Setup builddeps, for automatic downloading of tools we need.
19669# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19670# boot-jdk setup, but we need to have basic tools setup first.
19671
19672
19673# Check whether --with-builddeps-conf was given.
19674if test "${with_builddeps_conf+set}" = set; then :
19675  withval=$with_builddeps_conf;
19676fi
19677
19678
19679
19680# Check whether --with-builddeps-server was given.
19681if test "${with_builddeps_server+set}" = set; then :
19682  withval=$with_builddeps_server;
19683fi
19684
19685
19686
19687# Check whether --with-builddeps-dir was given.
19688if test "${with_builddeps_dir+set}" = set; then :
19689  withval=$with_builddeps_dir;
19690else
19691  with_builddeps_dir=/localhome/builddeps
19692fi
19693
19694
19695
19696# Check whether --with-builddeps-group was given.
19697if test "${with_builddeps_group+set}" = set; then :
19698  withval=$with_builddeps_group;
19699fi
19700
19701
19702
19703
19704  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19705    if test "x$with_builddeps_conf" != x; then
19706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19707$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19708      builddepsfile=$with_builddeps_conf
19709      if test -s $builddepsfile; then
19710        . $builddepsfile
19711        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19712$as_echo "loaded!" >&6; }
19713      else
19714        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19715      fi
19716    else
19717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19718$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19719      builddepsfile=`mktemp`
19720      touch $builddepsfile
19721      # Put all found confs into a single file.
19722      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19723      # Source the file to acquire the variables
19724      if test -s $builddepsfile; then
19725        . $builddepsfile
19726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19727$as_echo "found at least one!" >&6; }
19728      else
19729        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19730      fi
19731    fi
19732    # Create build and target names that use _ instead of "-" and ".".
19733    # This is necessary to use them in variable names.
19734    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19735    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19736    # Extract rewrite information for build and target
19737    eval rewritten_build=\${REWRITE_${build_var}}
19738    if test "x$rewritten_build" = x; then
19739      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19740      echo Build stays the same $rewritten_build
19741    else
19742      echo Rewriting build for builddeps into $rewritten_build
19743    fi
19744    eval rewritten_target=\${REWRITE_${target_var}}
19745    if test "x$rewritten_target" = x; then
19746      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19747      echo Target stays the same $rewritten_target
19748    else
19749      echo Rewriting target for builddeps into $rewritten_target
19750    fi
19751    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19752    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19753  fi
19754  for ac_prog in 7z unzip
19755do
19756  # Extract the first word of "$ac_prog", so it can be a program name with args.
19757set dummy $ac_prog; ac_word=$2
19758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19759$as_echo_n "checking for $ac_word... " >&6; }
19760if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19761  $as_echo_n "(cached) " >&6
19762else
19763  if test -n "$BDEPS_UNZIP"; then
19764  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19765else
19766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19767for as_dir in $PATH
19768do
19769  IFS=$as_save_IFS
19770  test -z "$as_dir" && as_dir=.
19771    for ac_exec_ext in '' $ac_executable_extensions; do
19772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19773    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19775    break 2
19776  fi
19777done
19778  done
19779IFS=$as_save_IFS
19780
19781fi
19782fi
19783BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19784if test -n "$BDEPS_UNZIP"; then
19785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19786$as_echo "$BDEPS_UNZIP" >&6; }
19787else
19788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19789$as_echo "no" >&6; }
19790fi
19791
19792
19793  test -n "$BDEPS_UNZIP" && break
19794done
19795
19796  if test "x$BDEPS_UNZIP" = x7z; then
19797    BDEPS_UNZIP="7z x"
19798  fi
19799
19800  for ac_prog in wget lftp ftp
19801do
19802  # Extract the first word of "$ac_prog", so it can be a program name with args.
19803set dummy $ac_prog; ac_word=$2
19804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19805$as_echo_n "checking for $ac_word... " >&6; }
19806if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19807  $as_echo_n "(cached) " >&6
19808else
19809  if test -n "$BDEPS_FTP"; then
19810  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19811else
19812as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19813for as_dir in $PATH
19814do
19815  IFS=$as_save_IFS
19816  test -z "$as_dir" && as_dir=.
19817    for ac_exec_ext in '' $ac_executable_extensions; do
19818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19819    ac_cv_prog_BDEPS_FTP="$ac_prog"
19820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19821    break 2
19822  fi
19823done
19824  done
19825IFS=$as_save_IFS
19826
19827fi
19828fi
19829BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19830if test -n "$BDEPS_FTP"; then
19831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19832$as_echo "$BDEPS_FTP" >&6; }
19833else
19834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19835$as_echo "no" >&6; }
19836fi
19837
19838
19839  test -n "$BDEPS_FTP" && break
19840done
19841
19842
19843
19844###############################################################################
19845#
19846# Determine OpenJDK variants, options and version numbers.
19847#
19848###############################################################################
19849
19850# We need build & target for this.
19851
19852
19853  ###############################################################################
19854  #
19855  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19856  # We always build headless support.
19857  #
19858  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19859$as_echo_n "checking headful support... " >&6; }
19860  # Check whether --enable-headful was given.
19861if test "${enable_headful+set}" = set; then :
19862  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19863else
19864  SUPPORT_HEADFUL=yes
19865fi
19866
19867
19868  SUPPORT_HEADLESS=yes
19869  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19870
19871  if test "x$SUPPORT_HEADFUL" = xyes; then
19872    # We are building both headful and headless.
19873    headful_msg="include support for both headful and headless"
19874  fi
19875
19876  if test "x$SUPPORT_HEADFUL" = xno; then
19877    # Thus we are building headless only.
19878    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19879    headful_msg="headless only"
19880  fi
19881
19882  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19883$as_echo "$headful_msg" >&6; }
19884
19885
19886
19887
19888
19889  # Control wether Hotspot runs Queens test after build.
19890  # Check whether --enable-hotspot-test-in-build was given.
19891if test "${enable_hotspot_test_in_build+set}" = set; then :
19892  enableval=$enable_hotspot_test_in_build;
19893else
19894  enable_hotspot_test_in_build=no
19895fi
19896
19897  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19898    TEST_IN_BUILD=true
19899  else
19900    TEST_IN_BUILD=false
19901  fi
19902
19903
19904  ###############################################################################
19905  #
19906  # Choose cacerts source file
19907  #
19908
19909# Check whether --with-cacerts-file was given.
19910if test "${with_cacerts_file+set}" = set; then :
19911  withval=$with_cacerts_file;
19912fi
19913
19914  if test "x$with_cacerts_file" != x; then
19915    CACERTS_FILE=$with_cacerts_file
19916  fi
19917
19918
19919  ###############################################################################
19920  #
19921  # Enable or disable unlimited crypto
19922  #
19923  # Check whether --enable-unlimited-crypto was given.
19924if test "${enable_unlimited_crypto+set}" = set; then :
19925  enableval=$enable_unlimited_crypto;
19926else
19927  enable_unlimited_crypto=no
19928fi
19929
19930  if test "x$enable_unlimited_crypto" = "xyes"; then
19931    UNLIMITED_CRYPTO=true
19932  else
19933    UNLIMITED_CRYPTO=false
19934  fi
19935
19936
19937  ###############################################################################
19938  #
19939  # Enable or disable the elliptic curve crypto implementation
19940  #
19941
19942
19943  ###############################################################################
19944  #
19945  # --enable-rmiconnector-iiop
19946  #
19947  # Check whether --enable-rmiconnector-iiop was given.
19948if test "${enable_rmiconnector_iiop+set}" = set; then :
19949  enableval=$enable_rmiconnector_iiop;
19950fi
19951
19952  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19953    RMICONNECTOR_IIOP=true
19954  else
19955    RMICONNECTOR_IIOP=false
19956  fi
19957
19958
19959  ###############################################################################
19960  #
19961  # Compress jars
19962  #
19963  COMPRESS_JARS=false
19964
19965
19966
19967
19968  # Source the version numbers
19969  . $AUTOCONF_DIR/version-numbers
19970
19971  # Get the settings from parameters
19972
19973# Check whether --with-milestone was given.
19974if test "${with_milestone+set}" = set; then :
19975  withval=$with_milestone;
19976fi
19977
19978  if test "x$with_milestone" = xyes; then
19979    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19980  elif test "x$with_milestone" != x; then
19981    MILESTONE="$with_milestone"
19982  fi
19983  if test "x$MILESTONE" = x; then
19984    MILESTONE=internal
19985  fi
19986
19987
19988# Check whether --with-update-version was given.
19989if test "${with_update_version+set}" = set; then :
19990  withval=$with_update_version;
19991fi
19992
19993  if test "x$with_update_version" = xyes; then
19994    as_fn_error $? "Update version must have a value" "$LINENO" 5
19995  elif test "x$with_update_version" != x; then
19996    JDK_UPDATE_VERSION="$with_update_version"
19997    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19998    # to a bug in expr (which reduces it to just X). To work around this, we
19999    # always add a 0 to one digit update versions.
20000    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20001      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20002    fi
20003  fi
20004
20005
20006# Check whether --with-user-release-suffix was given.
20007if test "${with_user_release_suffix+set}" = set; then :
20008  withval=$with_user_release_suffix;
20009fi
20010
20011  if test "x$with_user_release_suffix" = xyes; then
20012    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20013  elif test "x$with_user_release_suffix" != x; then
20014    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20015  fi
20016
20017
20018# Check whether --with-build-number was given.
20019if test "${with_build_number+set}" = set; then :
20020  withval=$with_build_number;
20021fi
20022
20023  if test "x$with_build_number" = xyes; then
20024    as_fn_error $? "Build number must have a value" "$LINENO" 5
20025  elif test "x$with_build_number" != x; then
20026    JDK_BUILD_NUMBER="$with_build_number"
20027  fi
20028  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20029  if test "x$JDK_BUILD_NUMBER" = x; then
20030    JDK_BUILD_NUMBER=b00
20031    if test "x$USER_RELEASE_SUFFIX" = x; then
20032      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20033      # Avoid [:alnum:] since it depends on the locale.
20034      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20035      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20036    fi
20037  fi
20038
20039  # Now set the JDK version, milestone, build number etc.
20040
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056# Check whether --with-copyright-year was given.
20057if test "${with_copyright_year+set}" = set; then :
20058  withval=$with_copyright_year;
20059fi
20060
20061  if test "x$with_copyright_year" = xyes; then
20062    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20063  elif test "x$with_copyright_year" != x; then
20064    COPYRIGHT_YEAR="$with_copyright_year"
20065  else
20066    COPYRIGHT_YEAR=`date +'%Y'`
20067  fi
20068
20069
20070  if test "x$JDK_UPDATE_VERSION" != x; then
20071    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20072  else
20073    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20074  fi
20075
20076
20077  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20078
20079
20080
20081###############################################################################
20082#
20083# Setup BootJDK, used to bootstrap the build.
20084#
20085###############################################################################
20086
20087
20088  BOOT_JDK_FOUND=no
20089
20090# Check whether --with-boot-jdk was given.
20091if test "${with_boot_jdk+set}" = set; then :
20092  withval=$with_boot_jdk;
20093fi
20094
20095
20096  # We look for the Boot JDK through various means, going from more certain to
20097  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20098  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20099  # must check if this is indeed valid; otherwise we'll continue looking.
20100
20101  # Test: Is bootjdk explicitely set by command line arguments?
20102
20103  if test "x$BOOT_JDK_FOUND" = xno; then
20104    # Now execute the test
20105
20106  if test "x$with_boot_jdk" != x; then
20107    BOOT_JDK=$with_boot_jdk
20108    BOOT_JDK_FOUND=maybe
20109    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20110$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20111  fi
20112
20113
20114    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20115    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20116      # Do we have a bin/java?
20117      if test ! -x "$BOOT_JDK/bin/java"; then
20118        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20119$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20120        BOOT_JDK_FOUND=no
20121      else
20122        # Do we have a bin/javac?
20123        if test ! -x "$BOOT_JDK/bin/javac"; then
20124          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20125$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20126          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20127$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20128          BOOT_JDK_FOUND=no
20129        else
20130          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20131          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20132
20133          # Extra M4 quote needed to protect [] in grep expression.
20134          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20135          if test "x$FOUND_CORRECT_VERSION" = x; then
20136            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20137$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20138            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20139$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20140            BOOT_JDK_FOUND=no
20141          else
20142            # We're done! :-)
20143            BOOT_JDK_FOUND=yes
20144
20145  # Only process if variable expands to non-empty
20146
20147  if test "x$BOOT_JDK" != x; then
20148    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20149
20150  # Input might be given as Windows format, start by converting to
20151  # unix format.
20152  path="$BOOT_JDK"
20153  new_path=`$CYGPATH -u "$path"`
20154
20155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20158  # "foo.exe" is OK but "foo" is an error.
20159  #
20160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20161  # It is also a way to make sure we got the proper file name for the real test later on.
20162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20163  if test "x$test_shortpath" = x; then
20164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20165$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20166    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20167  fi
20168
20169  # Call helper function which possibly converts this using DOS-style short mode.
20170  # If so, the updated path is stored in $new_path.
20171
20172  input_path="$new_path"
20173  # Check if we need to convert this using DOS-style short mode. If the path
20174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20175  # take no chances and rewrite it.
20176  # Note: m4 eats our [], so we need to use [ and ] instead.
20177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20178  if test "x$has_forbidden_chars" != x; then
20179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20183      # Going to short mode and back again did indeed matter. Since short mode is
20184      # case insensitive, let's make it lowercase to improve readability.
20185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20186      # Now convert it back to Unix-stile (cygpath)
20187      input_path=`$CYGPATH -u "$shortmode_path"`
20188      new_path="$input_path"
20189    fi
20190  fi
20191
20192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20193  if test "x$test_cygdrive_prefix" = x; then
20194    # As a simple fix, exclude /usr/bin since it's not a real path.
20195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20197      # a path prefixed by /cygdrive for fixpath to work.
20198      new_path="$CYGWIN_ROOT_PATH$input_path"
20199    fi
20200  fi
20201
20202
20203  if test "x$path" != "x$new_path"; then
20204    BOOT_JDK="$new_path"
20205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20206$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20207  fi
20208
20209    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20210
20211  path="$BOOT_JDK"
20212  has_colon=`$ECHO $path | $GREP ^.:`
20213  new_path="$path"
20214  if test "x$has_colon" = x; then
20215    # Not in mixed or Windows style, start by that.
20216    new_path=`cmd //c echo $path`
20217  fi
20218
20219
20220  input_path="$new_path"
20221  # Check if we need to convert this using DOS-style short mode. If the path
20222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20223  # take no chances and rewrite it.
20224  # Note: m4 eats our [], so we need to use [ and ] instead.
20225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20226  if test "x$has_forbidden_chars" != x; then
20227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20229  fi
20230
20231
20232  windows_path="$new_path"
20233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20234    unix_path=`$CYGPATH -u "$windows_path"`
20235    new_path="$unix_path"
20236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20238    new_path="$unix_path"
20239  fi
20240
20241  if test "x$path" != "x$new_path"; then
20242    BOOT_JDK="$new_path"
20243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20244$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20245  fi
20246
20247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20249
20250    else
20251      # We're on a unix platform. Hooray! :)
20252      path="$BOOT_JDK"
20253      has_space=`$ECHO "$path" | $GREP " "`
20254      if test "x$has_space" != x; then
20255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20256$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20257        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20258      fi
20259
20260      # Use eval to expand a potential ~
20261      eval path="$path"
20262      if test ! -f "$path" && test ! -d "$path"; then
20263        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20264      fi
20265
20266      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20267    fi
20268  fi
20269
20270            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20271$as_echo_n "checking for Boot JDK... " >&6; }
20272            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20273$as_echo "$BOOT_JDK" >&6; }
20274            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20275$as_echo_n "checking Boot JDK version... " >&6; }
20276            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20278$as_echo "$BOOT_JDK_VERSION" >&6; }
20279          fi # end check jdk version
20280        fi # end check javac
20281      fi # end check java
20282    fi # end check boot jdk found
20283  fi
20284
20285  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20286    # Having specified an argument which is incorrect will produce an instant failure;
20287    # we should not go on looking
20288    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20289  fi
20290
20291  # Test: Is bootjdk available from builddeps?
20292
20293  if test "x$BOOT_JDK_FOUND" = xno; then
20294    # Now execute the test
20295
20296
20297
20298  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20299    # Source the builddeps file again, to make sure it uses the latest variables!
20300    . $builddepsfile
20301    # Look for a target and build machine specific resource!
20302    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20303    if test "x$resource" = x; then
20304      # Ok, lets instead look for a target specific resource
20305      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20306    fi
20307    if test "x$resource" = x; then
20308      # Ok, lets instead look for a build specific resource
20309      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20310    fi
20311    if test "x$resource" = x; then
20312      # Ok, lets instead look for a generic resource
20313      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20314      resource=${builddep_bootjdk}
20315    fi
20316    if test "x$resource" != x; then
20317      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20318$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20319      # If the resource in the builddeps.conf file is an existing directory,
20320      # for example /java/linux/cups
20321      if test -d ${resource}; then
20322        depdir=${resource}
20323      else
20324
20325  # bootjdk is for example mymodule
20326  # $resource is for example libs/general/libmymod_1_2_3.zip
20327  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20328  # $with_builddeps_dir is for example /localhome/builddeps
20329  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20330  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20331  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20332  filename=`basename $resource`
20333  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20334  filebase=${filename%%.*}
20335  extension=${filename#*.}
20336  installdir=$with_builddeps_dir/$filebase
20337  if test ! -f $installdir/$filename.unpacked; then
20338    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20339$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20340    if test ! -d $installdir; then
20341      mkdir -p $installdir
20342    fi
20343    if test ! -d $installdir; then
20344      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20345    fi
20346    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20347    touch $tmpfile
20348    if test ! -f $tmpfile; then
20349      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20350    fi
20351
20352  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20353  # $tmpfile is the local file name for the downloaded file.
20354  VALID_TOOL=no
20355  if test "x$BDEPS_FTP" = xwget; then
20356    VALID_TOOL=yes
20357    wget -O $tmpfile $with_builddeps_server/$resource
20358  fi
20359  if test "x$BDEPS_FTP" = xlftp; then
20360    VALID_TOOL=yes
20361    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20362  fi
20363  if test "x$BDEPS_FTP" = xftp; then
20364    VALID_TOOL=yes
20365    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20366    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20367    FTPUSERPWD=${FTPSERVER%%@*}
20368    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20369      FTPUSER=${userpwd%%:*}
20370      FTPPWD=${userpwd#*@}
20371      FTPSERVER=${FTPSERVER#*@}
20372    else
20373      FTPUSER=ftp
20374      FTPPWD=ftp
20375    fi
20376    # the "pass" command does not work on some
20377    # ftp clients (read ftp.exe) but if it works,
20378    # passive mode is better!
20379    ( \
20380        echo "user $FTPUSER $FTPPWD"        ; \
20381        echo "pass"                         ; \
20382        echo "bin"                          ; \
20383        echo "get $FTPPATH $tmpfile"              ; \
20384    ) | ftp -in $FTPSERVER
20385  fi
20386  if test "x$VALID_TOOL" != xyes; then
20387    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20388  fi
20389
20390    mv $tmpfile $installdir/$filename
20391    if test ! -s $installdir/$filename; then
20392      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20393    fi
20394    case "$extension" in
20395      zip)  echo "Unzipping $installdir/$filename..."
20396        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20397        ;;
20398      tar.gz) echo "Untaring $installdir/$filename..."
20399        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20400        ;;
20401      tgz) echo "Untaring $installdir/$filename..."
20402        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20403        ;;
20404      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20405        ;;
20406    esac
20407  fi
20408  if test -f $installdir/$filename.unpacked; then
20409    depdir=$installdir
20410  fi
20411
20412      fi
20413      # Source the builddeps file again, because in the previous command, the depdir
20414      # was updated to point at the current build dependency install directory.
20415      . $builddepsfile
20416      # Now extract variables from the builddeps.conf files.
20417      theroot=${builddep_bootjdk_ROOT}
20418      thecflags=${builddep_bootjdk_CFLAGS}
20419      thelibs=${builddep_bootjdk_LIBS}
20420      if test "x$depdir" = x; then
20421        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20422      fi
20423      BOOT_JDK=$depdir
20424      if test "x$theroot" != x; then
20425        BOOT_JDK="$theroot"
20426      fi
20427      if test "x$thecflags" != x; then
20428        BOOT_JDK_CFLAGS="$thecflags"
20429      fi
20430      if test "x$thelibs" != x; then
20431        BOOT_JDK_LIBS="$thelibs"
20432      fi
20433      BOOT_JDK_FOUND=maybe
20434      else BOOT_JDK_FOUND=no
20435
20436    fi
20437    else BOOT_JDK_FOUND=no
20438
20439  fi
20440
20441
20442
20443    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20444    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20445      # Do we have a bin/java?
20446      if test ! -x "$BOOT_JDK/bin/java"; then
20447        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20448$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20449        BOOT_JDK_FOUND=no
20450      else
20451        # Do we have a bin/javac?
20452        if test ! -x "$BOOT_JDK/bin/javac"; then
20453          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20455          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20456$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20457          BOOT_JDK_FOUND=no
20458        else
20459          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20460          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20461
20462          # Extra M4 quote needed to protect [] in grep expression.
20463          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20464          if test "x$FOUND_CORRECT_VERSION" = x; then
20465            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20466$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20467            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20468$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20469            BOOT_JDK_FOUND=no
20470          else
20471            # We're done! :-)
20472            BOOT_JDK_FOUND=yes
20473
20474  # Only process if variable expands to non-empty
20475
20476  if test "x$BOOT_JDK" != x; then
20477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20478
20479  # Input might be given as Windows format, start by converting to
20480  # unix format.
20481  path="$BOOT_JDK"
20482  new_path=`$CYGPATH -u "$path"`
20483
20484  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20485  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20486  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20487  # "foo.exe" is OK but "foo" is an error.
20488  #
20489  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20490  # It is also a way to make sure we got the proper file name for the real test later on.
20491  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20492  if test "x$test_shortpath" = x; then
20493    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20494$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20495    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20496  fi
20497
20498  # Call helper function which possibly converts this using DOS-style short mode.
20499  # If so, the updated path is stored in $new_path.
20500
20501  input_path="$new_path"
20502  # Check if we need to convert this using DOS-style short mode. If the path
20503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20504  # take no chances and rewrite it.
20505  # Note: m4 eats our [], so we need to use [ and ] instead.
20506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20507  if test "x$has_forbidden_chars" != x; then
20508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20509    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20510    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20511    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20512      # Going to short mode and back again did indeed matter. Since short mode is
20513      # case insensitive, let's make it lowercase to improve readability.
20514      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20515      # Now convert it back to Unix-stile (cygpath)
20516      input_path=`$CYGPATH -u "$shortmode_path"`
20517      new_path="$input_path"
20518    fi
20519  fi
20520
20521  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20522  if test "x$test_cygdrive_prefix" = x; then
20523    # As a simple fix, exclude /usr/bin since it's not a real path.
20524    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20525      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20526      # a path prefixed by /cygdrive for fixpath to work.
20527      new_path="$CYGWIN_ROOT_PATH$input_path"
20528    fi
20529  fi
20530
20531
20532  if test "x$path" != "x$new_path"; then
20533    BOOT_JDK="$new_path"
20534    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20535$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20536  fi
20537
20538    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20539
20540  path="$BOOT_JDK"
20541  has_colon=`$ECHO $path | $GREP ^.:`
20542  new_path="$path"
20543  if test "x$has_colon" = x; then
20544    # Not in mixed or Windows style, start by that.
20545    new_path=`cmd //c echo $path`
20546  fi
20547
20548
20549  input_path="$new_path"
20550  # Check if we need to convert this using DOS-style short mode. If the path
20551  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20552  # take no chances and rewrite it.
20553  # Note: m4 eats our [], so we need to use [ and ] instead.
20554  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20555  if test "x$has_forbidden_chars" != x; then
20556    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20557    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20558  fi
20559
20560
20561  windows_path="$new_path"
20562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20563    unix_path=`$CYGPATH -u "$windows_path"`
20564    new_path="$unix_path"
20565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20567    new_path="$unix_path"
20568  fi
20569
20570  if test "x$path" != "x$new_path"; then
20571    BOOT_JDK="$new_path"
20572    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20573$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20574  fi
20575
20576  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20577  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20578
20579    else
20580      # We're on a unix platform. Hooray! :)
20581      path="$BOOT_JDK"
20582      has_space=`$ECHO "$path" | $GREP " "`
20583      if test "x$has_space" != x; then
20584        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20585$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20586        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20587      fi
20588
20589      # Use eval to expand a potential ~
20590      eval path="$path"
20591      if test ! -f "$path" && test ! -d "$path"; then
20592        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20593      fi
20594
20595      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20596    fi
20597  fi
20598
20599            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20600$as_echo_n "checking for Boot JDK... " >&6; }
20601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20602$as_echo "$BOOT_JDK" >&6; }
20603            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20604$as_echo_n "checking Boot JDK version... " >&6; }
20605            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20607$as_echo "$BOOT_JDK_VERSION" >&6; }
20608          fi # end check jdk version
20609        fi # end check javac
20610      fi # end check java
20611    fi # end check boot jdk found
20612  fi
20613
20614
20615  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20616
20617  if test "x$BOOT_JDK_FOUND" = xno; then
20618    # Now execute the test
20619
20620  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20621    # First check at user selected default
20622
20623  if test "x$BOOT_JDK_FOUND" = xno; then
20624    # Now execute the test
20625
20626  if test -x /usr/libexec/java_home; then
20627    BOOT_JDK=`/usr/libexec/java_home `
20628    BOOT_JDK_FOUND=maybe
20629    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20630$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20631  fi
20632
20633
20634    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20635    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20636      # Do we have a bin/java?
20637      if test ! -x "$BOOT_JDK/bin/java"; then
20638        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20639$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20640        BOOT_JDK_FOUND=no
20641      else
20642        # Do we have a bin/javac?
20643        if test ! -x "$BOOT_JDK/bin/javac"; then
20644          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20646          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20647$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20648          BOOT_JDK_FOUND=no
20649        else
20650          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20651          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20652
20653          # Extra M4 quote needed to protect [] in grep expression.
20654          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20655          if test "x$FOUND_CORRECT_VERSION" = x; then
20656            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20657$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20658            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20659$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20660            BOOT_JDK_FOUND=no
20661          else
20662            # We're done! :-)
20663            BOOT_JDK_FOUND=yes
20664
20665  # Only process if variable expands to non-empty
20666
20667  if test "x$BOOT_JDK" != x; then
20668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20669
20670  # Input might be given as Windows format, start by converting to
20671  # unix format.
20672  path="$BOOT_JDK"
20673  new_path=`$CYGPATH -u "$path"`
20674
20675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20678  # "foo.exe" is OK but "foo" is an error.
20679  #
20680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20681  # It is also a way to make sure we got the proper file name for the real test later on.
20682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20683  if test "x$test_shortpath" = x; then
20684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20685$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20686    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20687  fi
20688
20689  # Call helper function which possibly converts this using DOS-style short mode.
20690  # If so, the updated path is stored in $new_path.
20691
20692  input_path="$new_path"
20693  # Check if we need to convert this using DOS-style short mode. If the path
20694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20695  # take no chances and rewrite it.
20696  # Note: m4 eats our [], so we need to use [ and ] instead.
20697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20698  if test "x$has_forbidden_chars" != x; then
20699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20703      # Going to short mode and back again did indeed matter. Since short mode is
20704      # case insensitive, let's make it lowercase to improve readability.
20705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20706      # Now convert it back to Unix-stile (cygpath)
20707      input_path=`$CYGPATH -u "$shortmode_path"`
20708      new_path="$input_path"
20709    fi
20710  fi
20711
20712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20713  if test "x$test_cygdrive_prefix" = x; then
20714    # As a simple fix, exclude /usr/bin since it's not a real path.
20715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20717      # a path prefixed by /cygdrive for fixpath to work.
20718      new_path="$CYGWIN_ROOT_PATH$input_path"
20719    fi
20720  fi
20721
20722
20723  if test "x$path" != "x$new_path"; then
20724    BOOT_JDK="$new_path"
20725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20727  fi
20728
20729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20730
20731  path="$BOOT_JDK"
20732  has_colon=`$ECHO $path | $GREP ^.:`
20733  new_path="$path"
20734  if test "x$has_colon" = x; then
20735    # Not in mixed or Windows style, start by that.
20736    new_path=`cmd //c echo $path`
20737  fi
20738
20739
20740  input_path="$new_path"
20741  # Check if we need to convert this using DOS-style short mode. If the path
20742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20743  # take no chances and rewrite it.
20744  # Note: m4 eats our [], so we need to use [ and ] instead.
20745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20746  if test "x$has_forbidden_chars" != x; then
20747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20749  fi
20750
20751
20752  windows_path="$new_path"
20753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20754    unix_path=`$CYGPATH -u "$windows_path"`
20755    new_path="$unix_path"
20756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20758    new_path="$unix_path"
20759  fi
20760
20761  if test "x$path" != "x$new_path"; then
20762    BOOT_JDK="$new_path"
20763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20764$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20765  fi
20766
20767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20769
20770    else
20771      # We're on a unix platform. Hooray! :)
20772      path="$BOOT_JDK"
20773      has_space=`$ECHO "$path" | $GREP " "`
20774      if test "x$has_space" != x; then
20775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20776$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20778      fi
20779
20780      # Use eval to expand a potential ~
20781      eval path="$path"
20782      if test ! -f "$path" && test ! -d "$path"; then
20783        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20784      fi
20785
20786      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20787    fi
20788  fi
20789
20790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20791$as_echo_n "checking for Boot JDK... " >&6; }
20792            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20793$as_echo "$BOOT_JDK" >&6; }
20794            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20795$as_echo_n "checking Boot JDK version... " >&6; }
20796            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20798$as_echo "$BOOT_JDK_VERSION" >&6; }
20799          fi # end check jdk version
20800        fi # end check javac
20801      fi # end check java
20802    fi # end check boot jdk found
20803  fi
20804
20805    # If that did not work out (e.g. too old), try explicit versions instead
20806
20807  if test "x$BOOT_JDK_FOUND" = xno; then
20808    # Now execute the test
20809
20810  if test -x /usr/libexec/java_home; then
20811    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20812    BOOT_JDK_FOUND=maybe
20813    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20814$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20815  fi
20816
20817
20818    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20819    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20820      # Do we have a bin/java?
20821      if test ! -x "$BOOT_JDK/bin/java"; then
20822        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20823$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20824        BOOT_JDK_FOUND=no
20825      else
20826        # Do we have a bin/javac?
20827        if test ! -x "$BOOT_JDK/bin/javac"; then
20828          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20830          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20831$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20832          BOOT_JDK_FOUND=no
20833        else
20834          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20835          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20836
20837          # Extra M4 quote needed to protect [] in grep expression.
20838          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20839          if test "x$FOUND_CORRECT_VERSION" = x; then
20840            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20842            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20843$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20844            BOOT_JDK_FOUND=no
20845          else
20846            # We're done! :-)
20847            BOOT_JDK_FOUND=yes
20848
20849  # Only process if variable expands to non-empty
20850
20851  if test "x$BOOT_JDK" != x; then
20852    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20853
20854  # Input might be given as Windows format, start by converting to
20855  # unix format.
20856  path="$BOOT_JDK"
20857  new_path=`$CYGPATH -u "$path"`
20858
20859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20862  # "foo.exe" is OK but "foo" is an error.
20863  #
20864  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20865  # It is also a way to make sure we got the proper file name for the real test later on.
20866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20867  if test "x$test_shortpath" = x; then
20868    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20870    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20871  fi
20872
20873  # Call helper function which possibly converts this using DOS-style short mode.
20874  # If so, the updated path is stored in $new_path.
20875
20876  input_path="$new_path"
20877  # Check if we need to convert this using DOS-style short mode. If the path
20878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20879  # take no chances and rewrite it.
20880  # Note: m4 eats our [], so we need to use [ and ] instead.
20881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20882  if test "x$has_forbidden_chars" != x; then
20883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20884    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20885    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20886    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20887      # Going to short mode and back again did indeed matter. Since short mode is
20888      # case insensitive, let's make it lowercase to improve readability.
20889      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20890      # Now convert it back to Unix-stile (cygpath)
20891      input_path=`$CYGPATH -u "$shortmode_path"`
20892      new_path="$input_path"
20893    fi
20894  fi
20895
20896  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20897  if test "x$test_cygdrive_prefix" = x; then
20898    # As a simple fix, exclude /usr/bin since it's not a real path.
20899    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20900      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20901      # a path prefixed by /cygdrive for fixpath to work.
20902      new_path="$CYGWIN_ROOT_PATH$input_path"
20903    fi
20904  fi
20905
20906
20907  if test "x$path" != "x$new_path"; then
20908    BOOT_JDK="$new_path"
20909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20910$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20911  fi
20912
20913    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20914
20915  path="$BOOT_JDK"
20916  has_colon=`$ECHO $path | $GREP ^.:`
20917  new_path="$path"
20918  if test "x$has_colon" = x; then
20919    # Not in mixed or Windows style, start by that.
20920    new_path=`cmd //c echo $path`
20921  fi
20922
20923
20924  input_path="$new_path"
20925  # Check if we need to convert this using DOS-style short mode. If the path
20926  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20927  # take no chances and rewrite it.
20928  # Note: m4 eats our [], so we need to use [ and ] instead.
20929  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20930  if test "x$has_forbidden_chars" != x; then
20931    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20932    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20933  fi
20934
20935
20936  windows_path="$new_path"
20937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20938    unix_path=`$CYGPATH -u "$windows_path"`
20939    new_path="$unix_path"
20940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20942    new_path="$unix_path"
20943  fi
20944
20945  if test "x$path" != "x$new_path"; then
20946    BOOT_JDK="$new_path"
20947    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20948$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20949  fi
20950
20951  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20952  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20953
20954    else
20955      # We're on a unix platform. Hooray! :)
20956      path="$BOOT_JDK"
20957      has_space=`$ECHO "$path" | $GREP " "`
20958      if test "x$has_space" != x; then
20959        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20960$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20961        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20962      fi
20963
20964      # Use eval to expand a potential ~
20965      eval path="$path"
20966      if test ! -f "$path" && test ! -d "$path"; then
20967        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20968      fi
20969
20970      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20971    fi
20972  fi
20973
20974            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20975$as_echo_n "checking for Boot JDK... " >&6; }
20976            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20977$as_echo "$BOOT_JDK" >&6; }
20978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20979$as_echo_n "checking Boot JDK version... " >&6; }
20980            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20981            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20982$as_echo "$BOOT_JDK_VERSION" >&6; }
20983          fi # end check jdk version
20984        fi # end check javac
20985      fi # end check java
20986    fi # end check boot jdk found
20987  fi
20988
20989
20990  if test "x$BOOT_JDK_FOUND" = xno; then
20991    # Now execute the test
20992
20993  if test -x /usr/libexec/java_home; then
20994    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20995    BOOT_JDK_FOUND=maybe
20996    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20997$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20998  fi
20999
21000
21001    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21002    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21003      # Do we have a bin/java?
21004      if test ! -x "$BOOT_JDK/bin/java"; then
21005        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21006$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21007        BOOT_JDK_FOUND=no
21008      else
21009        # Do we have a bin/javac?
21010        if test ! -x "$BOOT_JDK/bin/javac"; then
21011          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21013          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21014$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21015          BOOT_JDK_FOUND=no
21016        else
21017          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21018          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21019
21020          # Extra M4 quote needed to protect [] in grep expression.
21021          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21022          if test "x$FOUND_CORRECT_VERSION" = x; then
21023            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21025            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21026$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21027            BOOT_JDK_FOUND=no
21028          else
21029            # We're done! :-)
21030            BOOT_JDK_FOUND=yes
21031
21032  # Only process if variable expands to non-empty
21033
21034  if test "x$BOOT_JDK" != x; then
21035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21036
21037  # Input might be given as Windows format, start by converting to
21038  # unix format.
21039  path="$BOOT_JDK"
21040  new_path=`$CYGPATH -u "$path"`
21041
21042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21045  # "foo.exe" is OK but "foo" is an error.
21046  #
21047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21048  # It is also a way to make sure we got the proper file name for the real test later on.
21049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21050  if test "x$test_shortpath" = x; then
21051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21052$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21053    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21054  fi
21055
21056  # Call helper function which possibly converts this using DOS-style short mode.
21057  # If so, the updated path is stored in $new_path.
21058
21059  input_path="$new_path"
21060  # Check if we need to convert this using DOS-style short mode. If the path
21061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21062  # take no chances and rewrite it.
21063  # Note: m4 eats our [], so we need to use [ and ] instead.
21064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21065  if test "x$has_forbidden_chars" != x; then
21066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21070      # Going to short mode and back again did indeed matter. Since short mode is
21071      # case insensitive, let's make it lowercase to improve readability.
21072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21073      # Now convert it back to Unix-stile (cygpath)
21074      input_path=`$CYGPATH -u "$shortmode_path"`
21075      new_path="$input_path"
21076    fi
21077  fi
21078
21079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21080  if test "x$test_cygdrive_prefix" = x; then
21081    # As a simple fix, exclude /usr/bin since it's not a real path.
21082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21084      # a path prefixed by /cygdrive for fixpath to work.
21085      new_path="$CYGWIN_ROOT_PATH$input_path"
21086    fi
21087  fi
21088
21089
21090  if test "x$path" != "x$new_path"; then
21091    BOOT_JDK="$new_path"
21092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21094  fi
21095
21096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21097
21098  path="$BOOT_JDK"
21099  has_colon=`$ECHO $path | $GREP ^.:`
21100  new_path="$path"
21101  if test "x$has_colon" = x; then
21102    # Not in mixed or Windows style, start by that.
21103    new_path=`cmd //c echo $path`
21104  fi
21105
21106
21107  input_path="$new_path"
21108  # Check if we need to convert this using DOS-style short mode. If the path
21109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21110  # take no chances and rewrite it.
21111  # Note: m4 eats our [], so we need to use [ and ] instead.
21112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21113  if test "x$has_forbidden_chars" != x; then
21114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21116  fi
21117
21118
21119  windows_path="$new_path"
21120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21121    unix_path=`$CYGPATH -u "$windows_path"`
21122    new_path="$unix_path"
21123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21125    new_path="$unix_path"
21126  fi
21127
21128  if test "x$path" != "x$new_path"; then
21129    BOOT_JDK="$new_path"
21130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21131$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21132  fi
21133
21134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21136
21137    else
21138      # We're on a unix platform. Hooray! :)
21139      path="$BOOT_JDK"
21140      has_space=`$ECHO "$path" | $GREP " "`
21141      if test "x$has_space" != x; then
21142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21145      fi
21146
21147      # Use eval to expand a potential ~
21148      eval path="$path"
21149      if test ! -f "$path" && test ! -d "$path"; then
21150        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21151      fi
21152
21153      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21154    fi
21155  fi
21156
21157            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21158$as_echo_n "checking for Boot JDK... " >&6; }
21159            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21160$as_echo "$BOOT_JDK" >&6; }
21161            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21162$as_echo_n "checking Boot JDK version... " >&6; }
21163            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21164            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21165$as_echo "$BOOT_JDK_VERSION" >&6; }
21166          fi # end check jdk version
21167        fi # end check javac
21168      fi # end check java
21169    fi # end check boot jdk found
21170  fi
21171
21172
21173  if test "x$BOOT_JDK_FOUND" = xno; then
21174    # Now execute the test
21175
21176  if test -x /usr/libexec/java_home; then
21177    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21178    BOOT_JDK_FOUND=maybe
21179    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21180$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21181  fi
21182
21183
21184    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21185    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21186      # Do we have a bin/java?
21187      if test ! -x "$BOOT_JDK/bin/java"; then
21188        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21190        BOOT_JDK_FOUND=no
21191      else
21192        # Do we have a bin/javac?
21193        if test ! -x "$BOOT_JDK/bin/javac"; then
21194          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21195$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21196          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21197$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21198          BOOT_JDK_FOUND=no
21199        else
21200          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21201          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21202
21203          # Extra M4 quote needed to protect [] in grep expression.
21204          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21205          if test "x$FOUND_CORRECT_VERSION" = x; then
21206            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21207$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21208            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21209$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21210            BOOT_JDK_FOUND=no
21211          else
21212            # We're done! :-)
21213            BOOT_JDK_FOUND=yes
21214
21215  # Only process if variable expands to non-empty
21216
21217  if test "x$BOOT_JDK" != x; then
21218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21219
21220  # Input might be given as Windows format, start by converting to
21221  # unix format.
21222  path="$BOOT_JDK"
21223  new_path=`$CYGPATH -u "$path"`
21224
21225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21228  # "foo.exe" is OK but "foo" is an error.
21229  #
21230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21231  # It is also a way to make sure we got the proper file name for the real test later on.
21232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21233  if test "x$test_shortpath" = x; then
21234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21236    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21237  fi
21238
21239  # Call helper function which possibly converts this using DOS-style short mode.
21240  # If so, the updated path is stored in $new_path.
21241
21242  input_path="$new_path"
21243  # Check if we need to convert this using DOS-style short mode. If the path
21244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21245  # take no chances and rewrite it.
21246  # Note: m4 eats our [], so we need to use [ and ] instead.
21247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21248  if test "x$has_forbidden_chars" != x; then
21249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21253      # Going to short mode and back again did indeed matter. Since short mode is
21254      # case insensitive, let's make it lowercase to improve readability.
21255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21256      # Now convert it back to Unix-stile (cygpath)
21257      input_path=`$CYGPATH -u "$shortmode_path"`
21258      new_path="$input_path"
21259    fi
21260  fi
21261
21262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21263  if test "x$test_cygdrive_prefix" = x; then
21264    # As a simple fix, exclude /usr/bin since it's not a real path.
21265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21267      # a path prefixed by /cygdrive for fixpath to work.
21268      new_path="$CYGWIN_ROOT_PATH$input_path"
21269    fi
21270  fi
21271
21272
21273  if test "x$path" != "x$new_path"; then
21274    BOOT_JDK="$new_path"
21275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21276$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21277  fi
21278
21279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21280
21281  path="$BOOT_JDK"
21282  has_colon=`$ECHO $path | $GREP ^.:`
21283  new_path="$path"
21284  if test "x$has_colon" = x; then
21285    # Not in mixed or Windows style, start by that.
21286    new_path=`cmd //c echo $path`
21287  fi
21288
21289
21290  input_path="$new_path"
21291  # Check if we need to convert this using DOS-style short mode. If the path
21292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21293  # take no chances and rewrite it.
21294  # Note: m4 eats our [], so we need to use [ and ] instead.
21295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21296  if test "x$has_forbidden_chars" != x; then
21297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21299  fi
21300
21301
21302  windows_path="$new_path"
21303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21304    unix_path=`$CYGPATH -u "$windows_path"`
21305    new_path="$unix_path"
21306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21308    new_path="$unix_path"
21309  fi
21310
21311  if test "x$path" != "x$new_path"; then
21312    BOOT_JDK="$new_path"
21313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21314$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21315  fi
21316
21317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21319
21320    else
21321      # We're on a unix platform. Hooray! :)
21322      path="$BOOT_JDK"
21323      has_space=`$ECHO "$path" | $GREP " "`
21324      if test "x$has_space" != x; then
21325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21326$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21328      fi
21329
21330      # Use eval to expand a potential ~
21331      eval path="$path"
21332      if test ! -f "$path" && test ! -d "$path"; then
21333        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21334      fi
21335
21336      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21337    fi
21338  fi
21339
21340            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21341$as_echo_n "checking for Boot JDK... " >&6; }
21342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21343$as_echo "$BOOT_JDK" >&6; }
21344            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21345$as_echo_n "checking Boot JDK version... " >&6; }
21346            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21347            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21348$as_echo "$BOOT_JDK_VERSION" >&6; }
21349          fi # end check jdk version
21350        fi # end check javac
21351      fi # end check java
21352    fi # end check boot jdk found
21353  fi
21354
21355  fi
21356
21357
21358    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21359    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21360      # Do we have a bin/java?
21361      if test ! -x "$BOOT_JDK/bin/java"; then
21362        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21364        BOOT_JDK_FOUND=no
21365      else
21366        # Do we have a bin/javac?
21367        if test ! -x "$BOOT_JDK/bin/javac"; then
21368          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21369$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21370          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21371$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21372          BOOT_JDK_FOUND=no
21373        else
21374          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21375          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21376
21377          # Extra M4 quote needed to protect [] in grep expression.
21378          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21379          if test "x$FOUND_CORRECT_VERSION" = x; then
21380            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21382            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21383$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21384            BOOT_JDK_FOUND=no
21385          else
21386            # We're done! :-)
21387            BOOT_JDK_FOUND=yes
21388
21389  # Only process if variable expands to non-empty
21390
21391  if test "x$BOOT_JDK" != x; then
21392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21393
21394  # Input might be given as Windows format, start by converting to
21395  # unix format.
21396  path="$BOOT_JDK"
21397  new_path=`$CYGPATH -u "$path"`
21398
21399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21402  # "foo.exe" is OK but "foo" is an error.
21403  #
21404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21405  # It is also a way to make sure we got the proper file name for the real test later on.
21406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21407  if test "x$test_shortpath" = x; then
21408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21410    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21411  fi
21412
21413  # Call helper function which possibly converts this using DOS-style short mode.
21414  # If so, the updated path is stored in $new_path.
21415
21416  input_path="$new_path"
21417  # Check if we need to convert this using DOS-style short mode. If the path
21418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21419  # take no chances and rewrite it.
21420  # Note: m4 eats our [], so we need to use [ and ] instead.
21421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21422  if test "x$has_forbidden_chars" != x; then
21423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21427      # Going to short mode and back again did indeed matter. Since short mode is
21428      # case insensitive, let's make it lowercase to improve readability.
21429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21430      # Now convert it back to Unix-stile (cygpath)
21431      input_path=`$CYGPATH -u "$shortmode_path"`
21432      new_path="$input_path"
21433    fi
21434  fi
21435
21436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21437  if test "x$test_cygdrive_prefix" = x; then
21438    # As a simple fix, exclude /usr/bin since it's not a real path.
21439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21441      # a path prefixed by /cygdrive for fixpath to work.
21442      new_path="$CYGWIN_ROOT_PATH$input_path"
21443    fi
21444  fi
21445
21446
21447  if test "x$path" != "x$new_path"; then
21448    BOOT_JDK="$new_path"
21449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21450$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21451  fi
21452
21453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21454
21455  path="$BOOT_JDK"
21456  has_colon=`$ECHO $path | $GREP ^.:`
21457  new_path="$path"
21458  if test "x$has_colon" = x; then
21459    # Not in mixed or Windows style, start by that.
21460    new_path=`cmd //c echo $path`
21461  fi
21462
21463
21464  input_path="$new_path"
21465  # Check if we need to convert this using DOS-style short mode. If the path
21466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21467  # take no chances and rewrite it.
21468  # Note: m4 eats our [], so we need to use [ and ] instead.
21469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21470  if test "x$has_forbidden_chars" != x; then
21471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21473  fi
21474
21475
21476  windows_path="$new_path"
21477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21478    unix_path=`$CYGPATH -u "$windows_path"`
21479    new_path="$unix_path"
21480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21482    new_path="$unix_path"
21483  fi
21484
21485  if test "x$path" != "x$new_path"; then
21486    BOOT_JDK="$new_path"
21487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21488$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21489  fi
21490
21491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21493
21494    else
21495      # We're on a unix platform. Hooray! :)
21496      path="$BOOT_JDK"
21497      has_space=`$ECHO "$path" | $GREP " "`
21498      if test "x$has_space" != x; then
21499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21500$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21502      fi
21503
21504      # Use eval to expand a potential ~
21505      eval path="$path"
21506      if test ! -f "$path" && test ! -d "$path"; then
21507        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21508      fi
21509
21510      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21511    fi
21512  fi
21513
21514            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21515$as_echo_n "checking for Boot JDK... " >&6; }
21516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21517$as_echo "$BOOT_JDK" >&6; }
21518            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21519$as_echo_n "checking Boot JDK version... " >&6; }
21520            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21522$as_echo "$BOOT_JDK_VERSION" >&6; }
21523          fi # end check jdk version
21524        fi # end check javac
21525      fi # end check java
21526    fi # end check boot jdk found
21527  fi
21528
21529
21530  # Test: Is $JAVA_HOME set?
21531
21532  if test "x$BOOT_JDK_FOUND" = xno; then
21533    # Now execute the test
21534
21535  if test "x$JAVA_HOME" != x; then
21536    JAVA_HOME_PROCESSED="$JAVA_HOME"
21537
21538  # Only process if variable expands to non-empty
21539
21540  if test "x$JAVA_HOME_PROCESSED" != x; then
21541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21542
21543  # Input might be given as Windows format, start by converting to
21544  # unix format.
21545  path="$JAVA_HOME_PROCESSED"
21546  new_path=`$CYGPATH -u "$path"`
21547
21548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21551  # "foo.exe" is OK but "foo" is an error.
21552  #
21553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21554  # It is also a way to make sure we got the proper file name for the real test later on.
21555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21556  if test "x$test_shortpath" = x; then
21557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21558$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21559    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21560  fi
21561
21562  # Call helper function which possibly converts this using DOS-style short mode.
21563  # If so, the updated path is stored in $new_path.
21564
21565  input_path="$new_path"
21566  # Check if we need to convert this using DOS-style short mode. If the path
21567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21568  # take no chances and rewrite it.
21569  # Note: m4 eats our [], so we need to use [ and ] instead.
21570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21571  if test "x$has_forbidden_chars" != x; then
21572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21576      # Going to short mode and back again did indeed matter. Since short mode is
21577      # case insensitive, let's make it lowercase to improve readability.
21578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21579      # Now convert it back to Unix-stile (cygpath)
21580      input_path=`$CYGPATH -u "$shortmode_path"`
21581      new_path="$input_path"
21582    fi
21583  fi
21584
21585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21586  if test "x$test_cygdrive_prefix" = x; then
21587    # As a simple fix, exclude /usr/bin since it's not a real path.
21588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21590      # a path prefixed by /cygdrive for fixpath to work.
21591      new_path="$CYGWIN_ROOT_PATH$input_path"
21592    fi
21593  fi
21594
21595
21596  if test "x$path" != "x$new_path"; then
21597    JAVA_HOME_PROCESSED="$new_path"
21598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21599$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21600  fi
21601
21602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21603
21604  path="$JAVA_HOME_PROCESSED"
21605  has_colon=`$ECHO $path | $GREP ^.:`
21606  new_path="$path"
21607  if test "x$has_colon" = x; then
21608    # Not in mixed or Windows style, start by that.
21609    new_path=`cmd //c echo $path`
21610  fi
21611
21612
21613  input_path="$new_path"
21614  # Check if we need to convert this using DOS-style short mode. If the path
21615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21616  # take no chances and rewrite it.
21617  # Note: m4 eats our [], so we need to use [ and ] instead.
21618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21619  if test "x$has_forbidden_chars" != x; then
21620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21622  fi
21623
21624
21625  windows_path="$new_path"
21626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21627    unix_path=`$CYGPATH -u "$windows_path"`
21628    new_path="$unix_path"
21629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21631    new_path="$unix_path"
21632  fi
21633
21634  if test "x$path" != "x$new_path"; then
21635    JAVA_HOME_PROCESSED="$new_path"
21636    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21637$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21638  fi
21639
21640  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21642
21643    else
21644      # We're on a unix platform. Hooray! :)
21645      path="$JAVA_HOME_PROCESSED"
21646      has_space=`$ECHO "$path" | $GREP " "`
21647      if test "x$has_space" != x; then
21648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21649$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21651      fi
21652
21653      # Use eval to expand a potential ~
21654      eval path="$path"
21655      if test ! -f "$path" && test ! -d "$path"; then
21656        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21657      fi
21658
21659      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21660    fi
21661  fi
21662
21663    if test ! -d "$JAVA_HOME_PROCESSED"; then
21664      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21665$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21666    else
21667      # Aha, the user has set a JAVA_HOME
21668      # let us use that as the Boot JDK.
21669      BOOT_JDK="$JAVA_HOME_PROCESSED"
21670      BOOT_JDK_FOUND=maybe
21671      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21672$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21673    fi
21674  fi
21675
21676
21677    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21678    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21679      # Do we have a bin/java?
21680      if test ! -x "$BOOT_JDK/bin/java"; then
21681        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21682$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21683        BOOT_JDK_FOUND=no
21684      else
21685        # Do we have a bin/javac?
21686        if test ! -x "$BOOT_JDK/bin/javac"; then
21687          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21688$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21689          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21690$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21691          BOOT_JDK_FOUND=no
21692        else
21693          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21694          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21695
21696          # Extra M4 quote needed to protect [] in grep expression.
21697          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21698          if test "x$FOUND_CORRECT_VERSION" = x; then
21699            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21700$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21701            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21702$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21703            BOOT_JDK_FOUND=no
21704          else
21705            # We're done! :-)
21706            BOOT_JDK_FOUND=yes
21707
21708  # Only process if variable expands to non-empty
21709
21710  if test "x$BOOT_JDK" != x; then
21711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21712
21713  # Input might be given as Windows format, start by converting to
21714  # unix format.
21715  path="$BOOT_JDK"
21716  new_path=`$CYGPATH -u "$path"`
21717
21718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21721  # "foo.exe" is OK but "foo" is an error.
21722  #
21723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21724  # It is also a way to make sure we got the proper file name for the real test later on.
21725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21726  if test "x$test_shortpath" = x; then
21727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21730  fi
21731
21732  # Call helper function which possibly converts this using DOS-style short mode.
21733  # If so, the updated path is stored in $new_path.
21734
21735  input_path="$new_path"
21736  # Check if we need to convert this using DOS-style short mode. If the path
21737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21738  # take no chances and rewrite it.
21739  # Note: m4 eats our [], so we need to use [ and ] instead.
21740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21741  if test "x$has_forbidden_chars" != x; then
21742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21746      # Going to short mode and back again did indeed matter. Since short mode is
21747      # case insensitive, let's make it lowercase to improve readability.
21748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21749      # Now convert it back to Unix-stile (cygpath)
21750      input_path=`$CYGPATH -u "$shortmode_path"`
21751      new_path="$input_path"
21752    fi
21753  fi
21754
21755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21756  if test "x$test_cygdrive_prefix" = x; then
21757    # As a simple fix, exclude /usr/bin since it's not a real path.
21758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21760      # a path prefixed by /cygdrive for fixpath to work.
21761      new_path="$CYGWIN_ROOT_PATH$input_path"
21762    fi
21763  fi
21764
21765
21766  if test "x$path" != "x$new_path"; then
21767    BOOT_JDK="$new_path"
21768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21770  fi
21771
21772    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21773
21774  path="$BOOT_JDK"
21775  has_colon=`$ECHO $path | $GREP ^.:`
21776  new_path="$path"
21777  if test "x$has_colon" = x; then
21778    # Not in mixed or Windows style, start by that.
21779    new_path=`cmd //c echo $path`
21780  fi
21781
21782
21783  input_path="$new_path"
21784  # Check if we need to convert this using DOS-style short mode. If the path
21785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21786  # take no chances and rewrite it.
21787  # Note: m4 eats our [], so we need to use [ and ] instead.
21788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21789  if test "x$has_forbidden_chars" != x; then
21790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21792  fi
21793
21794
21795  windows_path="$new_path"
21796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21797    unix_path=`$CYGPATH -u "$windows_path"`
21798    new_path="$unix_path"
21799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21801    new_path="$unix_path"
21802  fi
21803
21804  if test "x$path" != "x$new_path"; then
21805    BOOT_JDK="$new_path"
21806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21808  fi
21809
21810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21812
21813    else
21814      # We're on a unix platform. Hooray! :)
21815      path="$BOOT_JDK"
21816      has_space=`$ECHO "$path" | $GREP " "`
21817      if test "x$has_space" != x; then
21818        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21820        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21821      fi
21822
21823      # Use eval to expand a potential ~
21824      eval path="$path"
21825      if test ! -f "$path" && test ! -d "$path"; then
21826        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21827      fi
21828
21829      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21830    fi
21831  fi
21832
21833            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21834$as_echo_n "checking for Boot JDK... " >&6; }
21835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21836$as_echo "$BOOT_JDK" >&6; }
21837            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21838$as_echo_n "checking Boot JDK version... " >&6; }
21839            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21840            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21841$as_echo "$BOOT_JDK_VERSION" >&6; }
21842          fi # end check jdk version
21843        fi # end check javac
21844      fi # end check java
21845    fi # end check boot jdk found
21846  fi
21847
21848
21849  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21850
21851  if test "x$BOOT_JDK_FOUND" = xno; then
21852    # Now execute the test
21853
21854  # Extract the first word of "javac", so it can be a program name with args.
21855set dummy javac; ac_word=$2
21856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21857$as_echo_n "checking for $ac_word... " >&6; }
21858if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21859  $as_echo_n "(cached) " >&6
21860else
21861  case $JAVAC_CHECK in
21862  [\\/]* | ?:[\\/]*)
21863  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21864  ;;
21865  *)
21866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21867for as_dir in $PATH
21868do
21869  IFS=$as_save_IFS
21870  test -z "$as_dir" && as_dir=.
21871    for ac_exec_ext in '' $ac_executable_extensions; do
21872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21873    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21875    break 2
21876  fi
21877done
21878  done
21879IFS=$as_save_IFS
21880
21881  ;;
21882esac
21883fi
21884JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21885if test -n "$JAVAC_CHECK"; then
21886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21887$as_echo "$JAVAC_CHECK" >&6; }
21888else
21889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21890$as_echo "no" >&6; }
21891fi
21892
21893
21894  # Extract the first word of "java", so it can be a program name with args.
21895set dummy java; ac_word=$2
21896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21897$as_echo_n "checking for $ac_word... " >&6; }
21898if ${ac_cv_path_JAVA_CHECK+:} false; then :
21899  $as_echo_n "(cached) " >&6
21900else
21901  case $JAVA_CHECK in
21902  [\\/]* | ?:[\\/]*)
21903  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21904  ;;
21905  *)
21906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21907for as_dir in $PATH
21908do
21909  IFS=$as_save_IFS
21910  test -z "$as_dir" && as_dir=.
21911    for ac_exec_ext in '' $ac_executable_extensions; do
21912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21913    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21915    break 2
21916  fi
21917done
21918  done
21919IFS=$as_save_IFS
21920
21921  ;;
21922esac
21923fi
21924JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21925if test -n "$JAVA_CHECK"; then
21926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21927$as_echo "$JAVA_CHECK" >&6; }
21928else
21929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21930$as_echo "no" >&6; }
21931fi
21932
21933
21934  BINARY="$JAVAC_CHECK"
21935  if test "x$JAVAC_CHECK" = x; then
21936    BINARY="$JAVA_CHECK"
21937  fi
21938  if test "x$BINARY" != x; then
21939    # So there is a java(c) binary, it might be part of a JDK.
21940    # Lets find the JDK/JRE directory by following symbolic links.
21941    # Linux/GNU systems often have links from /usr/bin/java to
21942    # /etc/alternatives/java to the real JDK binary.
21943
21944  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21945    # Follow a chain of symbolic links. Use readlink
21946    # where it exists, else fall back to horribly
21947    # complicated shell code.
21948    if test "x$READLINK_TESTED" != yes; then
21949      # On MacOSX there is a readlink tool with a different
21950      # purpose than the GNU readlink tool. Check the found readlink.
21951      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21952      if test "x$ISGNU" = x; then
21953        # A readlink that we do not know how to use.
21954        # Are there other non-GNU readlinks out there?
21955        READLINK_TESTED=yes
21956        READLINK=
21957      fi
21958    fi
21959
21960    if test "x$READLINK" != x; then
21961      BINARY=`$READLINK -f $BINARY`
21962    else
21963      # Save the current directory for restoring afterwards
21964      STARTDIR=$PWD
21965      COUNTER=0
21966      sym_link_dir=`$DIRNAME $BINARY`
21967      sym_link_file=`$BASENAME $BINARY`
21968      cd $sym_link_dir
21969      # Use -P flag to resolve symlinks in directories.
21970      cd `$THEPWDCMD -P`
21971      sym_link_dir=`$THEPWDCMD -P`
21972      # Resolve file symlinks
21973      while test $COUNTER -lt 20; do
21974        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21975        if test "x$ISLINK" == x; then
21976          # This is not a symbolic link! We are done!
21977          break
21978        fi
21979        # Again resolve directory symlinks since the target of the just found
21980        # link could be in a different directory
21981        cd `$DIRNAME $ISLINK`
21982        sym_link_dir=`$THEPWDCMD -P`
21983        sym_link_file=`$BASENAME $ISLINK`
21984        let COUNTER=COUNTER+1
21985      done
21986      cd $STARTDIR
21987      BINARY=$sym_link_dir/$sym_link_file
21988    fi
21989  fi
21990
21991    BOOT_JDK=`dirname "$BINARY"`
21992    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21993    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21994      # Looks like we found ourselves an JDK
21995      BOOT_JDK_FOUND=maybe
21996      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21997$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21998    fi
21999  fi
22000
22001
22002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22004      # Do we have a bin/java?
22005      if test ! -x "$BOOT_JDK/bin/java"; then
22006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22008        BOOT_JDK_FOUND=no
22009      else
22010        # Do we have a bin/javac?
22011        if test ! -x "$BOOT_JDK/bin/javac"; then
22012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22016          BOOT_JDK_FOUND=no
22017        else
22018          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22019          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22020
22021          # Extra M4 quote needed to protect [] in grep expression.
22022          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22023          if test "x$FOUND_CORRECT_VERSION" = x; then
22024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22026            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22027$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22028            BOOT_JDK_FOUND=no
22029          else
22030            # We're done! :-)
22031            BOOT_JDK_FOUND=yes
22032
22033  # Only process if variable expands to non-empty
22034
22035  if test "x$BOOT_JDK" != x; then
22036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22037
22038  # Input might be given as Windows format, start by converting to
22039  # unix format.
22040  path="$BOOT_JDK"
22041  new_path=`$CYGPATH -u "$path"`
22042
22043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22046  # "foo.exe" is OK but "foo" is an error.
22047  #
22048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22049  # It is also a way to make sure we got the proper file name for the real test later on.
22050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22051  if test "x$test_shortpath" = x; then
22052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22055  fi
22056
22057  # Call helper function which possibly converts this using DOS-style short mode.
22058  # If so, the updated path is stored in $new_path.
22059
22060  input_path="$new_path"
22061  # Check if we need to convert this using DOS-style short mode. If the path
22062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22063  # take no chances and rewrite it.
22064  # Note: m4 eats our [], so we need to use [ and ] instead.
22065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22066  if test "x$has_forbidden_chars" != x; then
22067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22071      # Going to short mode and back again did indeed matter. Since short mode is
22072      # case insensitive, let's make it lowercase to improve readability.
22073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22074      # Now convert it back to Unix-stile (cygpath)
22075      input_path=`$CYGPATH -u "$shortmode_path"`
22076      new_path="$input_path"
22077    fi
22078  fi
22079
22080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22081  if test "x$test_cygdrive_prefix" = x; then
22082    # As a simple fix, exclude /usr/bin since it's not a real path.
22083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22085      # a path prefixed by /cygdrive for fixpath to work.
22086      new_path="$CYGWIN_ROOT_PATH$input_path"
22087    fi
22088  fi
22089
22090
22091  if test "x$path" != "x$new_path"; then
22092    BOOT_JDK="$new_path"
22093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22095  fi
22096
22097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22098
22099  path="$BOOT_JDK"
22100  has_colon=`$ECHO $path | $GREP ^.:`
22101  new_path="$path"
22102  if test "x$has_colon" = x; then
22103    # Not in mixed or Windows style, start by that.
22104    new_path=`cmd //c echo $path`
22105  fi
22106
22107
22108  input_path="$new_path"
22109  # Check if we need to convert this using DOS-style short mode. If the path
22110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22111  # take no chances and rewrite it.
22112  # Note: m4 eats our [], so we need to use [ and ] instead.
22113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22114  if test "x$has_forbidden_chars" != x; then
22115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22117  fi
22118
22119
22120  windows_path="$new_path"
22121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22122    unix_path=`$CYGPATH -u "$windows_path"`
22123    new_path="$unix_path"
22124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22126    new_path="$unix_path"
22127  fi
22128
22129  if test "x$path" != "x$new_path"; then
22130    BOOT_JDK="$new_path"
22131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22133  fi
22134
22135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22137
22138    else
22139      # We're on a unix platform. Hooray! :)
22140      path="$BOOT_JDK"
22141      has_space=`$ECHO "$path" | $GREP " "`
22142      if test "x$has_space" != x; then
22143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22146      fi
22147
22148      # Use eval to expand a potential ~
22149      eval path="$path"
22150      if test ! -f "$path" && test ! -d "$path"; then
22151        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22152      fi
22153
22154      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22155    fi
22156  fi
22157
22158            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22159$as_echo_n "checking for Boot JDK... " >&6; }
22160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22161$as_echo "$BOOT_JDK" >&6; }
22162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22163$as_echo_n "checking Boot JDK version... " >&6; }
22164            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22166$as_echo "$BOOT_JDK_VERSION" >&6; }
22167          fi # end check jdk version
22168        fi # end check javac
22169      fi # end check java
22170    fi # end check boot jdk found
22171  fi
22172
22173
22174  # Test: Is there a JDK installed in default, well-known locations?
22175
22176  if test "x$BOOT_JDK_FOUND" = xno; then
22177    # Now execute the test
22178
22179  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22180
22181  if test "x$BOOT_JDK_FOUND" = xno; then
22182    # Now execute the test
22183
22184  if test "x$ProgramW6432" != x; then
22185    VIRTUAL_DIR="$ProgramW6432/Java"
22186
22187  windows_path="$VIRTUAL_DIR"
22188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22189    unix_path=`$CYGPATH -u "$windows_path"`
22190    VIRTUAL_DIR="$unix_path"
22191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22193    VIRTUAL_DIR="$unix_path"
22194  fi
22195
22196
22197  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22198  BOOT_JDK_SUFFIX=""
22199  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22200  if test "x$ALL_JDKS_FOUND" != x; then
22201    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22202
22203  if test "x$BOOT_JDK_FOUND" = xno; then
22204    # Now execute the test
22205
22206        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22207        if test -d "$BOOT_JDK"; then
22208          BOOT_JDK_FOUND=maybe
22209          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22210$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22211        fi
22212
22213
22214    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22215    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22216      # Do we have a bin/java?
22217      if test ! -x "$BOOT_JDK/bin/java"; then
22218        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22220        BOOT_JDK_FOUND=no
22221      else
22222        # Do we have a bin/javac?
22223        if test ! -x "$BOOT_JDK/bin/javac"; then
22224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22226          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22227$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22228          BOOT_JDK_FOUND=no
22229        else
22230          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22231          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22232
22233          # Extra M4 quote needed to protect [] in grep expression.
22234          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22235          if test "x$FOUND_CORRECT_VERSION" = x; then
22236            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22237$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22238            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22239$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22240            BOOT_JDK_FOUND=no
22241          else
22242            # We're done! :-)
22243            BOOT_JDK_FOUND=yes
22244
22245  # Only process if variable expands to non-empty
22246
22247  if test "x$BOOT_JDK" != x; then
22248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22249
22250  # Input might be given as Windows format, start by converting to
22251  # unix format.
22252  path="$BOOT_JDK"
22253  new_path=`$CYGPATH -u "$path"`
22254
22255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22258  # "foo.exe" is OK but "foo" is an error.
22259  #
22260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22261  # It is also a way to make sure we got the proper file name for the real test later on.
22262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22263  if test "x$test_shortpath" = x; then
22264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22265$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22266    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22267  fi
22268
22269  # Call helper function which possibly converts this using DOS-style short mode.
22270  # If so, the updated path is stored in $new_path.
22271
22272  input_path="$new_path"
22273  # Check if we need to convert this using DOS-style short mode. If the path
22274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22275  # take no chances and rewrite it.
22276  # Note: m4 eats our [], so we need to use [ and ] instead.
22277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22278  if test "x$has_forbidden_chars" != x; then
22279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22283      # Going to short mode and back again did indeed matter. Since short mode is
22284      # case insensitive, let's make it lowercase to improve readability.
22285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22286      # Now convert it back to Unix-stile (cygpath)
22287      input_path=`$CYGPATH -u "$shortmode_path"`
22288      new_path="$input_path"
22289    fi
22290  fi
22291
22292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22293  if test "x$test_cygdrive_prefix" = x; then
22294    # As a simple fix, exclude /usr/bin since it's not a real path.
22295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22297      # a path prefixed by /cygdrive for fixpath to work.
22298      new_path="$CYGWIN_ROOT_PATH$input_path"
22299    fi
22300  fi
22301
22302
22303  if test "x$path" != "x$new_path"; then
22304    BOOT_JDK="$new_path"
22305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22306$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22307  fi
22308
22309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22310
22311  path="$BOOT_JDK"
22312  has_colon=`$ECHO $path | $GREP ^.:`
22313  new_path="$path"
22314  if test "x$has_colon" = x; then
22315    # Not in mixed or Windows style, start by that.
22316    new_path=`cmd //c echo $path`
22317  fi
22318
22319
22320  input_path="$new_path"
22321  # Check if we need to convert this using DOS-style short mode. If the path
22322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22323  # take no chances and rewrite it.
22324  # Note: m4 eats our [], so we need to use [ and ] instead.
22325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22326  if test "x$has_forbidden_chars" != x; then
22327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22329  fi
22330
22331
22332  windows_path="$new_path"
22333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22334    unix_path=`$CYGPATH -u "$windows_path"`
22335    new_path="$unix_path"
22336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22338    new_path="$unix_path"
22339  fi
22340
22341  if test "x$path" != "x$new_path"; then
22342    BOOT_JDK="$new_path"
22343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22344$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22345  fi
22346
22347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22349
22350    else
22351      # We're on a unix platform. Hooray! :)
22352      path="$BOOT_JDK"
22353      has_space=`$ECHO "$path" | $GREP " "`
22354      if test "x$has_space" != x; then
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22356$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22358      fi
22359
22360      # Use eval to expand a potential ~
22361      eval path="$path"
22362      if test ! -f "$path" && test ! -d "$path"; then
22363        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22364      fi
22365
22366      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22367    fi
22368  fi
22369
22370            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22371$as_echo_n "checking for Boot JDK... " >&6; }
22372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22373$as_echo "$BOOT_JDK" >&6; }
22374            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22375$as_echo_n "checking Boot JDK version... " >&6; }
22376            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22378$as_echo "$BOOT_JDK_VERSION" >&6; }
22379          fi # end check jdk version
22380        fi # end check javac
22381      fi # end check java
22382    fi # end check boot jdk found
22383  fi
22384
22385    done
22386  fi
22387
22388  fi
22389
22390
22391    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22392    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22393      # Do we have a bin/java?
22394      if test ! -x "$BOOT_JDK/bin/java"; then
22395        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22397        BOOT_JDK_FOUND=no
22398      else
22399        # Do we have a bin/javac?
22400        if test ! -x "$BOOT_JDK/bin/javac"; then
22401          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22402$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22403          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22404$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22405          BOOT_JDK_FOUND=no
22406        else
22407          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22408          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22409
22410          # Extra M4 quote needed to protect [] in grep expression.
22411          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22412          if test "x$FOUND_CORRECT_VERSION" = x; then
22413            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22414$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22415            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22416$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22417            BOOT_JDK_FOUND=no
22418          else
22419            # We're done! :-)
22420            BOOT_JDK_FOUND=yes
22421
22422  # Only process if variable expands to non-empty
22423
22424  if test "x$BOOT_JDK" != x; then
22425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22426
22427  # Input might be given as Windows format, start by converting to
22428  # unix format.
22429  path="$BOOT_JDK"
22430  new_path=`$CYGPATH -u "$path"`
22431
22432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22435  # "foo.exe" is OK but "foo" is an error.
22436  #
22437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22438  # It is also a way to make sure we got the proper file name for the real test later on.
22439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22440  if test "x$test_shortpath" = x; then
22441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22442$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22443    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22444  fi
22445
22446  # Call helper function which possibly converts this using DOS-style short mode.
22447  # If so, the updated path is stored in $new_path.
22448
22449  input_path="$new_path"
22450  # Check if we need to convert this using DOS-style short mode. If the path
22451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22452  # take no chances and rewrite it.
22453  # Note: m4 eats our [], so we need to use [ and ] instead.
22454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22455  if test "x$has_forbidden_chars" != x; then
22456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22460      # Going to short mode and back again did indeed matter. Since short mode is
22461      # case insensitive, let's make it lowercase to improve readability.
22462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22463      # Now convert it back to Unix-stile (cygpath)
22464      input_path=`$CYGPATH -u "$shortmode_path"`
22465      new_path="$input_path"
22466    fi
22467  fi
22468
22469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22470  if test "x$test_cygdrive_prefix" = x; then
22471    # As a simple fix, exclude /usr/bin since it's not a real path.
22472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22474      # a path prefixed by /cygdrive for fixpath to work.
22475      new_path="$CYGWIN_ROOT_PATH$input_path"
22476    fi
22477  fi
22478
22479
22480  if test "x$path" != "x$new_path"; then
22481    BOOT_JDK="$new_path"
22482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22483$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22484  fi
22485
22486    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22487
22488  path="$BOOT_JDK"
22489  has_colon=`$ECHO $path | $GREP ^.:`
22490  new_path="$path"
22491  if test "x$has_colon" = x; then
22492    # Not in mixed or Windows style, start by that.
22493    new_path=`cmd //c echo $path`
22494  fi
22495
22496
22497  input_path="$new_path"
22498  # Check if we need to convert this using DOS-style short mode. If the path
22499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22500  # take no chances and rewrite it.
22501  # Note: m4 eats our [], so we need to use [ and ] instead.
22502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22503  if test "x$has_forbidden_chars" != x; then
22504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22506  fi
22507
22508
22509  windows_path="$new_path"
22510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22511    unix_path=`$CYGPATH -u "$windows_path"`
22512    new_path="$unix_path"
22513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22515    new_path="$unix_path"
22516  fi
22517
22518  if test "x$path" != "x$new_path"; then
22519    BOOT_JDK="$new_path"
22520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22522  fi
22523
22524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22526
22527    else
22528      # We're on a unix platform. Hooray! :)
22529      path="$BOOT_JDK"
22530      has_space=`$ECHO "$path" | $GREP " "`
22531      if test "x$has_space" != x; then
22532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22533$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22534        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22535      fi
22536
22537      # Use eval to expand a potential ~
22538      eval path="$path"
22539      if test ! -f "$path" && test ! -d "$path"; then
22540        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22541      fi
22542
22543      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22544    fi
22545  fi
22546
22547            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22548$as_echo_n "checking for Boot JDK... " >&6; }
22549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22550$as_echo "$BOOT_JDK" >&6; }
22551            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22552$as_echo_n "checking Boot JDK version... " >&6; }
22553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22555$as_echo "$BOOT_JDK_VERSION" >&6; }
22556          fi # end check jdk version
22557        fi # end check javac
22558      fi # end check java
22559    fi # end check boot jdk found
22560  fi
22561
22562
22563  if test "x$BOOT_JDK_FOUND" = xno; then
22564    # Now execute the test
22565
22566  if test "x$PROGRAMW6432" != x; then
22567    VIRTUAL_DIR="$PROGRAMW6432/Java"
22568
22569  windows_path="$VIRTUAL_DIR"
22570  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22571    unix_path=`$CYGPATH -u "$windows_path"`
22572    VIRTUAL_DIR="$unix_path"
22573  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22574    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22575    VIRTUAL_DIR="$unix_path"
22576  fi
22577
22578
22579  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22580  BOOT_JDK_SUFFIX=""
22581  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22582  if test "x$ALL_JDKS_FOUND" != x; then
22583    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22584
22585  if test "x$BOOT_JDK_FOUND" = xno; then
22586    # Now execute the test
22587
22588        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22589        if test -d "$BOOT_JDK"; then
22590          BOOT_JDK_FOUND=maybe
22591          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22592$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22593        fi
22594
22595
22596    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22597    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22598      # Do we have a bin/java?
22599      if test ! -x "$BOOT_JDK/bin/java"; then
22600        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22601$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22602        BOOT_JDK_FOUND=no
22603      else
22604        # Do we have a bin/javac?
22605        if test ! -x "$BOOT_JDK/bin/javac"; then
22606          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22608          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22609$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22610          BOOT_JDK_FOUND=no
22611        else
22612          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22613          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22614
22615          # Extra M4 quote needed to protect [] in grep expression.
22616          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22617          if test "x$FOUND_CORRECT_VERSION" = x; then
22618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22620            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22621$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22622            BOOT_JDK_FOUND=no
22623          else
22624            # We're done! :-)
22625            BOOT_JDK_FOUND=yes
22626
22627  # Only process if variable expands to non-empty
22628
22629  if test "x$BOOT_JDK" != x; then
22630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22631
22632  # Input might be given as Windows format, start by converting to
22633  # unix format.
22634  path="$BOOT_JDK"
22635  new_path=`$CYGPATH -u "$path"`
22636
22637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22640  # "foo.exe" is OK but "foo" is an error.
22641  #
22642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22643  # It is also a way to make sure we got the proper file name for the real test later on.
22644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22645  if test "x$test_shortpath" = x; then
22646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22647$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22648    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22649  fi
22650
22651  # Call helper function which possibly converts this using DOS-style short mode.
22652  # If so, the updated path is stored in $new_path.
22653
22654  input_path="$new_path"
22655  # Check if we need to convert this using DOS-style short mode. If the path
22656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22657  # take no chances and rewrite it.
22658  # Note: m4 eats our [], so we need to use [ and ] instead.
22659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22660  if test "x$has_forbidden_chars" != x; then
22661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22665      # Going to short mode and back again did indeed matter. Since short mode is
22666      # case insensitive, let's make it lowercase to improve readability.
22667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22668      # Now convert it back to Unix-stile (cygpath)
22669      input_path=`$CYGPATH -u "$shortmode_path"`
22670      new_path="$input_path"
22671    fi
22672  fi
22673
22674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22675  if test "x$test_cygdrive_prefix" = x; then
22676    # As a simple fix, exclude /usr/bin since it's not a real path.
22677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22679      # a path prefixed by /cygdrive for fixpath to work.
22680      new_path="$CYGWIN_ROOT_PATH$input_path"
22681    fi
22682  fi
22683
22684
22685  if test "x$path" != "x$new_path"; then
22686    BOOT_JDK="$new_path"
22687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22688$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22689  fi
22690
22691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22692
22693  path="$BOOT_JDK"
22694  has_colon=`$ECHO $path | $GREP ^.:`
22695  new_path="$path"
22696  if test "x$has_colon" = x; then
22697    # Not in mixed or Windows style, start by that.
22698    new_path=`cmd //c echo $path`
22699  fi
22700
22701
22702  input_path="$new_path"
22703  # Check if we need to convert this using DOS-style short mode. If the path
22704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22705  # take no chances and rewrite it.
22706  # Note: m4 eats our [], so we need to use [ and ] instead.
22707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22708  if test "x$has_forbidden_chars" != x; then
22709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22711  fi
22712
22713
22714  windows_path="$new_path"
22715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22716    unix_path=`$CYGPATH -u "$windows_path"`
22717    new_path="$unix_path"
22718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22720    new_path="$unix_path"
22721  fi
22722
22723  if test "x$path" != "x$new_path"; then
22724    BOOT_JDK="$new_path"
22725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22726$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22727  fi
22728
22729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22731
22732    else
22733      # We're on a unix platform. Hooray! :)
22734      path="$BOOT_JDK"
22735      has_space=`$ECHO "$path" | $GREP " "`
22736      if test "x$has_space" != x; then
22737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22738$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22740      fi
22741
22742      # Use eval to expand a potential ~
22743      eval path="$path"
22744      if test ! -f "$path" && test ! -d "$path"; then
22745        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22746      fi
22747
22748      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22749    fi
22750  fi
22751
22752            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22753$as_echo_n "checking for Boot JDK... " >&6; }
22754            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22755$as_echo "$BOOT_JDK" >&6; }
22756            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22757$as_echo_n "checking Boot JDK version... " >&6; }
22758            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22760$as_echo "$BOOT_JDK_VERSION" >&6; }
22761          fi # end check jdk version
22762        fi # end check javac
22763      fi # end check java
22764    fi # end check boot jdk found
22765  fi
22766
22767    done
22768  fi
22769
22770  fi
22771
22772
22773    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22774    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22775      # Do we have a bin/java?
22776      if test ! -x "$BOOT_JDK/bin/java"; then
22777        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22779        BOOT_JDK_FOUND=no
22780      else
22781        # Do we have a bin/javac?
22782        if test ! -x "$BOOT_JDK/bin/javac"; then
22783          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22785          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22786$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22787          BOOT_JDK_FOUND=no
22788        else
22789          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22790          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22791
22792          # Extra M4 quote needed to protect [] in grep expression.
22793          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22794          if test "x$FOUND_CORRECT_VERSION" = x; then
22795            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22796$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22797            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22798$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22799            BOOT_JDK_FOUND=no
22800          else
22801            # We're done! :-)
22802            BOOT_JDK_FOUND=yes
22803
22804  # Only process if variable expands to non-empty
22805
22806  if test "x$BOOT_JDK" != x; then
22807    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22808
22809  # Input might be given as Windows format, start by converting to
22810  # unix format.
22811  path="$BOOT_JDK"
22812  new_path=`$CYGPATH -u "$path"`
22813
22814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22817  # "foo.exe" is OK but "foo" is an error.
22818  #
22819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22820  # It is also a way to make sure we got the proper file name for the real test later on.
22821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22822  if test "x$test_shortpath" = x; then
22823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22826  fi
22827
22828  # Call helper function which possibly converts this using DOS-style short mode.
22829  # If so, the updated path is stored in $new_path.
22830
22831  input_path="$new_path"
22832  # Check if we need to convert this using DOS-style short mode. If the path
22833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22834  # take no chances and rewrite it.
22835  # Note: m4 eats our [], so we need to use [ and ] instead.
22836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22837  if test "x$has_forbidden_chars" != x; then
22838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22842      # Going to short mode and back again did indeed matter. Since short mode is
22843      # case insensitive, let's make it lowercase to improve readability.
22844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22845      # Now convert it back to Unix-stile (cygpath)
22846      input_path=`$CYGPATH -u "$shortmode_path"`
22847      new_path="$input_path"
22848    fi
22849  fi
22850
22851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22852  if test "x$test_cygdrive_prefix" = x; then
22853    # As a simple fix, exclude /usr/bin since it's not a real path.
22854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22856      # a path prefixed by /cygdrive for fixpath to work.
22857      new_path="$CYGWIN_ROOT_PATH$input_path"
22858    fi
22859  fi
22860
22861
22862  if test "x$path" != "x$new_path"; then
22863    BOOT_JDK="$new_path"
22864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22866  fi
22867
22868    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22869
22870  path="$BOOT_JDK"
22871  has_colon=`$ECHO $path | $GREP ^.:`
22872  new_path="$path"
22873  if test "x$has_colon" = x; then
22874    # Not in mixed or Windows style, start by that.
22875    new_path=`cmd //c echo $path`
22876  fi
22877
22878
22879  input_path="$new_path"
22880  # Check if we need to convert this using DOS-style short mode. If the path
22881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22882  # take no chances and rewrite it.
22883  # Note: m4 eats our [], so we need to use [ and ] instead.
22884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22885  if test "x$has_forbidden_chars" != x; then
22886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22888  fi
22889
22890
22891  windows_path="$new_path"
22892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22893    unix_path=`$CYGPATH -u "$windows_path"`
22894    new_path="$unix_path"
22895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22897    new_path="$unix_path"
22898  fi
22899
22900  if test "x$path" != "x$new_path"; then
22901    BOOT_JDK="$new_path"
22902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22904  fi
22905
22906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22908
22909    else
22910      # We're on a unix platform. Hooray! :)
22911      path="$BOOT_JDK"
22912      has_space=`$ECHO "$path" | $GREP " "`
22913      if test "x$has_space" != x; then
22914        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22916        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22917      fi
22918
22919      # Use eval to expand a potential ~
22920      eval path="$path"
22921      if test ! -f "$path" && test ! -d "$path"; then
22922        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22923      fi
22924
22925      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22926    fi
22927  fi
22928
22929            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22930$as_echo_n "checking for Boot JDK... " >&6; }
22931            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22932$as_echo "$BOOT_JDK" >&6; }
22933            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22934$as_echo_n "checking Boot JDK version... " >&6; }
22935            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22936            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22937$as_echo "$BOOT_JDK_VERSION" >&6; }
22938          fi # end check jdk version
22939        fi # end check javac
22940      fi # end check java
22941    fi # end check boot jdk found
22942  fi
22943
22944
22945  if test "x$BOOT_JDK_FOUND" = xno; then
22946    # Now execute the test
22947
22948  if test "x$PROGRAMFILES" != x; then
22949    VIRTUAL_DIR="$PROGRAMFILES/Java"
22950
22951  windows_path="$VIRTUAL_DIR"
22952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22953    unix_path=`$CYGPATH -u "$windows_path"`
22954    VIRTUAL_DIR="$unix_path"
22955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22957    VIRTUAL_DIR="$unix_path"
22958  fi
22959
22960
22961  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22962  BOOT_JDK_SUFFIX=""
22963  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22964  if test "x$ALL_JDKS_FOUND" != x; then
22965    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22966
22967  if test "x$BOOT_JDK_FOUND" = xno; then
22968    # Now execute the test
22969
22970        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22971        if test -d "$BOOT_JDK"; then
22972          BOOT_JDK_FOUND=maybe
22973          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22974$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22975        fi
22976
22977
22978    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22979    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22980      # Do we have a bin/java?
22981      if test ! -x "$BOOT_JDK/bin/java"; then
22982        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22983$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22984        BOOT_JDK_FOUND=no
22985      else
22986        # Do we have a bin/javac?
22987        if test ! -x "$BOOT_JDK/bin/javac"; then
22988          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22989$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22990          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22991$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22992          BOOT_JDK_FOUND=no
22993        else
22994          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22995          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22996
22997          # Extra M4 quote needed to protect [] in grep expression.
22998          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22999          if test "x$FOUND_CORRECT_VERSION" = x; then
23000            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23002            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23003$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23004            BOOT_JDK_FOUND=no
23005          else
23006            # We're done! :-)
23007            BOOT_JDK_FOUND=yes
23008
23009  # Only process if variable expands to non-empty
23010
23011  if test "x$BOOT_JDK" != x; then
23012    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23013
23014  # Input might be given as Windows format, start by converting to
23015  # unix format.
23016  path="$BOOT_JDK"
23017  new_path=`$CYGPATH -u "$path"`
23018
23019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23022  # "foo.exe" is OK but "foo" is an error.
23023  #
23024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23025  # It is also a way to make sure we got the proper file name for the real test later on.
23026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23027  if test "x$test_shortpath" = x; then
23028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23031  fi
23032
23033  # Call helper function which possibly converts this using DOS-style short mode.
23034  # If so, the updated path is stored in $new_path.
23035
23036  input_path="$new_path"
23037  # Check if we need to convert this using DOS-style short mode. If the path
23038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23039  # take no chances and rewrite it.
23040  # Note: m4 eats our [], so we need to use [ and ] instead.
23041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23042  if test "x$has_forbidden_chars" != x; then
23043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23047      # Going to short mode and back again did indeed matter. Since short mode is
23048      # case insensitive, let's make it lowercase to improve readability.
23049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23050      # Now convert it back to Unix-stile (cygpath)
23051      input_path=`$CYGPATH -u "$shortmode_path"`
23052      new_path="$input_path"
23053    fi
23054  fi
23055
23056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23057  if test "x$test_cygdrive_prefix" = x; then
23058    # As a simple fix, exclude /usr/bin since it's not a real path.
23059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23061      # a path prefixed by /cygdrive for fixpath to work.
23062      new_path="$CYGWIN_ROOT_PATH$input_path"
23063    fi
23064  fi
23065
23066
23067  if test "x$path" != "x$new_path"; then
23068    BOOT_JDK="$new_path"
23069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23071  fi
23072
23073    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23074
23075  path="$BOOT_JDK"
23076  has_colon=`$ECHO $path | $GREP ^.:`
23077  new_path="$path"
23078  if test "x$has_colon" = x; then
23079    # Not in mixed or Windows style, start by that.
23080    new_path=`cmd //c echo $path`
23081  fi
23082
23083
23084  input_path="$new_path"
23085  # Check if we need to convert this using DOS-style short mode. If the path
23086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23087  # take no chances and rewrite it.
23088  # Note: m4 eats our [], so we need to use [ and ] instead.
23089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23090  if test "x$has_forbidden_chars" != x; then
23091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23093  fi
23094
23095
23096  windows_path="$new_path"
23097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23098    unix_path=`$CYGPATH -u "$windows_path"`
23099    new_path="$unix_path"
23100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23102    new_path="$unix_path"
23103  fi
23104
23105  if test "x$path" != "x$new_path"; then
23106    BOOT_JDK="$new_path"
23107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23109  fi
23110
23111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23113
23114    else
23115      # We're on a unix platform. Hooray! :)
23116      path="$BOOT_JDK"
23117      has_space=`$ECHO "$path" | $GREP " "`
23118      if test "x$has_space" != x; then
23119        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23121        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23122      fi
23123
23124      # Use eval to expand a potential ~
23125      eval path="$path"
23126      if test ! -f "$path" && test ! -d "$path"; then
23127        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23128      fi
23129
23130      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23131    fi
23132  fi
23133
23134            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23135$as_echo_n "checking for Boot JDK... " >&6; }
23136            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23137$as_echo "$BOOT_JDK" >&6; }
23138            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23139$as_echo_n "checking Boot JDK version... " >&6; }
23140            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23141            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23142$as_echo "$BOOT_JDK_VERSION" >&6; }
23143          fi # end check jdk version
23144        fi # end check javac
23145      fi # end check java
23146    fi # end check boot jdk found
23147  fi
23148
23149    done
23150  fi
23151
23152  fi
23153
23154
23155    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23156    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23157      # Do we have a bin/java?
23158      if test ! -x "$BOOT_JDK/bin/java"; then
23159        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23160$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23161        BOOT_JDK_FOUND=no
23162      else
23163        # Do we have a bin/javac?
23164        if test ! -x "$BOOT_JDK/bin/javac"; then
23165          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23166$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23167          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23168$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23169          BOOT_JDK_FOUND=no
23170        else
23171          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23172          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23173
23174          # Extra M4 quote needed to protect [] in grep expression.
23175          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23176          if test "x$FOUND_CORRECT_VERSION" = x; then
23177            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23178$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23179            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23180$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23181            BOOT_JDK_FOUND=no
23182          else
23183            # We're done! :-)
23184            BOOT_JDK_FOUND=yes
23185
23186  # Only process if variable expands to non-empty
23187
23188  if test "x$BOOT_JDK" != x; then
23189    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23190
23191  # Input might be given as Windows format, start by converting to
23192  # unix format.
23193  path="$BOOT_JDK"
23194  new_path=`$CYGPATH -u "$path"`
23195
23196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23199  # "foo.exe" is OK but "foo" is an error.
23200  #
23201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23202  # It is also a way to make sure we got the proper file name for the real test later on.
23203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23204  if test "x$test_shortpath" = x; then
23205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23206$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23207    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23208  fi
23209
23210  # Call helper function which possibly converts this using DOS-style short mode.
23211  # If so, the updated path is stored in $new_path.
23212
23213  input_path="$new_path"
23214  # Check if we need to convert this using DOS-style short mode. If the path
23215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23216  # take no chances and rewrite it.
23217  # Note: m4 eats our [], so we need to use [ and ] instead.
23218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23219  if test "x$has_forbidden_chars" != x; then
23220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23224      # Going to short mode and back again did indeed matter. Since short mode is
23225      # case insensitive, let's make it lowercase to improve readability.
23226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23227      # Now convert it back to Unix-stile (cygpath)
23228      input_path=`$CYGPATH -u "$shortmode_path"`
23229      new_path="$input_path"
23230    fi
23231  fi
23232
23233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23234  if test "x$test_cygdrive_prefix" = x; then
23235    # As a simple fix, exclude /usr/bin since it's not a real path.
23236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23238      # a path prefixed by /cygdrive for fixpath to work.
23239      new_path="$CYGWIN_ROOT_PATH$input_path"
23240    fi
23241  fi
23242
23243
23244  if test "x$path" != "x$new_path"; then
23245    BOOT_JDK="$new_path"
23246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23248  fi
23249
23250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23251
23252  path="$BOOT_JDK"
23253  has_colon=`$ECHO $path | $GREP ^.:`
23254  new_path="$path"
23255  if test "x$has_colon" = x; then
23256    # Not in mixed or Windows style, start by that.
23257    new_path=`cmd //c echo $path`
23258  fi
23259
23260
23261  input_path="$new_path"
23262  # Check if we need to convert this using DOS-style short mode. If the path
23263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23264  # take no chances and rewrite it.
23265  # Note: m4 eats our [], so we need to use [ and ] instead.
23266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23267  if test "x$has_forbidden_chars" != x; then
23268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23270  fi
23271
23272
23273  windows_path="$new_path"
23274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23275    unix_path=`$CYGPATH -u "$windows_path"`
23276    new_path="$unix_path"
23277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23279    new_path="$unix_path"
23280  fi
23281
23282  if test "x$path" != "x$new_path"; then
23283    BOOT_JDK="$new_path"
23284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23286  fi
23287
23288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23290
23291    else
23292      # We're on a unix platform. Hooray! :)
23293      path="$BOOT_JDK"
23294      has_space=`$ECHO "$path" | $GREP " "`
23295      if test "x$has_space" != x; then
23296        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23298        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23299      fi
23300
23301      # Use eval to expand a potential ~
23302      eval path="$path"
23303      if test ! -f "$path" && test ! -d "$path"; then
23304        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23305      fi
23306
23307      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23308    fi
23309  fi
23310
23311            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23312$as_echo_n "checking for Boot JDK... " >&6; }
23313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23314$as_echo "$BOOT_JDK" >&6; }
23315            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23316$as_echo_n "checking Boot JDK version... " >&6; }
23317            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23319$as_echo "$BOOT_JDK_VERSION" >&6; }
23320          fi # end check jdk version
23321        fi # end check javac
23322      fi # end check java
23323    fi # end check boot jdk found
23324  fi
23325
23326
23327  if test "x$BOOT_JDK_FOUND" = xno; then
23328    # Now execute the test
23329
23330  if test "x$ProgramFiles" != x; then
23331    VIRTUAL_DIR="$ProgramFiles/Java"
23332
23333  windows_path="$VIRTUAL_DIR"
23334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23335    unix_path=`$CYGPATH -u "$windows_path"`
23336    VIRTUAL_DIR="$unix_path"
23337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23339    VIRTUAL_DIR="$unix_path"
23340  fi
23341
23342
23343  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23344  BOOT_JDK_SUFFIX=""
23345  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23346  if test "x$ALL_JDKS_FOUND" != x; then
23347    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23348
23349  if test "x$BOOT_JDK_FOUND" = xno; then
23350    # Now execute the test
23351
23352        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23353        if test -d "$BOOT_JDK"; then
23354          BOOT_JDK_FOUND=maybe
23355          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23356$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23357        fi
23358
23359
23360    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23361    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23362      # Do we have a bin/java?
23363      if test ! -x "$BOOT_JDK/bin/java"; then
23364        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23366        BOOT_JDK_FOUND=no
23367      else
23368        # Do we have a bin/javac?
23369        if test ! -x "$BOOT_JDK/bin/javac"; then
23370          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23372          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23373$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23374          BOOT_JDK_FOUND=no
23375        else
23376          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23377          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23378
23379          # Extra M4 quote needed to protect [] in grep expression.
23380          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23381          if test "x$FOUND_CORRECT_VERSION" = x; then
23382            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23383$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23384            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23385$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23386            BOOT_JDK_FOUND=no
23387          else
23388            # We're done! :-)
23389            BOOT_JDK_FOUND=yes
23390
23391  # Only process if variable expands to non-empty
23392
23393  if test "x$BOOT_JDK" != x; then
23394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23395
23396  # Input might be given as Windows format, start by converting to
23397  # unix format.
23398  path="$BOOT_JDK"
23399  new_path=`$CYGPATH -u "$path"`
23400
23401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23404  # "foo.exe" is OK but "foo" is an error.
23405  #
23406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23407  # It is also a way to make sure we got the proper file name for the real test later on.
23408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23409  if test "x$test_shortpath" = x; then
23410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23411$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23412    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23413  fi
23414
23415  # Call helper function which possibly converts this using DOS-style short mode.
23416  # If so, the updated path is stored in $new_path.
23417
23418  input_path="$new_path"
23419  # Check if we need to convert this using DOS-style short mode. If the path
23420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23421  # take no chances and rewrite it.
23422  # Note: m4 eats our [], so we need to use [ and ] instead.
23423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23424  if test "x$has_forbidden_chars" != x; then
23425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23429      # Going to short mode and back again did indeed matter. Since short mode is
23430      # case insensitive, let's make it lowercase to improve readability.
23431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23432      # Now convert it back to Unix-stile (cygpath)
23433      input_path=`$CYGPATH -u "$shortmode_path"`
23434      new_path="$input_path"
23435    fi
23436  fi
23437
23438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23439  if test "x$test_cygdrive_prefix" = x; then
23440    # As a simple fix, exclude /usr/bin since it's not a real path.
23441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23443      # a path prefixed by /cygdrive for fixpath to work.
23444      new_path="$CYGWIN_ROOT_PATH$input_path"
23445    fi
23446  fi
23447
23448
23449  if test "x$path" != "x$new_path"; then
23450    BOOT_JDK="$new_path"
23451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23452$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23453  fi
23454
23455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23456
23457  path="$BOOT_JDK"
23458  has_colon=`$ECHO $path | $GREP ^.:`
23459  new_path="$path"
23460  if test "x$has_colon" = x; then
23461    # Not in mixed or Windows style, start by that.
23462    new_path=`cmd //c echo $path`
23463  fi
23464
23465
23466  input_path="$new_path"
23467  # Check if we need to convert this using DOS-style short mode. If the path
23468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23469  # take no chances and rewrite it.
23470  # Note: m4 eats our [], so we need to use [ and ] instead.
23471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23472  if test "x$has_forbidden_chars" != x; then
23473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23475  fi
23476
23477
23478  windows_path="$new_path"
23479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23480    unix_path=`$CYGPATH -u "$windows_path"`
23481    new_path="$unix_path"
23482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23484    new_path="$unix_path"
23485  fi
23486
23487  if test "x$path" != "x$new_path"; then
23488    BOOT_JDK="$new_path"
23489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23490$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23491  fi
23492
23493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23495
23496    else
23497      # We're on a unix platform. Hooray! :)
23498      path="$BOOT_JDK"
23499      has_space=`$ECHO "$path" | $GREP " "`
23500      if test "x$has_space" != x; then
23501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23502$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23504      fi
23505
23506      # Use eval to expand a potential ~
23507      eval path="$path"
23508      if test ! -f "$path" && test ! -d "$path"; then
23509        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23510      fi
23511
23512      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23513    fi
23514  fi
23515
23516            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23517$as_echo_n "checking for Boot JDK... " >&6; }
23518            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23519$as_echo "$BOOT_JDK" >&6; }
23520            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23521$as_echo_n "checking Boot JDK version... " >&6; }
23522            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23524$as_echo "$BOOT_JDK_VERSION" >&6; }
23525          fi # end check jdk version
23526        fi # end check javac
23527      fi # end check java
23528    fi # end check boot jdk found
23529  fi
23530
23531    done
23532  fi
23533
23534  fi
23535
23536
23537    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23538    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23539      # Do we have a bin/java?
23540      if test ! -x "$BOOT_JDK/bin/java"; then
23541        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23542$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23543        BOOT_JDK_FOUND=no
23544      else
23545        # Do we have a bin/javac?
23546        if test ! -x "$BOOT_JDK/bin/javac"; then
23547          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23549          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23550$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23551          BOOT_JDK_FOUND=no
23552        else
23553          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23554          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23555
23556          # Extra M4 quote needed to protect [] in grep expression.
23557          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23558          if test "x$FOUND_CORRECT_VERSION" = x; then
23559            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23560$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23561            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23562$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23563            BOOT_JDK_FOUND=no
23564          else
23565            # We're done! :-)
23566            BOOT_JDK_FOUND=yes
23567
23568  # Only process if variable expands to non-empty
23569
23570  if test "x$BOOT_JDK" != x; then
23571    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23572
23573  # Input might be given as Windows format, start by converting to
23574  # unix format.
23575  path="$BOOT_JDK"
23576  new_path=`$CYGPATH -u "$path"`
23577
23578  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23579  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23580  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23581  # "foo.exe" is OK but "foo" is an error.
23582  #
23583  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23584  # It is also a way to make sure we got the proper file name for the real test later on.
23585  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23586  if test "x$test_shortpath" = x; then
23587    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23588$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23589    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23590  fi
23591
23592  # Call helper function which possibly converts this using DOS-style short mode.
23593  # If so, the updated path is stored in $new_path.
23594
23595  input_path="$new_path"
23596  # Check if we need to convert this using DOS-style short mode. If the path
23597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23598  # take no chances and rewrite it.
23599  # Note: m4 eats our [], so we need to use [ and ] instead.
23600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23601  if test "x$has_forbidden_chars" != x; then
23602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23606      # Going to short mode and back again did indeed matter. Since short mode is
23607      # case insensitive, let's make it lowercase to improve readability.
23608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23609      # Now convert it back to Unix-stile (cygpath)
23610      input_path=`$CYGPATH -u "$shortmode_path"`
23611      new_path="$input_path"
23612    fi
23613  fi
23614
23615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23616  if test "x$test_cygdrive_prefix" = x; then
23617    # As a simple fix, exclude /usr/bin since it's not a real path.
23618    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23620      # a path prefixed by /cygdrive for fixpath to work.
23621      new_path="$CYGWIN_ROOT_PATH$input_path"
23622    fi
23623  fi
23624
23625
23626  if test "x$path" != "x$new_path"; then
23627    BOOT_JDK="$new_path"
23628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23630  fi
23631
23632    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23633
23634  path="$BOOT_JDK"
23635  has_colon=`$ECHO $path | $GREP ^.:`
23636  new_path="$path"
23637  if test "x$has_colon" = x; then
23638    # Not in mixed or Windows style, start by that.
23639    new_path=`cmd //c echo $path`
23640  fi
23641
23642
23643  input_path="$new_path"
23644  # Check if we need to convert this using DOS-style short mode. If the path
23645  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23646  # take no chances and rewrite it.
23647  # Note: m4 eats our [], so we need to use [ and ] instead.
23648  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23649  if test "x$has_forbidden_chars" != x; then
23650    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23651    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23652  fi
23653
23654
23655  windows_path="$new_path"
23656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23657    unix_path=`$CYGPATH -u "$windows_path"`
23658    new_path="$unix_path"
23659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23661    new_path="$unix_path"
23662  fi
23663
23664  if test "x$path" != "x$new_path"; then
23665    BOOT_JDK="$new_path"
23666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23668  fi
23669
23670  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23671  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23672
23673    else
23674      # We're on a unix platform. Hooray! :)
23675      path="$BOOT_JDK"
23676      has_space=`$ECHO "$path" | $GREP " "`
23677      if test "x$has_space" != x; then
23678        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23679$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23680        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23681      fi
23682
23683      # Use eval to expand a potential ~
23684      eval path="$path"
23685      if test ! -f "$path" && test ! -d "$path"; then
23686        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23687      fi
23688
23689      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23690    fi
23691  fi
23692
23693            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23694$as_echo_n "checking for Boot JDK... " >&6; }
23695            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23696$as_echo "$BOOT_JDK" >&6; }
23697            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23698$as_echo_n "checking Boot JDK version... " >&6; }
23699            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23700            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23701$as_echo "$BOOT_JDK_VERSION" >&6; }
23702          fi # end check jdk version
23703        fi # end check javac
23704      fi # end check java
23705    fi # end check boot jdk found
23706  fi
23707
23708
23709  if test "x$BOOT_JDK_FOUND" = xno; then
23710    # Now execute the test
23711
23712  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23713  BOOT_JDK_SUFFIX=""
23714  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23715  if test "x$ALL_JDKS_FOUND" != x; then
23716    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23717
23718  if test "x$BOOT_JDK_FOUND" = xno; then
23719    # Now execute the test
23720
23721        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23722        if test -d "$BOOT_JDK"; then
23723          BOOT_JDK_FOUND=maybe
23724          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23725$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23726        fi
23727
23728
23729    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23730    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23731      # Do we have a bin/java?
23732      if test ! -x "$BOOT_JDK/bin/java"; then
23733        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23734$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23735        BOOT_JDK_FOUND=no
23736      else
23737        # Do we have a bin/javac?
23738        if test ! -x "$BOOT_JDK/bin/javac"; then
23739          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23741          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23742$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23743          BOOT_JDK_FOUND=no
23744        else
23745          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23746          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23747
23748          # Extra M4 quote needed to protect [] in grep expression.
23749          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23750          if test "x$FOUND_CORRECT_VERSION" = x; then
23751            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23752$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23753            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23754$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23755            BOOT_JDK_FOUND=no
23756          else
23757            # We're done! :-)
23758            BOOT_JDK_FOUND=yes
23759
23760  # Only process if variable expands to non-empty
23761
23762  if test "x$BOOT_JDK" != x; then
23763    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23764
23765  # Input might be given as Windows format, start by converting to
23766  # unix format.
23767  path="$BOOT_JDK"
23768  new_path=`$CYGPATH -u "$path"`
23769
23770  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23771  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23772  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23773  # "foo.exe" is OK but "foo" is an error.
23774  #
23775  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23776  # It is also a way to make sure we got the proper file name for the real test later on.
23777  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23778  if test "x$test_shortpath" = x; then
23779    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23780$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23781    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23782  fi
23783
23784  # Call helper function which possibly converts this using DOS-style short mode.
23785  # If so, the updated path is stored in $new_path.
23786
23787  input_path="$new_path"
23788  # Check if we need to convert this using DOS-style short mode. If the path
23789  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23790  # take no chances and rewrite it.
23791  # Note: m4 eats our [], so we need to use [ and ] instead.
23792  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23793  if test "x$has_forbidden_chars" != x; then
23794    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23795    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23796    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23797    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23798      # Going to short mode and back again did indeed matter. Since short mode is
23799      # case insensitive, let's make it lowercase to improve readability.
23800      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23801      # Now convert it back to Unix-stile (cygpath)
23802      input_path=`$CYGPATH -u "$shortmode_path"`
23803      new_path="$input_path"
23804    fi
23805  fi
23806
23807  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23808  if test "x$test_cygdrive_prefix" = x; then
23809    # As a simple fix, exclude /usr/bin since it's not a real path.
23810    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23811      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23812      # a path prefixed by /cygdrive for fixpath to work.
23813      new_path="$CYGWIN_ROOT_PATH$input_path"
23814    fi
23815  fi
23816
23817
23818  if test "x$path" != "x$new_path"; then
23819    BOOT_JDK="$new_path"
23820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23821$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23822  fi
23823
23824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23825
23826  path="$BOOT_JDK"
23827  has_colon=`$ECHO $path | $GREP ^.:`
23828  new_path="$path"
23829  if test "x$has_colon" = x; then
23830    # Not in mixed or Windows style, start by that.
23831    new_path=`cmd //c echo $path`
23832  fi
23833
23834
23835  input_path="$new_path"
23836  # Check if we need to convert this using DOS-style short mode. If the path
23837  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23838  # take no chances and rewrite it.
23839  # Note: m4 eats our [], so we need to use [ and ] instead.
23840  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23841  if test "x$has_forbidden_chars" != x; then
23842    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23843    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23844  fi
23845
23846
23847  windows_path="$new_path"
23848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23849    unix_path=`$CYGPATH -u "$windows_path"`
23850    new_path="$unix_path"
23851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23853    new_path="$unix_path"
23854  fi
23855
23856  if test "x$path" != "x$new_path"; then
23857    BOOT_JDK="$new_path"
23858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23859$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23860  fi
23861
23862  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23863  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23864
23865    else
23866      # We're on a unix platform. Hooray! :)
23867      path="$BOOT_JDK"
23868      has_space=`$ECHO "$path" | $GREP " "`
23869      if test "x$has_space" != x; then
23870        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23871$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23872        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23873      fi
23874
23875      # Use eval to expand a potential ~
23876      eval path="$path"
23877      if test ! -f "$path" && test ! -d "$path"; then
23878        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23879      fi
23880
23881      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23882    fi
23883  fi
23884
23885            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23886$as_echo_n "checking for Boot JDK... " >&6; }
23887            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23888$as_echo "$BOOT_JDK" >&6; }
23889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23890$as_echo_n "checking Boot JDK version... " >&6; }
23891            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23892            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23893$as_echo "$BOOT_JDK_VERSION" >&6; }
23894          fi # end check jdk version
23895        fi # end check javac
23896      fi # end check java
23897    fi # end check boot jdk found
23898  fi
23899
23900    done
23901  fi
23902
23903
23904    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23905    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23906      # Do we have a bin/java?
23907      if test ! -x "$BOOT_JDK/bin/java"; then
23908        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23909$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23910        BOOT_JDK_FOUND=no
23911      else
23912        # Do we have a bin/javac?
23913        if test ! -x "$BOOT_JDK/bin/javac"; then
23914          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23915$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23916          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23917$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23918          BOOT_JDK_FOUND=no
23919        else
23920          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23921          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23922
23923          # Extra M4 quote needed to protect [] in grep expression.
23924          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23925          if test "x$FOUND_CORRECT_VERSION" = x; then
23926            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23927$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23928            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23929$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23930            BOOT_JDK_FOUND=no
23931          else
23932            # We're done! :-)
23933            BOOT_JDK_FOUND=yes
23934
23935  # Only process if variable expands to non-empty
23936
23937  if test "x$BOOT_JDK" != x; then
23938    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23939
23940  # Input might be given as Windows format, start by converting to
23941  # unix format.
23942  path="$BOOT_JDK"
23943  new_path=`$CYGPATH -u "$path"`
23944
23945  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23946  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23947  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23948  # "foo.exe" is OK but "foo" is an error.
23949  #
23950  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23951  # It is also a way to make sure we got the proper file name for the real test later on.
23952  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23953  if test "x$test_shortpath" = x; then
23954    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23956    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23957  fi
23958
23959  # Call helper function which possibly converts this using DOS-style short mode.
23960  # If so, the updated path is stored in $new_path.
23961
23962  input_path="$new_path"
23963  # Check if we need to convert this using DOS-style short mode. If the path
23964  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23965  # take no chances and rewrite it.
23966  # Note: m4 eats our [], so we need to use [ and ] instead.
23967  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23968  if test "x$has_forbidden_chars" != x; then
23969    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23970    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23971    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23972    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23973      # Going to short mode and back again did indeed matter. Since short mode is
23974      # case insensitive, let's make it lowercase to improve readability.
23975      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23976      # Now convert it back to Unix-stile (cygpath)
23977      input_path=`$CYGPATH -u "$shortmode_path"`
23978      new_path="$input_path"
23979    fi
23980  fi
23981
23982  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23983  if test "x$test_cygdrive_prefix" = x; then
23984    # As a simple fix, exclude /usr/bin since it's not a real path.
23985    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23986      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23987      # a path prefixed by /cygdrive for fixpath to work.
23988      new_path="$CYGWIN_ROOT_PATH$input_path"
23989    fi
23990  fi
23991
23992
23993  if test "x$path" != "x$new_path"; then
23994    BOOT_JDK="$new_path"
23995    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23996$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23997  fi
23998
23999    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24000
24001  path="$BOOT_JDK"
24002  has_colon=`$ECHO $path | $GREP ^.:`
24003  new_path="$path"
24004  if test "x$has_colon" = x; then
24005    # Not in mixed or Windows style, start by that.
24006    new_path=`cmd //c echo $path`
24007  fi
24008
24009
24010  input_path="$new_path"
24011  # Check if we need to convert this using DOS-style short mode. If the path
24012  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24013  # take no chances and rewrite it.
24014  # Note: m4 eats our [], so we need to use [ and ] instead.
24015  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24016  if test "x$has_forbidden_chars" != x; then
24017    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24018    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24019  fi
24020
24021
24022  windows_path="$new_path"
24023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24024    unix_path=`$CYGPATH -u "$windows_path"`
24025    new_path="$unix_path"
24026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24027    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24028    new_path="$unix_path"
24029  fi
24030
24031  if test "x$path" != "x$new_path"; then
24032    BOOT_JDK="$new_path"
24033    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24034$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24035  fi
24036
24037  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24038  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24039
24040    else
24041      # We're on a unix platform. Hooray! :)
24042      path="$BOOT_JDK"
24043      has_space=`$ECHO "$path" | $GREP " "`
24044      if test "x$has_space" != x; then
24045        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24046$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24047        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24048      fi
24049
24050      # Use eval to expand a potential ~
24051      eval path="$path"
24052      if test ! -f "$path" && test ! -d "$path"; then
24053        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24054      fi
24055
24056      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24057    fi
24058  fi
24059
24060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24061$as_echo_n "checking for Boot JDK... " >&6; }
24062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24063$as_echo "$BOOT_JDK" >&6; }
24064            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24065$as_echo_n "checking Boot JDK version... " >&6; }
24066            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24067            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24068$as_echo "$BOOT_JDK_VERSION" >&6; }
24069          fi # end check jdk version
24070        fi # end check javac
24071      fi # end check java
24072    fi # end check boot jdk found
24073  fi
24074
24075  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24076
24077  if test "x$BOOT_JDK_FOUND" = xno; then
24078    # Now execute the test
24079
24080  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24081  BOOT_JDK_SUFFIX="/Contents/Home"
24082  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24083  if test "x$ALL_JDKS_FOUND" != x; then
24084    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24085
24086  if test "x$BOOT_JDK_FOUND" = xno; then
24087    # Now execute the test
24088
24089        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24090        if test -d "$BOOT_JDK"; then
24091          BOOT_JDK_FOUND=maybe
24092          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24093$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24094        fi
24095
24096
24097    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24098    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24099      # Do we have a bin/java?
24100      if test ! -x "$BOOT_JDK/bin/java"; then
24101        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24102$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24103        BOOT_JDK_FOUND=no
24104      else
24105        # Do we have a bin/javac?
24106        if test ! -x "$BOOT_JDK/bin/javac"; then
24107          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24108$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24109          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24110$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24111          BOOT_JDK_FOUND=no
24112        else
24113          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24114          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24115
24116          # Extra M4 quote needed to protect [] in grep expression.
24117          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24118          if test "x$FOUND_CORRECT_VERSION" = x; then
24119            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24121            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24122$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24123            BOOT_JDK_FOUND=no
24124          else
24125            # We're done! :-)
24126            BOOT_JDK_FOUND=yes
24127
24128  # Only process if variable expands to non-empty
24129
24130  if test "x$BOOT_JDK" != x; then
24131    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24132
24133  # Input might be given as Windows format, start by converting to
24134  # unix format.
24135  path="$BOOT_JDK"
24136  new_path=`$CYGPATH -u "$path"`
24137
24138  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24139  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24140  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24141  # "foo.exe" is OK but "foo" is an error.
24142  #
24143  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24144  # It is also a way to make sure we got the proper file name for the real test later on.
24145  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24146  if test "x$test_shortpath" = x; then
24147    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24149    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24150  fi
24151
24152  # Call helper function which possibly converts this using DOS-style short mode.
24153  # If so, the updated path is stored in $new_path.
24154
24155  input_path="$new_path"
24156  # Check if we need to convert this using DOS-style short mode. If the path
24157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24158  # take no chances and rewrite it.
24159  # Note: m4 eats our [], so we need to use [ and ] instead.
24160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24161  if test "x$has_forbidden_chars" != x; then
24162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24166      # Going to short mode and back again did indeed matter. Since short mode is
24167      # case insensitive, let's make it lowercase to improve readability.
24168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24169      # Now convert it back to Unix-stile (cygpath)
24170      input_path=`$CYGPATH -u "$shortmode_path"`
24171      new_path="$input_path"
24172    fi
24173  fi
24174
24175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24176  if test "x$test_cygdrive_prefix" = x; then
24177    # As a simple fix, exclude /usr/bin since it's not a real path.
24178    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24180      # a path prefixed by /cygdrive for fixpath to work.
24181      new_path="$CYGWIN_ROOT_PATH$input_path"
24182    fi
24183  fi
24184
24185
24186  if test "x$path" != "x$new_path"; then
24187    BOOT_JDK="$new_path"
24188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24189$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24190  fi
24191
24192    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24193
24194  path="$BOOT_JDK"
24195  has_colon=`$ECHO $path | $GREP ^.:`
24196  new_path="$path"
24197  if test "x$has_colon" = x; then
24198    # Not in mixed or Windows style, start by that.
24199    new_path=`cmd //c echo $path`
24200  fi
24201
24202
24203  input_path="$new_path"
24204  # Check if we need to convert this using DOS-style short mode. If the path
24205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24206  # take no chances and rewrite it.
24207  # Note: m4 eats our [], so we need to use [ and ] instead.
24208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24209  if test "x$has_forbidden_chars" != x; then
24210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24211    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24212  fi
24213
24214
24215  windows_path="$new_path"
24216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24217    unix_path=`$CYGPATH -u "$windows_path"`
24218    new_path="$unix_path"
24219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24221    new_path="$unix_path"
24222  fi
24223
24224  if test "x$path" != "x$new_path"; then
24225    BOOT_JDK="$new_path"
24226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24227$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24228  fi
24229
24230  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24231  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24232
24233    else
24234      # We're on a unix platform. Hooray! :)
24235      path="$BOOT_JDK"
24236      has_space=`$ECHO "$path" | $GREP " "`
24237      if test "x$has_space" != x; then
24238        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24239$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24240        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24241      fi
24242
24243      # Use eval to expand a potential ~
24244      eval path="$path"
24245      if test ! -f "$path" && test ! -d "$path"; then
24246        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24247      fi
24248
24249      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24250    fi
24251  fi
24252
24253            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24254$as_echo_n "checking for Boot JDK... " >&6; }
24255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24256$as_echo "$BOOT_JDK" >&6; }
24257            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24258$as_echo_n "checking Boot JDK version... " >&6; }
24259            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24260            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24261$as_echo "$BOOT_JDK_VERSION" >&6; }
24262          fi # end check jdk version
24263        fi # end check javac
24264      fi # end check java
24265    fi # end check boot jdk found
24266  fi
24267
24268    done
24269  fi
24270
24271
24272    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24273    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24274      # Do we have a bin/java?
24275      if test ! -x "$BOOT_JDK/bin/java"; then
24276        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24277$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24278        BOOT_JDK_FOUND=no
24279      else
24280        # Do we have a bin/javac?
24281        if test ! -x "$BOOT_JDK/bin/javac"; then
24282          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24283$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24284          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24285$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24286          BOOT_JDK_FOUND=no
24287        else
24288          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24289          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24290
24291          # Extra M4 quote needed to protect [] in grep expression.
24292          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24293          if test "x$FOUND_CORRECT_VERSION" = x; then
24294            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24296            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24297$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24298            BOOT_JDK_FOUND=no
24299          else
24300            # We're done! :-)
24301            BOOT_JDK_FOUND=yes
24302
24303  # Only process if variable expands to non-empty
24304
24305  if test "x$BOOT_JDK" != x; then
24306    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24307
24308  # Input might be given as Windows format, start by converting to
24309  # unix format.
24310  path="$BOOT_JDK"
24311  new_path=`$CYGPATH -u "$path"`
24312
24313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24316  # "foo.exe" is OK but "foo" is an error.
24317  #
24318  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24319  # It is also a way to make sure we got the proper file name for the real test later on.
24320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24321  if test "x$test_shortpath" = x; then
24322    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24324    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24325  fi
24326
24327  # Call helper function which possibly converts this using DOS-style short mode.
24328  # If so, the updated path is stored in $new_path.
24329
24330  input_path="$new_path"
24331  # Check if we need to convert this using DOS-style short mode. If the path
24332  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24333  # take no chances and rewrite it.
24334  # Note: m4 eats our [], so we need to use [ and ] instead.
24335  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24336  if test "x$has_forbidden_chars" != x; then
24337    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24338    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24339    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24340    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24341      # Going to short mode and back again did indeed matter. Since short mode is
24342      # case insensitive, let's make it lowercase to improve readability.
24343      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24344      # Now convert it back to Unix-stile (cygpath)
24345      input_path=`$CYGPATH -u "$shortmode_path"`
24346      new_path="$input_path"
24347    fi
24348  fi
24349
24350  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24351  if test "x$test_cygdrive_prefix" = x; then
24352    # As a simple fix, exclude /usr/bin since it's not a real path.
24353    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24354      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24355      # a path prefixed by /cygdrive for fixpath to work.
24356      new_path="$CYGWIN_ROOT_PATH$input_path"
24357    fi
24358  fi
24359
24360
24361  if test "x$path" != "x$new_path"; then
24362    BOOT_JDK="$new_path"
24363    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24364$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24365  fi
24366
24367    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24368
24369  path="$BOOT_JDK"
24370  has_colon=`$ECHO $path | $GREP ^.:`
24371  new_path="$path"
24372  if test "x$has_colon" = x; then
24373    # Not in mixed or Windows style, start by that.
24374    new_path=`cmd //c echo $path`
24375  fi
24376
24377
24378  input_path="$new_path"
24379  # Check if we need to convert this using DOS-style short mode. If the path
24380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24381  # take no chances and rewrite it.
24382  # Note: m4 eats our [], so we need to use [ and ] instead.
24383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24384  if test "x$has_forbidden_chars" != x; then
24385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24386    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24387  fi
24388
24389
24390  windows_path="$new_path"
24391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24392    unix_path=`$CYGPATH -u "$windows_path"`
24393    new_path="$unix_path"
24394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24396    new_path="$unix_path"
24397  fi
24398
24399  if test "x$path" != "x$new_path"; then
24400    BOOT_JDK="$new_path"
24401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24402$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24403  fi
24404
24405  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24406  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24407
24408    else
24409      # We're on a unix platform. Hooray! :)
24410      path="$BOOT_JDK"
24411      has_space=`$ECHO "$path" | $GREP " "`
24412      if test "x$has_space" != x; then
24413        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24415        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24416      fi
24417
24418      # Use eval to expand a potential ~
24419      eval path="$path"
24420      if test ! -f "$path" && test ! -d "$path"; then
24421        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24422      fi
24423
24424      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24425    fi
24426  fi
24427
24428            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24429$as_echo_n "checking for Boot JDK... " >&6; }
24430            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24431$as_echo "$BOOT_JDK" >&6; }
24432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24433$as_echo_n "checking Boot JDK version... " >&6; }
24434            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24435            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24436$as_echo "$BOOT_JDK_VERSION" >&6; }
24437          fi # end check jdk version
24438        fi # end check javac
24439      fi # end check java
24440    fi # end check boot jdk found
24441  fi
24442
24443
24444  if test "x$BOOT_JDK_FOUND" = xno; then
24445    # Now execute the test
24446
24447  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24448  BOOT_JDK_SUFFIX="/Contents/Home"
24449  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24450  if test "x$ALL_JDKS_FOUND" != x; then
24451    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24452
24453  if test "x$BOOT_JDK_FOUND" = xno; then
24454    # Now execute the test
24455
24456        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24457        if test -d "$BOOT_JDK"; then
24458          BOOT_JDK_FOUND=maybe
24459          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24460$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24461        fi
24462
24463
24464    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24465    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24466      # Do we have a bin/java?
24467      if test ! -x "$BOOT_JDK/bin/java"; then
24468        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24470        BOOT_JDK_FOUND=no
24471      else
24472        # Do we have a bin/javac?
24473        if test ! -x "$BOOT_JDK/bin/javac"; then
24474          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24476          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24477$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24478          BOOT_JDK_FOUND=no
24479        else
24480          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24481          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24482
24483          # Extra M4 quote needed to protect [] in grep expression.
24484          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24485          if test "x$FOUND_CORRECT_VERSION" = x; then
24486            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24487$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24488            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24489$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24490            BOOT_JDK_FOUND=no
24491          else
24492            # We're done! :-)
24493            BOOT_JDK_FOUND=yes
24494
24495  # Only process if variable expands to non-empty
24496
24497  if test "x$BOOT_JDK" != x; then
24498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24499
24500  # Input might be given as Windows format, start by converting to
24501  # unix format.
24502  path="$BOOT_JDK"
24503  new_path=`$CYGPATH -u "$path"`
24504
24505  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24506  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24507  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24508  # "foo.exe" is OK but "foo" is an error.
24509  #
24510  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24511  # It is also a way to make sure we got the proper file name for the real test later on.
24512  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24513  if test "x$test_shortpath" = x; then
24514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24515$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24516    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24517  fi
24518
24519  # Call helper function which possibly converts this using DOS-style short mode.
24520  # If so, the updated path is stored in $new_path.
24521
24522  input_path="$new_path"
24523  # Check if we need to convert this using DOS-style short mode. If the path
24524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24525  # take no chances and rewrite it.
24526  # Note: m4 eats our [], so we need to use [ and ] instead.
24527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24528  if test "x$has_forbidden_chars" != x; then
24529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24530    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24531    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24532    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24533      # Going to short mode and back again did indeed matter. Since short mode is
24534      # case insensitive, let's make it lowercase to improve readability.
24535      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24536      # Now convert it back to Unix-stile (cygpath)
24537      input_path=`$CYGPATH -u "$shortmode_path"`
24538      new_path="$input_path"
24539    fi
24540  fi
24541
24542  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24543  if test "x$test_cygdrive_prefix" = x; then
24544    # As a simple fix, exclude /usr/bin since it's not a real path.
24545    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24546      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24547      # a path prefixed by /cygdrive for fixpath to work.
24548      new_path="$CYGWIN_ROOT_PATH$input_path"
24549    fi
24550  fi
24551
24552
24553  if test "x$path" != "x$new_path"; then
24554    BOOT_JDK="$new_path"
24555    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24556$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24557  fi
24558
24559    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24560
24561  path="$BOOT_JDK"
24562  has_colon=`$ECHO $path | $GREP ^.:`
24563  new_path="$path"
24564  if test "x$has_colon" = x; then
24565    # Not in mixed or Windows style, start by that.
24566    new_path=`cmd //c echo $path`
24567  fi
24568
24569
24570  input_path="$new_path"
24571  # Check if we need to convert this using DOS-style short mode. If the path
24572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24573  # take no chances and rewrite it.
24574  # Note: m4 eats our [], so we need to use [ and ] instead.
24575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24576  if test "x$has_forbidden_chars" != x; then
24577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24579  fi
24580
24581
24582  windows_path="$new_path"
24583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24584    unix_path=`$CYGPATH -u "$windows_path"`
24585    new_path="$unix_path"
24586  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24587    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24588    new_path="$unix_path"
24589  fi
24590
24591  if test "x$path" != "x$new_path"; then
24592    BOOT_JDK="$new_path"
24593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24594$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24595  fi
24596
24597  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24598  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24599
24600    else
24601      # We're on a unix platform. Hooray! :)
24602      path="$BOOT_JDK"
24603      has_space=`$ECHO "$path" | $GREP " "`
24604      if test "x$has_space" != x; then
24605        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24606$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24607        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24608      fi
24609
24610      # Use eval to expand a potential ~
24611      eval path="$path"
24612      if test ! -f "$path" && test ! -d "$path"; then
24613        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24614      fi
24615
24616      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24617    fi
24618  fi
24619
24620            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24621$as_echo_n "checking for Boot JDK... " >&6; }
24622            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24623$as_echo "$BOOT_JDK" >&6; }
24624            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24625$as_echo_n "checking Boot JDK version... " >&6; }
24626            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24627            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24628$as_echo "$BOOT_JDK_VERSION" >&6; }
24629          fi # end check jdk version
24630        fi # end check javac
24631      fi # end check java
24632    fi # end check boot jdk found
24633  fi
24634
24635    done
24636  fi
24637
24638
24639    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24640    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24641      # Do we have a bin/java?
24642      if test ! -x "$BOOT_JDK/bin/java"; then
24643        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24644$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24645        BOOT_JDK_FOUND=no
24646      else
24647        # Do we have a bin/javac?
24648        if test ! -x "$BOOT_JDK/bin/javac"; then
24649          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24651          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24652$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24653          BOOT_JDK_FOUND=no
24654        else
24655          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24656          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24657
24658          # Extra M4 quote needed to protect [] in grep expression.
24659          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24660          if test "x$FOUND_CORRECT_VERSION" = x; then
24661            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24663            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24664$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24665            BOOT_JDK_FOUND=no
24666          else
24667            # We're done! :-)
24668            BOOT_JDK_FOUND=yes
24669
24670  # Only process if variable expands to non-empty
24671
24672  if test "x$BOOT_JDK" != x; then
24673    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24674
24675  # Input might be given as Windows format, start by converting to
24676  # unix format.
24677  path="$BOOT_JDK"
24678  new_path=`$CYGPATH -u "$path"`
24679
24680  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24681  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24682  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24683  # "foo.exe" is OK but "foo" is an error.
24684  #
24685  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24686  # It is also a way to make sure we got the proper file name for the real test later on.
24687  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24688  if test "x$test_shortpath" = x; then
24689    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24690$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24691    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24692  fi
24693
24694  # Call helper function which possibly converts this using DOS-style short mode.
24695  # If so, the updated path is stored in $new_path.
24696
24697  input_path="$new_path"
24698  # Check if we need to convert this using DOS-style short mode. If the path
24699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24700  # take no chances and rewrite it.
24701  # Note: m4 eats our [], so we need to use [ and ] instead.
24702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24703  if test "x$has_forbidden_chars" != x; then
24704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24708      # Going to short mode and back again did indeed matter. Since short mode is
24709      # case insensitive, let's make it lowercase to improve readability.
24710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24711      # Now convert it back to Unix-stile (cygpath)
24712      input_path=`$CYGPATH -u "$shortmode_path"`
24713      new_path="$input_path"
24714    fi
24715  fi
24716
24717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24718  if test "x$test_cygdrive_prefix" = x; then
24719    # As a simple fix, exclude /usr/bin since it's not a real path.
24720    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24722      # a path prefixed by /cygdrive for fixpath to work.
24723      new_path="$CYGWIN_ROOT_PATH$input_path"
24724    fi
24725  fi
24726
24727
24728  if test "x$path" != "x$new_path"; then
24729    BOOT_JDK="$new_path"
24730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24732  fi
24733
24734    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24735
24736  path="$BOOT_JDK"
24737  has_colon=`$ECHO $path | $GREP ^.:`
24738  new_path="$path"
24739  if test "x$has_colon" = x; then
24740    # Not in mixed or Windows style, start by that.
24741    new_path=`cmd //c echo $path`
24742  fi
24743
24744
24745  input_path="$new_path"
24746  # Check if we need to convert this using DOS-style short mode. If the path
24747  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24748  # take no chances and rewrite it.
24749  # Note: m4 eats our [], so we need to use [ and ] instead.
24750  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24751  if test "x$has_forbidden_chars" != x; then
24752    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24753    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24754  fi
24755
24756
24757  windows_path="$new_path"
24758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24759    unix_path=`$CYGPATH -u "$windows_path"`
24760    new_path="$unix_path"
24761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24762    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24763    new_path="$unix_path"
24764  fi
24765
24766  if test "x$path" != "x$new_path"; then
24767    BOOT_JDK="$new_path"
24768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24770  fi
24771
24772  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24773  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24774
24775    else
24776      # We're on a unix platform. Hooray! :)
24777      path="$BOOT_JDK"
24778      has_space=`$ECHO "$path" | $GREP " "`
24779      if test "x$has_space" != x; then
24780        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24782        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24783      fi
24784
24785      # Use eval to expand a potential ~
24786      eval path="$path"
24787      if test ! -f "$path" && test ! -d "$path"; then
24788        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24789      fi
24790
24791      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24792    fi
24793  fi
24794
24795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24796$as_echo_n "checking for Boot JDK... " >&6; }
24797            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24798$as_echo "$BOOT_JDK" >&6; }
24799            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24800$as_echo_n "checking Boot JDK version... " >&6; }
24801            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24802            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24803$as_echo "$BOOT_JDK_VERSION" >&6; }
24804          fi # end check jdk version
24805        fi # end check javac
24806      fi # end check java
24807    fi # end check boot jdk found
24808  fi
24809
24810  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24811
24812  if test "x$BOOT_JDK_FOUND" = xno; then
24813    # Now execute the test
24814
24815  BOOT_JDK_PREFIX="/usr/lib/jvm"
24816  BOOT_JDK_SUFFIX=""
24817  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24818  if test "x$ALL_JDKS_FOUND" != x; then
24819    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24820
24821  if test "x$BOOT_JDK_FOUND" = xno; then
24822    # Now execute the test
24823
24824        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24825        if test -d "$BOOT_JDK"; then
24826          BOOT_JDK_FOUND=maybe
24827          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24828$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24829        fi
24830
24831
24832    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24833    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24834      # Do we have a bin/java?
24835      if test ! -x "$BOOT_JDK/bin/java"; then
24836        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24838        BOOT_JDK_FOUND=no
24839      else
24840        # Do we have a bin/javac?
24841        if test ! -x "$BOOT_JDK/bin/javac"; then
24842          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24843$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24844          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24845$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24846          BOOT_JDK_FOUND=no
24847        else
24848          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24849          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24850
24851          # Extra M4 quote needed to protect [] in grep expression.
24852          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24853          if test "x$FOUND_CORRECT_VERSION" = x; then
24854            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24856            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24857$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24858            BOOT_JDK_FOUND=no
24859          else
24860            # We're done! :-)
24861            BOOT_JDK_FOUND=yes
24862
24863  # Only process if variable expands to non-empty
24864
24865  if test "x$BOOT_JDK" != x; then
24866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24867
24868  # Input might be given as Windows format, start by converting to
24869  # unix format.
24870  path="$BOOT_JDK"
24871  new_path=`$CYGPATH -u "$path"`
24872
24873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24876  # "foo.exe" is OK but "foo" is an error.
24877  #
24878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24879  # It is also a way to make sure we got the proper file name for the real test later on.
24880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24881  if test "x$test_shortpath" = x; then
24882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24883$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24884    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24885  fi
24886
24887  # Call helper function which possibly converts this using DOS-style short mode.
24888  # If so, the updated path is stored in $new_path.
24889
24890  input_path="$new_path"
24891  # Check if we need to convert this using DOS-style short mode. If the path
24892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24893  # take no chances and rewrite it.
24894  # Note: m4 eats our [], so we need to use [ and ] instead.
24895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24896  if test "x$has_forbidden_chars" != x; then
24897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24901      # Going to short mode and back again did indeed matter. Since short mode is
24902      # case insensitive, let's make it lowercase to improve readability.
24903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24904      # Now convert it back to Unix-stile (cygpath)
24905      input_path=`$CYGPATH -u "$shortmode_path"`
24906      new_path="$input_path"
24907    fi
24908  fi
24909
24910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24911  if test "x$test_cygdrive_prefix" = x; then
24912    # As a simple fix, exclude /usr/bin since it's not a real path.
24913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24915      # a path prefixed by /cygdrive for fixpath to work.
24916      new_path="$CYGWIN_ROOT_PATH$input_path"
24917    fi
24918  fi
24919
24920
24921  if test "x$path" != "x$new_path"; then
24922    BOOT_JDK="$new_path"
24923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24924$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24925  fi
24926
24927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24928
24929  path="$BOOT_JDK"
24930  has_colon=`$ECHO $path | $GREP ^.:`
24931  new_path="$path"
24932  if test "x$has_colon" = x; then
24933    # Not in mixed or Windows style, start by that.
24934    new_path=`cmd //c echo $path`
24935  fi
24936
24937
24938  input_path="$new_path"
24939  # Check if we need to convert this using DOS-style short mode. If the path
24940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24941  # take no chances and rewrite it.
24942  # Note: m4 eats our [], so we need to use [ and ] instead.
24943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24944  if test "x$has_forbidden_chars" != x; then
24945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24947  fi
24948
24949
24950  windows_path="$new_path"
24951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24952    unix_path=`$CYGPATH -u "$windows_path"`
24953    new_path="$unix_path"
24954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24956    new_path="$unix_path"
24957  fi
24958
24959  if test "x$path" != "x$new_path"; then
24960    BOOT_JDK="$new_path"
24961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24962$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24963  fi
24964
24965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24967
24968    else
24969      # We're on a unix platform. Hooray! :)
24970      path="$BOOT_JDK"
24971      has_space=`$ECHO "$path" | $GREP " "`
24972      if test "x$has_space" != x; then
24973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24974$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24976      fi
24977
24978      # Use eval to expand a potential ~
24979      eval path="$path"
24980      if test ! -f "$path" && test ! -d "$path"; then
24981        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24982      fi
24983
24984      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24985    fi
24986  fi
24987
24988            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24989$as_echo_n "checking for Boot JDK... " >&6; }
24990            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24991$as_echo "$BOOT_JDK" >&6; }
24992            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24993$as_echo_n "checking Boot JDK version... " >&6; }
24994            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24995            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24996$as_echo "$BOOT_JDK_VERSION" >&6; }
24997          fi # end check jdk version
24998        fi # end check javac
24999      fi # end check java
25000    fi # end check boot jdk found
25001  fi
25002
25003    done
25004  fi
25005
25006
25007    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25008    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25009      # Do we have a bin/java?
25010      if test ! -x "$BOOT_JDK/bin/java"; then
25011        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25012$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25013        BOOT_JDK_FOUND=no
25014      else
25015        # Do we have a bin/javac?
25016        if test ! -x "$BOOT_JDK/bin/javac"; then
25017          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25019          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25020$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25021          BOOT_JDK_FOUND=no
25022        else
25023          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25024          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25025
25026          # Extra M4 quote needed to protect [] in grep expression.
25027          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25028          if test "x$FOUND_CORRECT_VERSION" = x; then
25029            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25030$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25031            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25032$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25033            BOOT_JDK_FOUND=no
25034          else
25035            # We're done! :-)
25036            BOOT_JDK_FOUND=yes
25037
25038  # Only process if variable expands to non-empty
25039
25040  if test "x$BOOT_JDK" != x; then
25041    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25042
25043  # Input might be given as Windows format, start by converting to
25044  # unix format.
25045  path="$BOOT_JDK"
25046  new_path=`$CYGPATH -u "$path"`
25047
25048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25051  # "foo.exe" is OK but "foo" is an error.
25052  #
25053  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25054  # It is also a way to make sure we got the proper file name for the real test later on.
25055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25056  if test "x$test_shortpath" = x; then
25057    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25058$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25059    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25060  fi
25061
25062  # Call helper function which possibly converts this using DOS-style short mode.
25063  # If so, the updated path is stored in $new_path.
25064
25065  input_path="$new_path"
25066  # Check if we need to convert this using DOS-style short mode. If the path
25067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25068  # take no chances and rewrite it.
25069  # Note: m4 eats our [], so we need to use [ and ] instead.
25070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25071  if test "x$has_forbidden_chars" != x; then
25072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25073    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25074    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25075    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25076      # Going to short mode and back again did indeed matter. Since short mode is
25077      # case insensitive, let's make it lowercase to improve readability.
25078      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25079      # Now convert it back to Unix-stile (cygpath)
25080      input_path=`$CYGPATH -u "$shortmode_path"`
25081      new_path="$input_path"
25082    fi
25083  fi
25084
25085  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25086  if test "x$test_cygdrive_prefix" = x; then
25087    # As a simple fix, exclude /usr/bin since it's not a real path.
25088    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25089      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25090      # a path prefixed by /cygdrive for fixpath to work.
25091      new_path="$CYGWIN_ROOT_PATH$input_path"
25092    fi
25093  fi
25094
25095
25096  if test "x$path" != "x$new_path"; then
25097    BOOT_JDK="$new_path"
25098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25099$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25100  fi
25101
25102    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25103
25104  path="$BOOT_JDK"
25105  has_colon=`$ECHO $path | $GREP ^.:`
25106  new_path="$path"
25107  if test "x$has_colon" = x; then
25108    # Not in mixed or Windows style, start by that.
25109    new_path=`cmd //c echo $path`
25110  fi
25111
25112
25113  input_path="$new_path"
25114  # Check if we need to convert this using DOS-style short mode. If the path
25115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25116  # take no chances and rewrite it.
25117  # Note: m4 eats our [], so we need to use [ and ] instead.
25118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25119  if test "x$has_forbidden_chars" != x; then
25120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25121    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25122  fi
25123
25124
25125  windows_path="$new_path"
25126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25127    unix_path=`$CYGPATH -u "$windows_path"`
25128    new_path="$unix_path"
25129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25131    new_path="$unix_path"
25132  fi
25133
25134  if test "x$path" != "x$new_path"; then
25135    BOOT_JDK="$new_path"
25136    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25137$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25138  fi
25139
25140  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25141  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25142
25143    else
25144      # We're on a unix platform. Hooray! :)
25145      path="$BOOT_JDK"
25146      has_space=`$ECHO "$path" | $GREP " "`
25147      if test "x$has_space" != x; then
25148        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25150        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25151      fi
25152
25153      # Use eval to expand a potential ~
25154      eval path="$path"
25155      if test ! -f "$path" && test ! -d "$path"; then
25156        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25157      fi
25158
25159      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25160    fi
25161  fi
25162
25163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25164$as_echo_n "checking for Boot JDK... " >&6; }
25165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25166$as_echo "$BOOT_JDK" >&6; }
25167            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25168$as_echo_n "checking Boot JDK version... " >&6; }
25169            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25171$as_echo "$BOOT_JDK_VERSION" >&6; }
25172          fi # end check jdk version
25173        fi # end check javac
25174      fi # end check java
25175    fi # end check boot jdk found
25176  fi
25177
25178  fi
25179
25180
25181    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25182    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25183      # Do we have a bin/java?
25184      if test ! -x "$BOOT_JDK/bin/java"; then
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25186$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25187        BOOT_JDK_FOUND=no
25188      else
25189        # Do we have a bin/javac?
25190        if test ! -x "$BOOT_JDK/bin/javac"; then
25191          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25192$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25193          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25194$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25195          BOOT_JDK_FOUND=no
25196        else
25197          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25198          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25199
25200          # Extra M4 quote needed to protect [] in grep expression.
25201          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25202          if test "x$FOUND_CORRECT_VERSION" = x; then
25203            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25204$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25206$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25207            BOOT_JDK_FOUND=no
25208          else
25209            # We're done! :-)
25210            BOOT_JDK_FOUND=yes
25211
25212  # Only process if variable expands to non-empty
25213
25214  if test "x$BOOT_JDK" != x; then
25215    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25216
25217  # Input might be given as Windows format, start by converting to
25218  # unix format.
25219  path="$BOOT_JDK"
25220  new_path=`$CYGPATH -u "$path"`
25221
25222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25225  # "foo.exe" is OK but "foo" is an error.
25226  #
25227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25228  # It is also a way to make sure we got the proper file name for the real test later on.
25229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25230  if test "x$test_shortpath" = x; then
25231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25233    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25234  fi
25235
25236  # Call helper function which possibly converts this using DOS-style short mode.
25237  # If so, the updated path is stored in $new_path.
25238
25239  input_path="$new_path"
25240  # Check if we need to convert this using DOS-style short mode. If the path
25241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25242  # take no chances and rewrite it.
25243  # Note: m4 eats our [], so we need to use [ and ] instead.
25244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25245  if test "x$has_forbidden_chars" != x; then
25246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25250      # Going to short mode and back again did indeed matter. Since short mode is
25251      # case insensitive, let's make it lowercase to improve readability.
25252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25253      # Now convert it back to Unix-stile (cygpath)
25254      input_path=`$CYGPATH -u "$shortmode_path"`
25255      new_path="$input_path"
25256    fi
25257  fi
25258
25259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25260  if test "x$test_cygdrive_prefix" = x; then
25261    # As a simple fix, exclude /usr/bin since it's not a real path.
25262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25264      # a path prefixed by /cygdrive for fixpath to work.
25265      new_path="$CYGWIN_ROOT_PATH$input_path"
25266    fi
25267  fi
25268
25269
25270  if test "x$path" != "x$new_path"; then
25271    BOOT_JDK="$new_path"
25272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25273$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25274  fi
25275
25276    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25277
25278  path="$BOOT_JDK"
25279  has_colon=`$ECHO $path | $GREP ^.:`
25280  new_path="$path"
25281  if test "x$has_colon" = x; then
25282    # Not in mixed or Windows style, start by that.
25283    new_path=`cmd //c echo $path`
25284  fi
25285
25286
25287  input_path="$new_path"
25288  # Check if we need to convert this using DOS-style short mode. If the path
25289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25290  # take no chances and rewrite it.
25291  # Note: m4 eats our [], so we need to use [ and ] instead.
25292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25293  if test "x$has_forbidden_chars" != x; then
25294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25296  fi
25297
25298
25299  windows_path="$new_path"
25300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25301    unix_path=`$CYGPATH -u "$windows_path"`
25302    new_path="$unix_path"
25303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25305    new_path="$unix_path"
25306  fi
25307
25308  if test "x$path" != "x$new_path"; then
25309    BOOT_JDK="$new_path"
25310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25311$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25312  fi
25313
25314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25316
25317    else
25318      # We're on a unix platform. Hooray! :)
25319      path="$BOOT_JDK"
25320      has_space=`$ECHO "$path" | $GREP " "`
25321      if test "x$has_space" != x; then
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25323$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25324        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25325      fi
25326
25327      # Use eval to expand a potential ~
25328      eval path="$path"
25329      if test ! -f "$path" && test ! -d "$path"; then
25330        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25331      fi
25332
25333      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25334    fi
25335  fi
25336
25337            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25338$as_echo_n "checking for Boot JDK... " >&6; }
25339            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25340$as_echo "$BOOT_JDK" >&6; }
25341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25342$as_echo_n "checking Boot JDK version... " >&6; }
25343            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25345$as_echo "$BOOT_JDK_VERSION" >&6; }
25346          fi # end check jdk version
25347        fi # end check javac
25348      fi # end check java
25349    fi # end check boot jdk found
25350  fi
25351
25352
25353  # If we haven't found anything yet, we've truly lost. Give up.
25354  if test "x$BOOT_JDK_FOUND" = xno; then
25355
25356  # Print a helpful message on how to acquire the necessary build dependency.
25357  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25358  MISSING_DEPENDENCY=openjdk
25359
25360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25361    cygwin_help $MISSING_DEPENDENCY
25362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25363    msys_help $MISSING_DEPENDENCY
25364  else
25365    PKGHANDLER_COMMAND=
25366
25367    case $PKGHANDLER in
25368      apt-get)
25369        apt_help     $MISSING_DEPENDENCY ;;
25370      yum)
25371        yum_help     $MISSING_DEPENDENCY ;;
25372      port)
25373        port_help    $MISSING_DEPENDENCY ;;
25374      pkgutil)
25375        pkgutil_help $MISSING_DEPENDENCY ;;
25376      pkgadd)
25377        pkgadd_help  $MISSING_DEPENDENCY ;;
25378    esac
25379
25380    if test "x$PKGHANDLER_COMMAND" != x; then
25381      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25382    fi
25383  fi
25384
25385    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25386$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25387    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25388$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25389    as_fn_error $? "Cannot continue" "$LINENO" 5
25390  fi
25391
25392
25393
25394  # Setup tools from the Boot JDK.
25395
25396  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25397
25398  # Publish this variable in the help.
25399
25400
25401  if test "x$JAVA" = x; then
25402    # The variable is not set by user, try to locate tool using the code snippet
25403
25404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25405$as_echo_n "checking for java in Boot JDK... " >&6; }
25406      JAVA=$BOOT_JDK/bin/java
25407      if test ! -x $JAVA; then
25408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25409$as_echo "not found" >&6; }
25410        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25411$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25412        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25413      fi
25414      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25415$as_echo "ok" >&6; }
25416
25417
25418  else
25419    # The variable is set, but is it from the command line or the environment?
25420
25421    # Try to remove the string !JAVA! from our list.
25422    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25423    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25424      # If it failed, the variable was not from the command line. Ignore it,
25425      # but warn the user (except for BASH, which is always set by the calling BASH).
25426      if test "xJAVA" != xBASH; then
25427        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25428$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25429      fi
25430      # Try to locate tool using the code snippet
25431
25432      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25433$as_echo_n "checking for java in Boot JDK... " >&6; }
25434      JAVA=$BOOT_JDK/bin/java
25435      if test ! -x $JAVA; then
25436        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25437$as_echo "not found" >&6; }
25438        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25439$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25440        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25441      fi
25442      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25443$as_echo "ok" >&6; }
25444
25445
25446    else
25447      # If it succeeded, then it was overridden by the user. We will use it
25448      # for the tool.
25449
25450      # First remove it from the list of overridden variables, so we can test
25451      # for unknown variables in the end.
25452      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25453
25454      # Check if the provided tool contains a complete path.
25455      tool_specified="$JAVA"
25456      tool_basename="${tool_specified##*/}"
25457      if test "x$tool_basename" = "x$tool_specified"; then
25458        # A command without a complete path is provided, search $PATH.
25459        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25460$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25461        # Extract the first word of "$tool_basename", so it can be a program name with args.
25462set dummy $tool_basename; ac_word=$2
25463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25464$as_echo_n "checking for $ac_word... " >&6; }
25465if ${ac_cv_path_JAVA+:} false; then :
25466  $as_echo_n "(cached) " >&6
25467else
25468  case $JAVA in
25469  [\\/]* | ?:[\\/]*)
25470  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25471  ;;
25472  *)
25473  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25474for as_dir in $PATH
25475do
25476  IFS=$as_save_IFS
25477  test -z "$as_dir" && as_dir=.
25478    for ac_exec_ext in '' $ac_executable_extensions; do
25479  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25480    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25481    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25482    break 2
25483  fi
25484done
25485  done
25486IFS=$as_save_IFS
25487
25488  ;;
25489esac
25490fi
25491JAVA=$ac_cv_path_JAVA
25492if test -n "$JAVA"; then
25493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25494$as_echo "$JAVA" >&6; }
25495else
25496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25497$as_echo "no" >&6; }
25498fi
25499
25500
25501        if test "x$JAVA" = x; then
25502          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25503        fi
25504      else
25505        # Otherwise we believe it is a complete path. Use it as it is.
25506        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25507$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25509$as_echo_n "checking for JAVA... " >&6; }
25510        if test ! -x "$tool_specified"; then
25511          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25512$as_echo "not found" >&6; }
25513          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25514        fi
25515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25516$as_echo "$tool_specified" >&6; }
25517      fi
25518    fi
25519  fi
25520
25521
25522
25523  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25524
25525  # Publish this variable in the help.
25526
25527
25528  if test "x$JAVAC" = x; then
25529    # The variable is not set by user, try to locate tool using the code snippet
25530
25531      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25532$as_echo_n "checking for javac in Boot JDK... " >&6; }
25533      JAVAC=$BOOT_JDK/bin/javac
25534      if test ! -x $JAVAC; then
25535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25536$as_echo "not found" >&6; }
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25538$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25539        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25540      fi
25541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25542$as_echo "ok" >&6; }
25543
25544
25545  else
25546    # The variable is set, but is it from the command line or the environment?
25547
25548    # Try to remove the string !JAVAC! from our list.
25549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25551      # If it failed, the variable was not from the command line. Ignore it,
25552      # but warn the user (except for BASH, which is always set by the calling BASH).
25553      if test "xJAVAC" != xBASH; then
25554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25555$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25556      fi
25557      # Try to locate tool using the code snippet
25558
25559      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25560$as_echo_n "checking for javac in Boot JDK... " >&6; }
25561      JAVAC=$BOOT_JDK/bin/javac
25562      if test ! -x $JAVAC; then
25563        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25564$as_echo "not found" >&6; }
25565        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25566$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25567        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25568      fi
25569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25570$as_echo "ok" >&6; }
25571
25572
25573    else
25574      # If it succeeded, then it was overridden by the user. We will use it
25575      # for the tool.
25576
25577      # First remove it from the list of overridden variables, so we can test
25578      # for unknown variables in the end.
25579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25580
25581      # Check if the provided tool contains a complete path.
25582      tool_specified="$JAVAC"
25583      tool_basename="${tool_specified##*/}"
25584      if test "x$tool_basename" = "x$tool_specified"; then
25585        # A command without a complete path is provided, search $PATH.
25586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25587$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25588        # Extract the first word of "$tool_basename", so it can be a program name with args.
25589set dummy $tool_basename; ac_word=$2
25590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25591$as_echo_n "checking for $ac_word... " >&6; }
25592if ${ac_cv_path_JAVAC+:} false; then :
25593  $as_echo_n "(cached) " >&6
25594else
25595  case $JAVAC in
25596  [\\/]* | ?:[\\/]*)
25597  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25598  ;;
25599  *)
25600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25601for as_dir in $PATH
25602do
25603  IFS=$as_save_IFS
25604  test -z "$as_dir" && as_dir=.
25605    for ac_exec_ext in '' $ac_executable_extensions; do
25606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25607    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25609    break 2
25610  fi
25611done
25612  done
25613IFS=$as_save_IFS
25614
25615  ;;
25616esac
25617fi
25618JAVAC=$ac_cv_path_JAVAC
25619if test -n "$JAVAC"; then
25620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25621$as_echo "$JAVAC" >&6; }
25622else
25623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25624$as_echo "no" >&6; }
25625fi
25626
25627
25628        if test "x$JAVAC" = x; then
25629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25630        fi
25631      else
25632        # Otherwise we believe it is a complete path. Use it as it is.
25633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25634$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25636$as_echo_n "checking for JAVAC... " >&6; }
25637        if test ! -x "$tool_specified"; then
25638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25639$as_echo "not found" >&6; }
25640          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25641        fi
25642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25643$as_echo "$tool_specified" >&6; }
25644      fi
25645    fi
25646  fi
25647
25648
25649
25650  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25651
25652  # Publish this variable in the help.
25653
25654
25655  if test "x$JAVAH" = x; then
25656    # The variable is not set by user, try to locate tool using the code snippet
25657
25658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25659$as_echo_n "checking for javah in Boot JDK... " >&6; }
25660      JAVAH=$BOOT_JDK/bin/javah
25661      if test ! -x $JAVAH; then
25662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25663$as_echo "not found" >&6; }
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25665$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25666        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25667      fi
25668      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25669$as_echo "ok" >&6; }
25670
25671
25672  else
25673    # The variable is set, but is it from the command line or the environment?
25674
25675    # Try to remove the string !JAVAH! from our list.
25676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25678      # If it failed, the variable was not from the command line. Ignore it,
25679      # but warn the user (except for BASH, which is always set by the calling BASH).
25680      if test "xJAVAH" != xBASH; then
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25682$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25683      fi
25684      # Try to locate tool using the code snippet
25685
25686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25687$as_echo_n "checking for javah in Boot JDK... " >&6; }
25688      JAVAH=$BOOT_JDK/bin/javah
25689      if test ! -x $JAVAH; then
25690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25691$as_echo "not found" >&6; }
25692        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25693$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25694        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25695      fi
25696      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25697$as_echo "ok" >&6; }
25698
25699
25700    else
25701      # If it succeeded, then it was overridden by the user. We will use it
25702      # for the tool.
25703
25704      # First remove it from the list of overridden variables, so we can test
25705      # for unknown variables in the end.
25706      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25707
25708      # Check if the provided tool contains a complete path.
25709      tool_specified="$JAVAH"
25710      tool_basename="${tool_specified##*/}"
25711      if test "x$tool_basename" = "x$tool_specified"; then
25712        # A command without a complete path is provided, search $PATH.
25713        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25714$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25715        # Extract the first word of "$tool_basename", so it can be a program name with args.
25716set dummy $tool_basename; ac_word=$2
25717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25718$as_echo_n "checking for $ac_word... " >&6; }
25719if ${ac_cv_path_JAVAH+:} false; then :
25720  $as_echo_n "(cached) " >&6
25721else
25722  case $JAVAH in
25723  [\\/]* | ?:[\\/]*)
25724  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25725  ;;
25726  *)
25727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25728for as_dir in $PATH
25729do
25730  IFS=$as_save_IFS
25731  test -z "$as_dir" && as_dir=.
25732    for ac_exec_ext in '' $ac_executable_extensions; do
25733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25734    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25736    break 2
25737  fi
25738done
25739  done
25740IFS=$as_save_IFS
25741
25742  ;;
25743esac
25744fi
25745JAVAH=$ac_cv_path_JAVAH
25746if test -n "$JAVAH"; then
25747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25748$as_echo "$JAVAH" >&6; }
25749else
25750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25751$as_echo "no" >&6; }
25752fi
25753
25754
25755        if test "x$JAVAH" = x; then
25756          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25757        fi
25758      else
25759        # Otherwise we believe it is a complete path. Use it as it is.
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25761$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25762        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25763$as_echo_n "checking for JAVAH... " >&6; }
25764        if test ! -x "$tool_specified"; then
25765          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25766$as_echo "not found" >&6; }
25767          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25768        fi
25769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25770$as_echo "$tool_specified" >&6; }
25771      fi
25772    fi
25773  fi
25774
25775
25776
25777  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25778
25779  # Publish this variable in the help.
25780
25781
25782  if test "x$JAR" = x; then
25783    # The variable is not set by user, try to locate tool using the code snippet
25784
25785      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25786$as_echo_n "checking for jar in Boot JDK... " >&6; }
25787      JAR=$BOOT_JDK/bin/jar
25788      if test ! -x $JAR; then
25789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25790$as_echo "not found" >&6; }
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25792$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25793        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25794      fi
25795      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25796$as_echo "ok" >&6; }
25797
25798
25799  else
25800    # The variable is set, but is it from the command line or the environment?
25801
25802    # Try to remove the string !JAR! from our list.
25803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25805      # If it failed, the variable was not from the command line. Ignore it,
25806      # but warn the user (except for BASH, which is always set by the calling BASH).
25807      if test "xJAR" != xBASH; then
25808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25809$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25810      fi
25811      # Try to locate tool using the code snippet
25812
25813      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25814$as_echo_n "checking for jar in Boot JDK... " >&6; }
25815      JAR=$BOOT_JDK/bin/jar
25816      if test ! -x $JAR; then
25817        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25818$as_echo "not found" >&6; }
25819        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25820$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25821        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25822      fi
25823      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25824$as_echo "ok" >&6; }
25825
25826
25827    else
25828      # If it succeeded, then it was overridden by the user. We will use it
25829      # for the tool.
25830
25831      # First remove it from the list of overridden variables, so we can test
25832      # for unknown variables in the end.
25833      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25834
25835      # Check if the provided tool contains a complete path.
25836      tool_specified="$JAR"
25837      tool_basename="${tool_specified##*/}"
25838      if test "x$tool_basename" = "x$tool_specified"; then
25839        # A command without a complete path is provided, search $PATH.
25840        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25841$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25842        # Extract the first word of "$tool_basename", so it can be a program name with args.
25843set dummy $tool_basename; ac_word=$2
25844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25845$as_echo_n "checking for $ac_word... " >&6; }
25846if ${ac_cv_path_JAR+:} false; then :
25847  $as_echo_n "(cached) " >&6
25848else
25849  case $JAR in
25850  [\\/]* | ?:[\\/]*)
25851  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25852  ;;
25853  *)
25854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25855for as_dir in $PATH
25856do
25857  IFS=$as_save_IFS
25858  test -z "$as_dir" && as_dir=.
25859    for ac_exec_ext in '' $ac_executable_extensions; do
25860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25861    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25863    break 2
25864  fi
25865done
25866  done
25867IFS=$as_save_IFS
25868
25869  ;;
25870esac
25871fi
25872JAR=$ac_cv_path_JAR
25873if test -n "$JAR"; then
25874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25875$as_echo "$JAR" >&6; }
25876else
25877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25878$as_echo "no" >&6; }
25879fi
25880
25881
25882        if test "x$JAR" = x; then
25883          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25884        fi
25885      else
25886        # Otherwise we believe it is a complete path. Use it as it is.
25887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25888$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25889        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25890$as_echo_n "checking for JAR... " >&6; }
25891        if test ! -x "$tool_specified"; then
25892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25893$as_echo "not found" >&6; }
25894          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25895        fi
25896        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25897$as_echo "$tool_specified" >&6; }
25898      fi
25899    fi
25900  fi
25901
25902
25903
25904  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25905
25906  # Publish this variable in the help.
25907
25908
25909  if test "x$NATIVE2ASCII" = x; then
25910    # The variable is not set by user, try to locate tool using the code snippet
25911
25912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25913$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25914      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25915      if test ! -x $NATIVE2ASCII; then
25916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25917$as_echo "not found" >&6; }
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25919$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25920        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25921      fi
25922      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25923$as_echo "ok" >&6; }
25924
25925
25926  else
25927    # The variable is set, but is it from the command line or the environment?
25928
25929    # Try to remove the string !NATIVE2ASCII! from our list.
25930    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25931    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25932      # If it failed, the variable was not from the command line. Ignore it,
25933      # but warn the user (except for BASH, which is always set by the calling BASH).
25934      if test "xNATIVE2ASCII" != xBASH; then
25935        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25936$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25937      fi
25938      # Try to locate tool using the code snippet
25939
25940      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25941$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25942      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25943      if test ! -x $NATIVE2ASCII; then
25944        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25945$as_echo "not found" >&6; }
25946        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25947$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25948        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25949      fi
25950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25951$as_echo "ok" >&6; }
25952
25953
25954    else
25955      # If it succeeded, then it was overridden by the user. We will use it
25956      # for the tool.
25957
25958      # First remove it from the list of overridden variables, so we can test
25959      # for unknown variables in the end.
25960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25961
25962      # Check if the provided tool contains a complete path.
25963      tool_specified="$NATIVE2ASCII"
25964      tool_basename="${tool_specified##*/}"
25965      if test "x$tool_basename" = "x$tool_specified"; then
25966        # A command without a complete path is provided, search $PATH.
25967        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25968$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25969        # Extract the first word of "$tool_basename", so it can be a program name with args.
25970set dummy $tool_basename; ac_word=$2
25971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25972$as_echo_n "checking for $ac_word... " >&6; }
25973if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25974  $as_echo_n "(cached) " >&6
25975else
25976  case $NATIVE2ASCII in
25977  [\\/]* | ?:[\\/]*)
25978  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25979  ;;
25980  *)
25981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25982for as_dir in $PATH
25983do
25984  IFS=$as_save_IFS
25985  test -z "$as_dir" && as_dir=.
25986    for ac_exec_ext in '' $ac_executable_extensions; do
25987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25988    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25990    break 2
25991  fi
25992done
25993  done
25994IFS=$as_save_IFS
25995
25996  ;;
25997esac
25998fi
25999NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26000if test -n "$NATIVE2ASCII"; then
26001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26002$as_echo "$NATIVE2ASCII" >&6; }
26003else
26004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26005$as_echo "no" >&6; }
26006fi
26007
26008
26009        if test "x$NATIVE2ASCII" = x; then
26010          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26011        fi
26012      else
26013        # Otherwise we believe it is a complete path. Use it as it is.
26014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26015$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26017$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26018        if test ! -x "$tool_specified"; then
26019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26020$as_echo "not found" >&6; }
26021          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26022        fi
26023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26024$as_echo "$tool_specified" >&6; }
26025      fi
26026    fi
26027  fi
26028
26029
26030
26031  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26032
26033  # Publish this variable in the help.
26034
26035
26036  if test "x$JARSIGNER" = x; then
26037    # The variable is not set by user, try to locate tool using the code snippet
26038
26039      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26040$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26041      JARSIGNER=$BOOT_JDK/bin/jarsigner
26042      if test ! -x $JARSIGNER; then
26043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26044$as_echo "not found" >&6; }
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26046$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26047        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26048      fi
26049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26050$as_echo "ok" >&6; }
26051
26052
26053  else
26054    # The variable is set, but is it from the command line or the environment?
26055
26056    # Try to remove the string !JARSIGNER! from our list.
26057    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26058    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26059      # If it failed, the variable was not from the command line. Ignore it,
26060      # but warn the user (except for BASH, which is always set by the calling BASH).
26061      if test "xJARSIGNER" != xBASH; then
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26063$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26064      fi
26065      # Try to locate tool using the code snippet
26066
26067      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26068$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26069      JARSIGNER=$BOOT_JDK/bin/jarsigner
26070      if test ! -x $JARSIGNER; then
26071        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26072$as_echo "not found" >&6; }
26073        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26074$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26075        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26076      fi
26077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26078$as_echo "ok" >&6; }
26079
26080
26081    else
26082      # If it succeeded, then it was overridden by the user. We will use it
26083      # for the tool.
26084
26085      # First remove it from the list of overridden variables, so we can test
26086      # for unknown variables in the end.
26087      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26088
26089      # Check if the provided tool contains a complete path.
26090      tool_specified="$JARSIGNER"
26091      tool_basename="${tool_specified##*/}"
26092      if test "x$tool_basename" = "x$tool_specified"; then
26093        # A command without a complete path is provided, search $PATH.
26094        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26095$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26096        # Extract the first word of "$tool_basename", so it can be a program name with args.
26097set dummy $tool_basename; ac_word=$2
26098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26099$as_echo_n "checking for $ac_word... " >&6; }
26100if ${ac_cv_path_JARSIGNER+:} false; then :
26101  $as_echo_n "(cached) " >&6
26102else
26103  case $JARSIGNER in
26104  [\\/]* | ?:[\\/]*)
26105  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26106  ;;
26107  *)
26108  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26109for as_dir in $PATH
26110do
26111  IFS=$as_save_IFS
26112  test -z "$as_dir" && as_dir=.
26113    for ac_exec_ext in '' $ac_executable_extensions; do
26114  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26115    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26116    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26117    break 2
26118  fi
26119done
26120  done
26121IFS=$as_save_IFS
26122
26123  ;;
26124esac
26125fi
26126JARSIGNER=$ac_cv_path_JARSIGNER
26127if test -n "$JARSIGNER"; then
26128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26129$as_echo "$JARSIGNER" >&6; }
26130else
26131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26132$as_echo "no" >&6; }
26133fi
26134
26135
26136        if test "x$JARSIGNER" = x; then
26137          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26138        fi
26139      else
26140        # Otherwise we believe it is a complete path. Use it as it is.
26141        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26142$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26143        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26144$as_echo_n "checking for JARSIGNER... " >&6; }
26145        if test ! -x "$tool_specified"; then
26146          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26147$as_echo "not found" >&6; }
26148          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26149        fi
26150        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26151$as_echo "$tool_specified" >&6; }
26152      fi
26153    fi
26154  fi
26155
26156
26157
26158  # Finally, set some other options...
26159
26160  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26161  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26162
26163
26164
26165
26166###############################################################################
26167#
26168# Configure the sources to use. We can add or override individual directories.
26169#
26170###############################################################################
26171
26172
26173  # Where are the sources. Any of these can be overridden
26174  # using --with-override-corba and the likes.
26175  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26176  CORBA_TOPDIR="$SRC_ROOT/corba"
26177  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26178  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26179  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26180  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26181  JDK_TOPDIR="$SRC_ROOT/jdk"
26182
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192  ###############################################################################
26193  #
26194  # Pickup additional source for a component from outside of the source root
26195  # or override source for a component.
26196  #
26197
26198# Check whether --with-add-source-root was given.
26199if test "${with_add_source_root+set}" = set; then :
26200  withval=$with_add_source_root;
26201fi
26202
26203
26204
26205# Check whether --with-override-source-root was given.
26206if test "${with_override_source_root+set}" = set; then :
26207  withval=$with_override_source_root;
26208fi
26209
26210
26211
26212# Check whether --with-adds-and-overrides was given.
26213if test "${with_adds_and_overrides+set}" = set; then :
26214  withval=$with_adds_and_overrides;
26215fi
26216
26217
26218  if test "x$with_adds_and_overrides" != x; then
26219    with_add_source_root="$with_adds_and_overrides/adds"
26220    with_override_source_root="$with_adds_and_overrides/overrides"
26221  fi
26222
26223  if test "x$with_add_source_root" != x; then
26224    if ! test -d $with_add_source_root; then
26225      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26226    fi
26227    CURDIR="$PWD"
26228    cd "$with_add_source_root"
26229    ADD_SRC_ROOT="`pwd`"
26230    cd "$CURDIR"
26231    # Verify that the addon source root does not have any root makefiles.
26232    # If it does, then it is usually an error, prevent this.
26233    if test -f $with_add_source_root/langtools/make/Makefile; then
26234      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
26235    fi
26236    if test -f $with_add_source_root/corba/make/Makefile; then
26237      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
26238    fi
26239    if test -f $with_add_source_root/jaxp/make/Makefile; then
26240      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
26241    fi
26242    if test -f $with_add_source_root/jaxws/make/Makefile; then
26243      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
26244    fi
26245    if test -f $with_add_source_root/hotspot/make/Makefile; then
26246      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
26247    fi
26248    if test -f $with_add_source_root/nashorn/make/Makefile; then
26249      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
26250    fi
26251    if test -f $with_add_source_root/jdk/make/Makefile; then
26252      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
26253    fi
26254  fi
26255
26256
26257  if test "x$with_override_source_root" != x; then
26258    if ! test -d $with_override_source_root; then
26259      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26260    fi
26261    CURDIR="$PWD"
26262    cd "$with_override_source_root"
26263    OVERRIDE_SRC_ROOT="`pwd`"
26264    cd "$CURDIR"
26265    if test -f $with_override_source_root/langtools/make/Makefile; then
26266      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
26267    fi
26268    if test -f $with_override_source_root/corba/make/Makefile; then
26269      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
26270    fi
26271    if test -f $with_override_source_root/jaxp/make/Makefile; then
26272      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
26273    fi
26274    if test -f $with_override_source_root/jaxws/make/Makefile; then
26275      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
26276    fi
26277    if test -f $with_override_source_root/hotspot/make/Makefile; then
26278      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
26279    fi
26280    if test -f $with_override_source_root/nashorn/make/Makefile; then
26281      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
26282    fi
26283    if test -f $with_override_source_root/jdk/make/Makefile; then
26284      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
26285    fi
26286  fi
26287
26288
26289  ###############################################################################
26290  #
26291  # Override a repo completely, this is used for example when you have 3 small
26292  # development sandboxes of the langtools sources and want to avoid having 3 full
26293  # OpenJDK sources checked out on disk.
26294  #
26295  # Assuming that the 3 langtools sandboxes are located here:
26296  # /home/fredrik/sandbox1/langtools
26297  # /home/fredrik/sandbox2/langtools
26298  # /home/fredrik/sandbox3/langtools
26299  #
26300  # From the source root you create build subdirs manually:
26301  #     mkdir -p build1 build2 build3
26302  # in each build directory run:
26303  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26304  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26305  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26306  #
26307
26308
26309# Check whether --with-override-langtools was given.
26310if test "${with_override_langtools+set}" = set; then :
26311  withval=$with_override_langtools;
26312fi
26313
26314
26315
26316# Check whether --with-override-corba was given.
26317if test "${with_override_corba+set}" = set; then :
26318  withval=$with_override_corba;
26319fi
26320
26321
26322
26323# Check whether --with-override-jaxp was given.
26324if test "${with_override_jaxp+set}" = set; then :
26325  withval=$with_override_jaxp;
26326fi
26327
26328
26329
26330# Check whether --with-override-jaxws was given.
26331if test "${with_override_jaxws+set}" = set; then :
26332  withval=$with_override_jaxws;
26333fi
26334
26335
26336
26337# Check whether --with-override-hotspot was given.
26338if test "${with_override_hotspot+set}" = set; then :
26339  withval=$with_override_hotspot;
26340fi
26341
26342
26343
26344# Check whether --with-override-nashorn was given.
26345if test "${with_override_nashorn+set}" = set; then :
26346  withval=$with_override_nashorn;
26347fi
26348
26349
26350
26351# Check whether --with-override-jdk was given.
26352if test "${with_override_jdk+set}" = set; then :
26353  withval=$with_override_jdk;
26354fi
26355
26356
26357  if test "x$with_override_langtools" != x; then
26358    CURDIR="$PWD"
26359    cd "$with_override_langtools"
26360    LANGTOOLS_TOPDIR="`pwd`"
26361    cd "$CURDIR"
26362    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26363      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26364    fi
26365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26366$as_echo_n "checking if langtools should be overridden... " >&6; }
26367    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26368$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26369  fi
26370  if test "x$with_override_corba" != x; then
26371    CURDIR="$PWD"
26372    cd "$with_override_corba"
26373    CORBA_TOPDIR="`pwd`"
26374    cd "$CURDIR"
26375    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26376      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26377    fi
26378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26379$as_echo_n "checking if corba should be overridden... " >&6; }
26380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26381$as_echo "yes with $CORBA_TOPDIR" >&6; }
26382  fi
26383  if test "x$with_override_jaxp" != x; then
26384    CURDIR="$PWD"
26385    cd "$with_override_jaxp"
26386    JAXP_TOPDIR="`pwd`"
26387    cd "$CURDIR"
26388    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26389      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26390    fi
26391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26392$as_echo_n "checking if jaxp should be overridden... " >&6; }
26393    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26394$as_echo "yes with $JAXP_TOPDIR" >&6; }
26395  fi
26396  if test "x$with_override_jaxws" != x; then
26397    CURDIR="$PWD"
26398    cd "$with_override_jaxws"
26399    JAXWS_TOPDIR="`pwd`"
26400    cd "$CURDIR"
26401    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26402      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26403    fi
26404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26405$as_echo_n "checking if jaxws should be overridden... " >&6; }
26406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26407$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26408  fi
26409  if test "x$with_override_hotspot" != x; then
26410    CURDIR="$PWD"
26411    cd "$with_override_hotspot"
26412    HOTSPOT_TOPDIR="`pwd`"
26413    cd "$CURDIR"
26414    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26415      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26416    fi
26417    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26418$as_echo_n "checking if hotspot should be overridden... " >&6; }
26419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26420$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26421  fi
26422  if test "x$with_override_nashorn" != x; then
26423    CURDIR="$PWD"
26424    cd "$with_override_nashorn"
26425    NASHORN_TOPDIR="`pwd`"
26426    cd "$CURDIR"
26427    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26428      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26429    fi
26430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26431$as_echo_n "checking if nashorn should be overridden... " >&6; }
26432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26433$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26434  fi
26435  if test "x$with_override_jdk" != x; then
26436    CURDIR="$PWD"
26437    cd "$with_override_jdk"
26438    JDK_TOPDIR="`pwd`"
26439    cd "$CURDIR"
26440    if ! test -f $JDK_TOPDIR/make/Makefile; then
26441      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26442    fi
26443    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26444$as_echo_n "checking if JDK should be overridden... " >&6; }
26445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26446$as_echo "yes with $JDK_TOPDIR" >&6; }
26447  fi
26448
26449
26450  BUILD_OUTPUT="$OUTPUT_ROOT"
26451
26452
26453  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26454  BUILD_HOTSPOT=true
26455
26456
26457
26458# Check whether --with-import-hotspot was given.
26459if test "${with_import_hotspot+set}" = set; then :
26460  withval=$with_import_hotspot;
26461fi
26462
26463  if test "x$with_import_hotspot" != x; then
26464    CURDIR="$PWD"
26465    cd "$with_import_hotspot"
26466    HOTSPOT_DIST="`pwd`"
26467    cd "$CURDIR"
26468    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26469      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26470    fi
26471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26472$as_echo_n "checking if hotspot should be imported... " >&6; }
26473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26474$as_echo "yes from $HOTSPOT_DIST" >&6; }
26475    BUILD_HOTSPOT=false
26476  fi
26477
26478  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26479
26480
26481###############################################################################
26482#
26483# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26484# native code.
26485#
26486###############################################################################
26487
26488# First determine the toolchain type (compiler family)
26489
26490
26491# Check whether --with-toolchain-type was given.
26492if test "${with_toolchain_type+set}" = set; then :
26493  withval=$with_toolchain_type;
26494fi
26495
26496
26497  # Use indirect variable referencing
26498  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26499  VALID_TOOLCHAINS=${!toolchain_var_name}
26500
26501  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26502    if test -n "$XCODEBUILD"; then
26503      # On Mac OS X, default toolchain to clang after Xcode 5
26504      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26505      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26506      if test $? -ne 0; then
26507        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26508      fi
26509      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26510          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26511          $CUT -f 1 -d .`
26512      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26513$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26514      if test $XCODE_MAJOR_VERSION -ge 5; then
26515          DEFAULT_TOOLCHAIN="clang"
26516      else
26517          DEFAULT_TOOLCHAIN="gcc"
26518      fi
26519    else
26520      # If Xcode is not installed, but the command line tools are
26521      # then we can't run xcodebuild. On these systems we should
26522      # default to clang
26523      DEFAULT_TOOLCHAIN="clang"
26524    fi
26525  else
26526    # First toolchain type in the list is the default
26527    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26528  fi
26529
26530  if test "x$with_toolchain_type" = xlist; then
26531    # List all toolchains
26532    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26533$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26534    for toolchain in $VALID_TOOLCHAINS; do
26535      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26536      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26537      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26538    done
26539
26540    exit 0
26541  elif test "x$with_toolchain_type" != x; then
26542    # User override; check that it is valid
26543    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26544      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26545$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26546      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26547$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26548      as_fn_error $? "Cannot continue." "$LINENO" 5
26549    fi
26550    TOOLCHAIN_TYPE=$with_toolchain_type
26551  else
26552    # No flag given, use default
26553    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26554  fi
26555
26556
26557  TOOLCHAIN_CC_BINARY_clang="clang"
26558  TOOLCHAIN_CC_BINARY_gcc="gcc"
26559  TOOLCHAIN_CC_BINARY_microsoft="cl"
26560  TOOLCHAIN_CC_BINARY_solstudio="cc"
26561  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26562
26563  TOOLCHAIN_CXX_BINARY_clang="clang++"
26564  TOOLCHAIN_CXX_BINARY_gcc="g++"
26565  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26566  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26567  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26568
26569  # Use indirect variable referencing
26570  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26571  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26572  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26573  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26574  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26575  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26576
26577
26578  # Define filename patterns
26579  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26580    LIBRARY_PREFIX=
26581    SHARED_LIBRARY_SUFFIX='.dll'
26582    STATIC_LIBRARY_SUFFIX='.lib'
26583    SHARED_LIBRARY='$1.dll'
26584    STATIC_LIBRARY='$1.lib'
26585    OBJ_SUFFIX='.obj'
26586    EXE_SUFFIX='.exe'
26587  else
26588    LIBRARY_PREFIX=lib
26589    SHARED_LIBRARY_SUFFIX='.so'
26590    STATIC_LIBRARY_SUFFIX='.a'
26591    SHARED_LIBRARY='lib$1.so'
26592    STATIC_LIBRARY='lib$1.a'
26593    OBJ_SUFFIX='.o'
26594    EXE_SUFFIX=''
26595    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26596      SHARED_LIBRARY='lib$1.dylib'
26597      SHARED_LIBRARY_SUFFIX='.dylib'
26598    fi
26599  fi
26600
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26611    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26612$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26613  else
26614    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26615$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26616  fi
26617
26618
26619# Then detect the actual binaries needed
26620
26621  # FIXME: Is this needed?
26622  ac_ext=cpp
26623ac_cpp='$CXXCPP $CPPFLAGS'
26624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26627
26628
26629  # Store the CFLAGS etc passed to the configure script.
26630  ORG_CFLAGS="$CFLAGS"
26631  ORG_CXXFLAGS="$CXXFLAGS"
26632
26633  # On Windows, we need to detect the visual studio installation first.
26634  # This will change the PATH, but we need to keep that new PATH even
26635  # after toolchain detection is done, since the compiler (on x86) uses
26636  # it for DLL resolution in runtime.
26637  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26638
26639  # Store path to cygwin link.exe to help excluding it when searching for
26640  # VS linker. This must be done before changing the PATH when looking for VS.
26641  # Extract the first word of "link", so it can be a program name with args.
26642set dummy link; ac_word=$2
26643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26644$as_echo_n "checking for $ac_word... " >&6; }
26645if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26646  $as_echo_n "(cached) " >&6
26647else
26648  case $CYGWIN_LINK in
26649  [\\/]* | ?:[\\/]*)
26650  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26651  ;;
26652  *)
26653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26654for as_dir in $PATH
26655do
26656  IFS=$as_save_IFS
26657  test -z "$as_dir" && as_dir=.
26658    for ac_exec_ext in '' $ac_executable_extensions; do
26659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26660    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26662    break 2
26663  fi
26664done
26665  done
26666IFS=$as_save_IFS
26667
26668  ;;
26669esac
26670fi
26671CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26672if test -n "$CYGWIN_LINK"; then
26673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26674$as_echo "$CYGWIN_LINK" >&6; }
26675else
26676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26677$as_echo "no" >&6; }
26678fi
26679
26680
26681  if test "x$CYGWIN_LINK" != x; then
26682    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26683$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26684    "$CYGWIN_LINK" --version > /dev/null
26685    if test $? -eq 0 ; then
26686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26687$as_echo "yes" >&6; }
26688    else
26689      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26690$as_echo "no" >&6; }
26691      # This might be the VS linker. Don't exclude it later on.
26692      CYGWIN_LINK=""
26693    fi
26694  fi
26695
26696  # First-hand choice is to locate and run the vsvars bat file.
26697
26698
26699# Check whether --with-toolchain-version was given.
26700if test "${with_toolchain_version+set}" = set; then :
26701  withval=$with_toolchain_version;
26702fi
26703
26704
26705  if test "x$with_toolchain_version" = xlist; then
26706    # List all toolchains
26707    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26708$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26709    for version in $VALID_VS_VERSIONS; do
26710      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26711      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26712    done
26713
26714    exit 0
26715  elif test "x$with_toolchain_version" != x; then
26716    # User override; check that it is valid
26717    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26718      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26719$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26720      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26721$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26722      as_fn_error $? "Cannot continue." "$LINENO" 5
26723    fi
26724    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26725  else
26726    # No flag given, use default
26727    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26728  fi
26729
26730  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26731
26732  VS_VERSION="$VS_VERSION"
26733  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26734  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26735  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26736  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26737
26738  # When using --with-tools-dir, assume it points to the correct and default
26739  # version of Visual Studio or that --with-toolchain-version was also set.
26740  if test "x$with_tools_dir" != x; then
26741
26742  if test "x$VS_ENV_CMD" = x; then
26743    VS_VERSION="${VS_VERSION}"
26744    VS_BASE="$with_tools_dir/../.."
26745    METHOD="--with-tools-dir"
26746
26747    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26748      VCVARSFILE="vc/bin/vcvars32.bat"
26749    else
26750      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26751    fi
26752
26753
26754  windows_path="$VS_BASE"
26755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26756    unix_path=`$CYGPATH -u "$windows_path"`
26757    VS_BASE="$unix_path"
26758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26760    VS_BASE="$unix_path"
26761  fi
26762
26763    if test -d "$VS_BASE"; then
26764      if test -f "$VS_BASE/$VCVARSFILE"; then
26765        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26766$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26767        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26768        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26769        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26770        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26771      else
26772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26773$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26774        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26775$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26776      fi
26777    fi
26778  fi
26779
26780
26781  if test "x$VS_ENV_CMD" = x; then
26782    VS_VERSION="${VS_VERSION}"
26783    VS_BASE="$with_tools_dir/../../.."
26784    METHOD="--with-tools-dir"
26785
26786    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26787      VCVARSFILE="vc/bin/vcvars32.bat"
26788    else
26789      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26790    fi
26791
26792
26793  windows_path="$VS_BASE"
26794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26795    unix_path=`$CYGPATH -u "$windows_path"`
26796    VS_BASE="$unix_path"
26797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26799    VS_BASE="$unix_path"
26800  fi
26801
26802    if test -d "$VS_BASE"; then
26803      if test -f "$VS_BASE/$VCVARSFILE"; then
26804        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26805$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26806        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26807        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26808        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26809        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26810      else
26811        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26812$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26813        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26814$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26815      fi
26816    fi
26817  fi
26818
26819    if test "x$VS_ENV_CMD" = x; then
26820      # Having specified an argument which is incorrect will produce an instant failure;
26821      # we should not go on looking
26822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26823$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26824      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26825$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26826      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26827$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26828      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26829    fi
26830  fi
26831
26832  VS_ENV_CMD=""
26833  VS_ENV_ARGS=""
26834
26835  if test "x$VS_COMNTOOLS" != x; then
26836
26837  if test "x$VS_ENV_CMD" = x; then
26838    VS_VERSION="${VS_VERSION}"
26839    VS_BASE="$VS_COMNTOOLS/../.."
26840    METHOD="$VS_COMNTOOLS_VAR variable"
26841
26842    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26843      VCVARSFILE="vc/bin/vcvars32.bat"
26844    else
26845      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26846    fi
26847
26848
26849  windows_path="$VS_BASE"
26850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26851    unix_path=`$CYGPATH -u "$windows_path"`
26852    VS_BASE="$unix_path"
26853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26855    VS_BASE="$unix_path"
26856  fi
26857
26858    if test -d "$VS_BASE"; then
26859      if test -f "$VS_BASE/$VCVARSFILE"; then
26860        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26861$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26862        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26863        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26864        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26865        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26866      else
26867        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26868$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26869        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26870$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26871      fi
26872    fi
26873  fi
26874
26875  fi
26876  if test "x$PROGRAMFILES" != x; then
26877
26878  if test "x$VS_ENV_CMD" = x; then
26879    VS_VERSION="${VS_VERSION}"
26880    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26881    METHOD="well-known name"
26882
26883    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26884      VCVARSFILE="vc/bin/vcvars32.bat"
26885    else
26886      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26887    fi
26888
26889
26890  windows_path="$VS_BASE"
26891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26892    unix_path=`$CYGPATH -u "$windows_path"`
26893    VS_BASE="$unix_path"
26894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26896    VS_BASE="$unix_path"
26897  fi
26898
26899    if test -d "$VS_BASE"; then
26900      if test -f "$VS_BASE/$VCVARSFILE"; then
26901        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26902$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26903        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26904        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26905        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26906        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26907      else
26908        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26909$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26910        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26911$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26912      fi
26913    fi
26914  fi
26915
26916  fi
26917  # Work around the insanely named ProgramFiles(x86) env variable
26918  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26919  if test "x$PROGRAMFILES_X86" != x; then
26920
26921  if test "x$VS_ENV_CMD" = x; then
26922    VS_VERSION="${VS_VERSION}"
26923    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26924    METHOD="well-known name"
26925
26926    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26927      VCVARSFILE="vc/bin/vcvars32.bat"
26928    else
26929      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26930    fi
26931
26932
26933  windows_path="$VS_BASE"
26934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26935    unix_path=`$CYGPATH -u "$windows_path"`
26936    VS_BASE="$unix_path"
26937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26939    VS_BASE="$unix_path"
26940  fi
26941
26942    if test -d "$VS_BASE"; then
26943      if test -f "$VS_BASE/$VCVARSFILE"; then
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        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26947        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26948        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26949        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26950      else
26951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26952$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26953        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26954$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26955      fi
26956    fi
26957  fi
26958
26959  fi
26960
26961  if test "x$VS_ENV_CMD" = x; then
26962    VS_VERSION="${VS_VERSION}"
26963    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26964    METHOD="well-known name"
26965
26966    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26967      VCVARSFILE="vc/bin/vcvars32.bat"
26968    else
26969      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26970    fi
26971
26972
26973  windows_path="$VS_BASE"
26974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26975    unix_path=`$CYGPATH -u "$windows_path"`
26976    VS_BASE="$unix_path"
26977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26979    VS_BASE="$unix_path"
26980  fi
26981
26982    if test -d "$VS_BASE"; then
26983      if test -f "$VS_BASE/$VCVARSFILE"; then
26984        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26985$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26986        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26987        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26988        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26989        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26990      else
26991        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26992$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26993        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26994$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26995      fi
26996    fi
26997  fi
26998
26999
27000  if test "x$VS_ENV_CMD" = x; then
27001    VS_VERSION="${VS_VERSION}"
27002    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27003    METHOD="well-known name"
27004
27005    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27006      VCVARSFILE="vc/bin/vcvars32.bat"
27007    else
27008      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27009    fi
27010
27011
27012  windows_path="$VS_BASE"
27013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27014    unix_path=`$CYGPATH -u "$windows_path"`
27015    VS_BASE="$unix_path"
27016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27018    VS_BASE="$unix_path"
27019  fi
27020
27021    if test -d "$VS_BASE"; then
27022      if test -f "$VS_BASE/$VCVARSFILE"; then
27023        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27024$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27025        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27026        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27027        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27028        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27029      else
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27031$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27033$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27034      fi
27035    fi
27036  fi
27037
27038
27039  if test "x$SDK_INSTALL_DIR" != x; then
27040    if test "x$ProgramW6432" != x; then
27041
27042  if test "x$VS_ENV_CMD" = x; then
27043    VS_VERSION="${VS_VERSION}"
27044    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27045    METHOD="well-known name"
27046
27047  windows_path="$WIN_SDK_BASE"
27048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27049    unix_path=`$CYGPATH -u "$windows_path"`
27050    WIN_SDK_BASE="$unix_path"
27051  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27052    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27053    WIN_SDK_BASE="$unix_path"
27054  fi
27055
27056    if test -d "$WIN_SDK_BASE"; then
27057      # There have been cases of partial or broken SDK installations. A missing
27058      # lib dir is not going to work.
27059      if test ! -d "$WIN_SDK_BASE/lib"; then
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27061$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27062        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27063$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27064      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27065        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27066$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27067        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27068        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27069          VS_ENV_ARGS="/x86"
27070        else
27071          VS_ENV_ARGS="/x64"
27072        fi
27073        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27074        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27075        # TODO: improve detection for other versions of SDK
27076        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27077      else
27078        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27079$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27080        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27081$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27082      fi
27083    fi
27084  fi
27085
27086    fi
27087    if test "x$PROGRAMW6432" != x; then
27088
27089  if test "x$VS_ENV_CMD" = x; then
27090    VS_VERSION="${VS_VERSION}"
27091    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27092    METHOD="well-known name"
27093
27094  windows_path="$WIN_SDK_BASE"
27095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27096    unix_path=`$CYGPATH -u "$windows_path"`
27097    WIN_SDK_BASE="$unix_path"
27098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27100    WIN_SDK_BASE="$unix_path"
27101  fi
27102
27103    if test -d "$WIN_SDK_BASE"; then
27104      # There have been cases of partial or broken SDK installations. A missing
27105      # lib dir is not going to work.
27106      if test ! -d "$WIN_SDK_BASE/lib"; then
27107        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27108$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27109        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27110$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27111      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27113$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27114        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27115        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27116          VS_ENV_ARGS="/x86"
27117        else
27118          VS_ENV_ARGS="/x64"
27119        fi
27120        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27121        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27122        # TODO: improve detection for other versions of SDK
27123        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27124      else
27125        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27126$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27127        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27128$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27129      fi
27130    fi
27131  fi
27132
27133    fi
27134    if test "x$PROGRAMFILES" != x; then
27135
27136  if test "x$VS_ENV_CMD" = x; then
27137    VS_VERSION="${VS_VERSION}"
27138    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27139    METHOD="well-known name"
27140
27141  windows_path="$WIN_SDK_BASE"
27142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27143    unix_path=`$CYGPATH -u "$windows_path"`
27144    WIN_SDK_BASE="$unix_path"
27145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27147    WIN_SDK_BASE="$unix_path"
27148  fi
27149
27150    if test -d "$WIN_SDK_BASE"; then
27151      # There have been cases of partial or broken SDK installations. A missing
27152      # lib dir is not going to work.
27153      if test ! -d "$WIN_SDK_BASE/lib"; then
27154        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27155$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27156        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27157$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27158      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27159        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27160$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27161        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27162        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27163          VS_ENV_ARGS="/x86"
27164        else
27165          VS_ENV_ARGS="/x64"
27166        fi
27167        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27168        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27169        # TODO: improve detection for other versions of SDK
27170        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27171      else
27172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27174        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27175$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27176      fi
27177    fi
27178  fi
27179
27180    fi
27181
27182  if test "x$VS_ENV_CMD" = x; then
27183    VS_VERSION="${VS_VERSION}"
27184    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27185    METHOD="well-known name"
27186
27187  windows_path="$WIN_SDK_BASE"
27188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27189    unix_path=`$CYGPATH -u "$windows_path"`
27190    WIN_SDK_BASE="$unix_path"
27191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27193    WIN_SDK_BASE="$unix_path"
27194  fi
27195
27196    if test -d "$WIN_SDK_BASE"; then
27197      # There have been cases of partial or broken SDK installations. A missing
27198      # lib dir is not going to work.
27199      if test ! -d "$WIN_SDK_BASE/lib"; then
27200        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27201$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27202        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27203$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27204      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27205        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27206$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27207        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27208        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27209          VS_ENV_ARGS="/x86"
27210        else
27211          VS_ENV_ARGS="/x64"
27212        fi
27213        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27214        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27215        # TODO: improve detection for other versions of SDK
27216        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27217      else
27218        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27219$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27220        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27221$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27222      fi
27223    fi
27224  fi
27225
27226
27227  if test "x$VS_ENV_CMD" = x; then
27228    VS_VERSION="${VS_VERSION}"
27229    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27230    METHOD="well-known name"
27231
27232  windows_path="$WIN_SDK_BASE"
27233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27234    unix_path=`$CYGPATH -u "$windows_path"`
27235    WIN_SDK_BASE="$unix_path"
27236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27238    WIN_SDK_BASE="$unix_path"
27239  fi
27240
27241    if test -d "$WIN_SDK_BASE"; then
27242      # There have been cases of partial or broken SDK installations. A missing
27243      # lib dir is not going to work.
27244      if test ! -d "$WIN_SDK_BASE/lib"; then
27245        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27246$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27247        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27248$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27249      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27250        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27251$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27252        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27253        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27254          VS_ENV_ARGS="/x86"
27255        else
27256          VS_ENV_ARGS="/x64"
27257        fi
27258        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27259        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27260        # TODO: improve detection for other versions of SDK
27261        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27262      else
27263        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27264$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27265        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27266$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27267      fi
27268    fi
27269  fi
27270
27271  fi
27272
27273    if test "x$VS_ENV_CMD" != x; then
27274      TOOLCHAIN_VERSION=$VS_VERSION
27275      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27276      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27277      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27278      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27279      # The rest of the variables are already evaled while probing
27280      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27281$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27282      break
27283    fi
27284  done
27285
27286
27287  if test "x$VS_ENV_CMD" != x; then
27288    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27289
27290  # Only process if variable expands to non-empty
27291
27292  if test "x$VS_ENV_CMD" != x; then
27293    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27294
27295  # First separate the path from the arguments. This will split at the first
27296  # space.
27297  complete="$VS_ENV_CMD"
27298  path="${complete%% *}"
27299  tmp="$complete EOL"
27300  arguments="${tmp#* }"
27301
27302  # Input might be given as Windows format, start by converting to
27303  # unix format.
27304  new_path=`$CYGPATH -u "$path"`
27305
27306  # Now try to locate executable using which
27307  new_path=`$WHICH "$new_path" 2> /dev/null`
27308  # bat and cmd files are not always considered executable in cygwin causing which
27309  # to not find them
27310  if test "x$new_path" = x \
27311      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27312      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27313    new_path=`$CYGPATH -u "$path"`
27314  fi
27315  if test "x$new_path" = x; then
27316    # Oops. Which didn't find the executable.
27317    # The splitting of arguments from the executable at a space might have been incorrect,
27318    # since paths with space are more likely in Windows. Give it another try with the whole
27319    # argument.
27320    path="$complete"
27321    arguments="EOL"
27322    new_path=`$CYGPATH -u "$path"`
27323    new_path=`$WHICH "$new_path" 2> /dev/null`
27324    # bat and cmd files are not always considered executable in cygwin causing which
27325    # to not find them
27326    if test "x$new_path" = x \
27327        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27328        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27329      new_path=`$CYGPATH -u "$path"`
27330    fi
27331    if test "x$new_path" = x; then
27332      # It's still not found. Now this is an unrecoverable error.
27333      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27334$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27335      has_space=`$ECHO "$complete" | $GREP " "`
27336      if test "x$has_space" != x; then
27337        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27338$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27339      fi
27340      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27341    fi
27342  fi
27343
27344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27347  # "foo.exe" is OK but "foo" is an error.
27348  #
27349  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27350  # It is also a way to make sure we got the proper file name for the real test later on.
27351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27352  if test "x$test_shortpath" = x; then
27353    # Short path failed, file does not exist as specified.
27354    # Try adding .exe or .cmd
27355    if test -f "${new_path}.exe"; then
27356      input_to_shortpath="${new_path}.exe"
27357    elif test -f "${new_path}.cmd"; then
27358      input_to_shortpath="${new_path}.cmd"
27359    else
27360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27361$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27362      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27363$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27364      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27365    fi
27366  else
27367    input_to_shortpath="$new_path"
27368  fi
27369
27370  # Call helper function which possibly converts this using DOS-style short mode.
27371  # If so, the updated path is stored in $new_path.
27372  new_path="$input_to_shortpath"
27373
27374  input_path="$input_to_shortpath"
27375  # Check if we need to convert this using DOS-style short mode. If the path
27376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27377  # take no chances and rewrite it.
27378  # Note: m4 eats our [], so we need to use [ and ] instead.
27379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27380  if test "x$has_forbidden_chars" != x; then
27381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27385      # Going to short mode and back again did indeed matter. Since short mode is
27386      # case insensitive, let's make it lowercase to improve readability.
27387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27388      # Now convert it back to Unix-stile (cygpath)
27389      input_path=`$CYGPATH -u "$shortmode_path"`
27390      new_path="$input_path"
27391    fi
27392  fi
27393
27394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27395  if test "x$test_cygdrive_prefix" = x; then
27396    # As a simple fix, exclude /usr/bin since it's not a real path.
27397    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27399      # a path prefixed by /cygdrive for fixpath to work.
27400      new_path="$CYGWIN_ROOT_PATH$input_path"
27401    fi
27402  fi
27403
27404  # remove trailing .exe if any
27405  new_path="${new_path/%.exe/}"
27406
27407    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27408
27409  # First separate the path from the arguments. This will split at the first
27410  # space.
27411  complete="$VS_ENV_CMD"
27412  path="${complete%% *}"
27413  tmp="$complete EOL"
27414  arguments="${tmp#* }"
27415
27416  # Input might be given as Windows format, start by converting to
27417  # unix format.
27418  new_path="$path"
27419
27420  windows_path="$new_path"
27421  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27422    unix_path=`$CYGPATH -u "$windows_path"`
27423    new_path="$unix_path"
27424  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27425    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27426    new_path="$unix_path"
27427  fi
27428
27429
27430  # Now try to locate executable using which
27431  new_path=`$WHICH "$new_path" 2> /dev/null`
27432
27433  if test "x$new_path" = x; then
27434    # Oops. Which didn't find the executable.
27435    # The splitting of arguments from the executable at a space might have been incorrect,
27436    # since paths with space are more likely in Windows. Give it another try with the whole
27437    # argument.
27438    path="$complete"
27439    arguments="EOL"
27440    new_path="$path"
27441
27442  windows_path="$new_path"
27443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27444    unix_path=`$CYGPATH -u "$windows_path"`
27445    new_path="$unix_path"
27446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27448    new_path="$unix_path"
27449  fi
27450
27451
27452    new_path=`$WHICH "$new_path" 2> /dev/null`
27453    # bat and cmd files are not always considered executable in MSYS causing which
27454    # to not find them
27455    if test "x$new_path" = x \
27456        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27457        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27458      new_path="$path"
27459
27460  windows_path="$new_path"
27461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27462    unix_path=`$CYGPATH -u "$windows_path"`
27463    new_path="$unix_path"
27464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27466    new_path="$unix_path"
27467  fi
27468
27469    fi
27470
27471    if test "x$new_path" = x; then
27472      # It's still not found. Now this is an unrecoverable error.
27473      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27474$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27475      has_space=`$ECHO "$complete" | $GREP " "`
27476      if test "x$has_space" != x; then
27477        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27478$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27479      fi
27480      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27481    fi
27482  fi
27483
27484  # Now new_path has a complete unix path to the binary
27485  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27486    # Keep paths in /bin as-is, but remove trailing .exe if any
27487    new_path="${new_path/%.exe/}"
27488    # Do not save /bin paths to all_fixpath_prefixes!
27489  else
27490    # Not in mixed or Windows style, start by that.
27491    new_path=`cmd //c echo $new_path`
27492
27493  input_path="$new_path"
27494  # Check if we need to convert this using DOS-style short mode. If the path
27495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27496  # take no chances and rewrite it.
27497  # Note: m4 eats our [], so we need to use [ and ] instead.
27498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27499  if test "x$has_forbidden_chars" != x; then
27500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27501    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27502  fi
27503
27504    # Output is in $new_path
27505
27506  windows_path="$new_path"
27507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27508    unix_path=`$CYGPATH -u "$windows_path"`
27509    new_path="$unix_path"
27510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27512    new_path="$unix_path"
27513  fi
27514
27515    # remove trailing .exe if any
27516    new_path="${new_path/%.exe/}"
27517
27518    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27519    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27520  fi
27521
27522    else
27523      # We're on a unix platform. Hooray! :)
27524      # First separate the path from the arguments. This will split at the first
27525      # space.
27526      complete="$VS_ENV_CMD"
27527      path="${complete%% *}"
27528      tmp="$complete EOL"
27529      arguments="${tmp#* }"
27530
27531      # Cannot rely on the command "which" here since it doesn't always work.
27532      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27533      if test -z "$is_absolute_path"; then
27534        # Path to executable is not absolute. Find it.
27535        IFS_save="$IFS"
27536        IFS=:
27537        for p in $PATH; do
27538          if test -f "$p/$path" && test -x "$p/$path"; then
27539            new_path="$p/$path"
27540            break
27541          fi
27542        done
27543        IFS="$IFS_save"
27544      else
27545        # This is an absolute path, we can use it without further modifications.
27546        new_path="$path"
27547      fi
27548
27549      if test "x$new_path" = x; then
27550        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27551$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27552        has_space=`$ECHO "$complete" | $GREP " "`
27553        if test "x$has_space" != x; then
27554          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27555$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27556        fi
27557        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27558      fi
27559    fi
27560
27561    # Now join together the path and the arguments once again
27562    if test "x$arguments" != xEOL; then
27563      new_complete="$new_path ${arguments% *}"
27564    else
27565      new_complete="$new_path"
27566    fi
27567
27568    if test "x$complete" != "x$new_complete"; then
27569      VS_ENV_CMD="$new_complete"
27570      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27571$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27572    fi
27573  fi
27574
27575
27576    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27577    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27578$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27579
27580    # We need to create a couple of temporary files.
27581    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27582    $MKDIR -p $VS_ENV_TMP_DIR
27583
27584    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27585    # Instead create a shell script which will set the relevant variables when run.
27586    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27587
27588  unix_path="$WINPATH_VS_ENV_CMD"
27589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27590    windows_path=`$CYGPATH -m "$unix_path"`
27591    WINPATH_VS_ENV_CMD="$windows_path"
27592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27593    windows_path=`cmd //c echo $unix_path`
27594    WINPATH_VS_ENV_CMD="$windows_path"
27595  fi
27596
27597    WINPATH_BASH="$BASH"
27598
27599  unix_path="$WINPATH_BASH"
27600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27601    windows_path=`$CYGPATH -m "$unix_path"`
27602    WINPATH_BASH="$windows_path"
27603  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27604    windows_path=`cmd //c echo $unix_path`
27605    WINPATH_BASH="$windows_path"
27606  fi
27607
27608
27609    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27610    # script (executable by bash) that will setup the important variables.
27611    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27612    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27613    # This will end up something like:
27614    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27615    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27616    # These will end up something like:
27617    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27618    # The trailing space for everyone except PATH is no typo, but is needed due
27619    # to trailing \ in the Windows paths. These will be stripped later.
27620    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27621    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27622    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27623    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27624    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27625    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27626
27627    # Now execute the newly created bat file.
27628    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27629    # Change directory so we don't need to mess with Windows paths in redirects.
27630    cd $VS_ENV_TMP_DIR
27631    cmd /c extract-vs-env.bat | $CAT
27632    cd $CURDIR
27633
27634    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27635      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27636$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27637      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27638$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27639      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27640$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27641      as_fn_error $? "Cannot continue" "$LINENO" 5
27642    fi
27643
27644    # Now set all paths and other env variables. This will allow the rest of
27645    # the configure script to find and run the compiler in the proper way.
27646    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27647$as_echo "$as_me: Setting extracted environment variables" >&6;}
27648    . $VS_ENV_TMP_DIR/set-vs-env.sh
27649    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27650    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27651  else
27652    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27653    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27654$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27655  fi
27656
27657  # At this point, we should have correct variables in the environment, or we can't continue.
27658  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27659$as_echo_n "checking for Visual Studio variables... " >&6; }
27660
27661  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27662    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27664$as_echo "present but broken" >&6; }
27665      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27666    else
27667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27668$as_echo "ok" >&6; }
27669      # Remove any trailing "\" ";" and " " from the variables.
27670      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27671      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27672      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27673      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27674      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27675      # Remove any paths containing # (typically F#) as that messes up make. This
27676      # is needed if visual studio was installed with F# support.
27677      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27678
27679
27680
27681
27682
27683      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27684      OLDIFS="$IFS"
27685      IFS=";"
27686      for i in $VS_INCLUDE; do
27687        ipath=$i
27688        # Only process non-empty elements
27689        if test "x$ipath" != x; then
27690          IFS="$OLDIFS"
27691          # Check that directory exists before calling fixup_path
27692          testpath=$ipath
27693
27694  windows_path="$testpath"
27695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27696    unix_path=`$CYGPATH -u "$windows_path"`
27697    testpath="$unix_path"
27698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27700    testpath="$unix_path"
27701  fi
27702
27703          if test -d "$testpath"; then
27704
27705  # Only process if variable expands to non-empty
27706
27707  if test "x$ipath" != x; then
27708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27709
27710  # Input might be given as Windows format, start by converting to
27711  # unix format.
27712  path="$ipath"
27713  new_path=`$CYGPATH -u "$path"`
27714
27715  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27716  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27717  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27718  # "foo.exe" is OK but "foo" is an error.
27719  #
27720  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27721  # It is also a way to make sure we got the proper file name for the real test later on.
27722  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27723  if test "x$test_shortpath" = x; then
27724    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27725$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27726    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27727  fi
27728
27729  # Call helper function which possibly converts this using DOS-style short mode.
27730  # If so, the updated path is stored in $new_path.
27731
27732  input_path="$new_path"
27733  # Check if we need to convert this using DOS-style short mode. If the path
27734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27735  # take no chances and rewrite it.
27736  # Note: m4 eats our [], so we need to use [ and ] instead.
27737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27738  if test "x$has_forbidden_chars" != x; then
27739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27743      # Going to short mode and back again did indeed matter. Since short mode is
27744      # case insensitive, let's make it lowercase to improve readability.
27745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27746      # Now convert it back to Unix-stile (cygpath)
27747      input_path=`$CYGPATH -u "$shortmode_path"`
27748      new_path="$input_path"
27749    fi
27750  fi
27751
27752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27753  if test "x$test_cygdrive_prefix" = x; then
27754    # As a simple fix, exclude /usr/bin since it's not a real path.
27755    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27757      # a path prefixed by /cygdrive for fixpath to work.
27758      new_path="$CYGWIN_ROOT_PATH$input_path"
27759    fi
27760  fi
27761
27762
27763  if test "x$path" != "x$new_path"; then
27764    ipath="$new_path"
27765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27766$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27767  fi
27768
27769    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27770
27771  path="$ipath"
27772  has_colon=`$ECHO $path | $GREP ^.:`
27773  new_path="$path"
27774  if test "x$has_colon" = x; then
27775    # Not in mixed or Windows style, start by that.
27776    new_path=`cmd //c echo $path`
27777  fi
27778
27779
27780  input_path="$new_path"
27781  # Check if we need to convert this using DOS-style short mode. If the path
27782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27783  # take no chances and rewrite it.
27784  # Note: m4 eats our [], so we need to use [ and ] instead.
27785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27786  if test "x$has_forbidden_chars" != x; then
27787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27788    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27789  fi
27790
27791
27792  windows_path="$new_path"
27793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27794    unix_path=`$CYGPATH -u "$windows_path"`
27795    new_path="$unix_path"
27796  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27797    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27798    new_path="$unix_path"
27799  fi
27800
27801  if test "x$path" != "x$new_path"; then
27802    ipath="$new_path"
27803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27804$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27805  fi
27806
27807  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27808  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27809
27810    else
27811      # We're on a unix platform. Hooray! :)
27812      path="$ipath"
27813      has_space=`$ECHO "$path" | $GREP " "`
27814      if test "x$has_space" != x; then
27815        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27816$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27817        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27818      fi
27819
27820      # Use eval to expand a potential ~
27821      eval path="$path"
27822      if test ! -f "$path" && test ! -d "$path"; then
27823        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27824      fi
27825
27826      ipath="`cd "$path"; $THEPWDCMD -L`"
27827    fi
27828  fi
27829
27830            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27831          fi
27832          IFS=";"
27833        fi
27834      done
27835      # Convert VS_LIB into SYSROOT_LDFLAGS
27836      for i in $VS_LIB; do
27837        libpath=$i
27838        # Only process non-empty elements
27839        if test "x$libpath" != x; then
27840          IFS="$OLDIFS"
27841          # Check that directory exists before calling fixup_path
27842          testpath=$libpath
27843
27844  windows_path="$testpath"
27845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27846    unix_path=`$CYGPATH -u "$windows_path"`
27847    testpath="$unix_path"
27848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27850    testpath="$unix_path"
27851  fi
27852
27853          if test -d "$testpath"; then
27854
27855  # Only process if variable expands to non-empty
27856
27857  if test "x$libpath" != x; then
27858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27859
27860  # Input might be given as Windows format, start by converting to
27861  # unix format.
27862  path="$libpath"
27863  new_path=`$CYGPATH -u "$path"`
27864
27865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27868  # "foo.exe" is OK but "foo" is an error.
27869  #
27870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27871  # It is also a way to make sure we got the proper file name for the real test later on.
27872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27873  if test "x$test_shortpath" = x; then
27874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27875$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27876    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27877  fi
27878
27879  # Call helper function which possibly converts this using DOS-style short mode.
27880  # If so, the updated path is stored in $new_path.
27881
27882  input_path="$new_path"
27883  # Check if we need to convert this using DOS-style short mode. If the path
27884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27885  # take no chances and rewrite it.
27886  # Note: m4 eats our [], so we need to use [ and ] instead.
27887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27888  if test "x$has_forbidden_chars" != x; then
27889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27893      # Going to short mode and back again did indeed matter. Since short mode is
27894      # case insensitive, let's make it lowercase to improve readability.
27895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27896      # Now convert it back to Unix-stile (cygpath)
27897      input_path=`$CYGPATH -u "$shortmode_path"`
27898      new_path="$input_path"
27899    fi
27900  fi
27901
27902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27903  if test "x$test_cygdrive_prefix" = x; then
27904    # As a simple fix, exclude /usr/bin since it's not a real path.
27905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27907      # a path prefixed by /cygdrive for fixpath to work.
27908      new_path="$CYGWIN_ROOT_PATH$input_path"
27909    fi
27910  fi
27911
27912
27913  if test "x$path" != "x$new_path"; then
27914    libpath="$new_path"
27915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27916$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27917  fi
27918
27919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27920
27921  path="$libpath"
27922  has_colon=`$ECHO $path | $GREP ^.:`
27923  new_path="$path"
27924  if test "x$has_colon" = x; then
27925    # Not in mixed or Windows style, start by that.
27926    new_path=`cmd //c echo $path`
27927  fi
27928
27929
27930  input_path="$new_path"
27931  # Check if we need to convert this using DOS-style short mode. If the path
27932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27933  # take no chances and rewrite it.
27934  # Note: m4 eats our [], so we need to use [ and ] instead.
27935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27936  if test "x$has_forbidden_chars" != x; then
27937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27939  fi
27940
27941
27942  windows_path="$new_path"
27943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27944    unix_path=`$CYGPATH -u "$windows_path"`
27945    new_path="$unix_path"
27946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27948    new_path="$unix_path"
27949  fi
27950
27951  if test "x$path" != "x$new_path"; then
27952    libpath="$new_path"
27953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27954$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27955  fi
27956
27957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27959
27960    else
27961      # We're on a unix platform. Hooray! :)
27962      path="$libpath"
27963      has_space=`$ECHO "$path" | $GREP " "`
27964      if test "x$has_space" != x; then
27965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27966$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27967        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27968      fi
27969
27970      # Use eval to expand a potential ~
27971      eval path="$path"
27972      if test ! -f "$path" && test ! -d "$path"; then
27973        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
27974      fi
27975
27976      libpath="`cd "$path"; $THEPWDCMD -L`"
27977    fi
27978  fi
27979
27980            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
27981          fi
27982          IFS=";"
27983        fi
27984      done
27985      IFS="$OLDIFS"
27986    fi
27987  else
27988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27989$as_echo "not found" >&6; }
27990
27991    if test "x$VS_ENV_CMD" = x; then
27992      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27993$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27994      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27995$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27996    else
27997      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27998$as_echo "$as_me: Running the extraction script failed." >&6;}
27999    fi
28000    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28001$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28002    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28003$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28004    as_fn_error $? "Cannot continue" "$LINENO" 5
28005  fi
28006
28007    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28008    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28009    PATH="$VS_PATH"
28010    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28011    export INCLUDE="$VS_INCLUDE"
28012    export LIB="$VS_LIB"
28013  fi
28014
28015  # autoconf magic only relies on PATH, so update it if tools dir is specified
28016  OLD_PATH="$PATH"
28017
28018  # For solaris we really need solaris tools, and not the GNU equivalent.
28019  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28020  # so add that to path before starting to probe.
28021  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
28022  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28023    PATH="/usr/ccs/bin:$PATH"
28024  fi
28025
28026  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28027  # override all other locations.
28028  if test "x$TOOLCHAIN_PATH" != x; then
28029    PATH=$TOOLCHAIN_PATH:$PATH
28030  fi
28031
28032
28033  #
28034  # Setup the compilers (CC and CXX)
28035  #
28036
28037  COMPILER_NAME=C
28038  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28039
28040  if test "x$CC" != x; then
28041    # User has supplied compiler name already, always let that override.
28042    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28043$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28044    if test "x`basename $CC`" = "x$CC"; then
28045      # A command without a complete path is provided, search $PATH.
28046
28047      for ac_prog in $CC
28048do
28049  # Extract the first word of "$ac_prog", so it can be a program name with args.
28050set dummy $ac_prog; ac_word=$2
28051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28052$as_echo_n "checking for $ac_word... " >&6; }
28053if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28054  $as_echo_n "(cached) " >&6
28055else
28056  case $POTENTIAL_CC in
28057  [\\/]* | ?:[\\/]*)
28058  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28059  ;;
28060  *)
28061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28062for as_dir in $PATH
28063do
28064  IFS=$as_save_IFS
28065  test -z "$as_dir" && as_dir=.
28066    for ac_exec_ext in '' $ac_executable_extensions; do
28067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28068    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28070    break 2
28071  fi
28072done
28073  done
28074IFS=$as_save_IFS
28075
28076  ;;
28077esac
28078fi
28079POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28080if test -n "$POTENTIAL_CC"; then
28081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28082$as_echo "$POTENTIAL_CC" >&6; }
28083else
28084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28085$as_echo "no" >&6; }
28086fi
28087
28088
28089  test -n "$POTENTIAL_CC" && break
28090done
28091
28092      if test "x$POTENTIAL_CC" != x; then
28093        CC=$POTENTIAL_CC
28094      else
28095        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28096      fi
28097    else
28098      # Otherwise it might already be a complete path
28099      if test ! -x "$CC"; then
28100        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28101      fi
28102    fi
28103  else
28104    # No user supplied value. Locate compiler ourselves.
28105
28106    # If we are cross compiling, assume cross compilation tools follows the
28107    # cross compilation standard where they are prefixed with the autoconf
28108    # standard name for the target. For example the binary
28109    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28110    # If we are not cross compiling, then the default compiler name will be
28111    # used.
28112
28113    CC=
28114    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28115    # before checking the rest of the PATH.
28116    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28117    # step, this should not be necessary.
28118    if test -n "$TOOLCHAIN_PATH"; then
28119      PATH_save="$PATH"
28120      PATH="$TOOLCHAIN_PATH"
28121      for ac_prog in $SEARCH_LIST
28122do
28123  # Extract the first word of "$ac_prog", so it can be a program name with args.
28124set dummy $ac_prog; ac_word=$2
28125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28126$as_echo_n "checking for $ac_word... " >&6; }
28127if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28128  $as_echo_n "(cached) " >&6
28129else
28130  case $TOOLCHAIN_PATH_CC in
28131  [\\/]* | ?:[\\/]*)
28132  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28133  ;;
28134  *)
28135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28136for as_dir in $PATH
28137do
28138  IFS=$as_save_IFS
28139  test -z "$as_dir" && as_dir=.
28140    for ac_exec_ext in '' $ac_executable_extensions; do
28141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28142    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28144    break 2
28145  fi
28146done
28147  done
28148IFS=$as_save_IFS
28149
28150  ;;
28151esac
28152fi
28153TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28154if test -n "$TOOLCHAIN_PATH_CC"; then
28155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28156$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28157else
28158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28159$as_echo "no" >&6; }
28160fi
28161
28162
28163  test -n "$TOOLCHAIN_PATH_CC" && break
28164done
28165
28166      CC=$TOOLCHAIN_PATH_CC
28167      PATH="$PATH_save"
28168    fi
28169
28170    # AC_PATH_PROGS can't be run multiple times with the same variable,
28171    # so create a new name for this run.
28172    if test "x$CC" = x; then
28173      for ac_prog in $SEARCH_LIST
28174do
28175  # Extract the first word of "$ac_prog", so it can be a program name with args.
28176set dummy $ac_prog; ac_word=$2
28177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28178$as_echo_n "checking for $ac_word... " >&6; }
28179if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28180  $as_echo_n "(cached) " >&6
28181else
28182  case $POTENTIAL_CC in
28183  [\\/]* | ?:[\\/]*)
28184  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28185  ;;
28186  *)
28187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28188for as_dir in $PATH
28189do
28190  IFS=$as_save_IFS
28191  test -z "$as_dir" && as_dir=.
28192    for ac_exec_ext in '' $ac_executable_extensions; do
28193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28194    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28196    break 2
28197  fi
28198done
28199  done
28200IFS=$as_save_IFS
28201
28202  ;;
28203esac
28204fi
28205POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28206if test -n "$POTENTIAL_CC"; then
28207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28208$as_echo "$POTENTIAL_CC" >&6; }
28209else
28210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28211$as_echo "no" >&6; }
28212fi
28213
28214
28215  test -n "$POTENTIAL_CC" && break
28216done
28217
28218      CC=$POTENTIAL_CC
28219    fi
28220
28221    if test "x$CC" = x; then
28222
28223  # Print a helpful message on how to acquire the necessary build dependency.
28224  # devkit is the help tag: freetype, cups, pulse, alsa etc
28225  MISSING_DEPENDENCY=devkit
28226
28227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28228    cygwin_help $MISSING_DEPENDENCY
28229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28230    msys_help $MISSING_DEPENDENCY
28231  else
28232    PKGHANDLER_COMMAND=
28233
28234    case $PKGHANDLER in
28235      apt-get)
28236        apt_help     $MISSING_DEPENDENCY ;;
28237      yum)
28238        yum_help     $MISSING_DEPENDENCY ;;
28239      port)
28240        port_help    $MISSING_DEPENDENCY ;;
28241      pkgutil)
28242        pkgutil_help $MISSING_DEPENDENCY ;;
28243      pkgadd)
28244        pkgadd_help  $MISSING_DEPENDENCY ;;
28245    esac
28246
28247    if test "x$PKGHANDLER_COMMAND" != x; then
28248      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28249    fi
28250  fi
28251
28252      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28253    fi
28254  fi
28255
28256  # Now we have a compiler binary in CC. Make sure it's okay.
28257
28258  # Only process if variable expands to non-empty
28259
28260  if test "x$CC" != x; then
28261    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28262
28263  # First separate the path from the arguments. This will split at the first
28264  # space.
28265  complete="$CC"
28266  path="${complete%% *}"
28267  tmp="$complete EOL"
28268  arguments="${tmp#* }"
28269
28270  # Input might be given as Windows format, start by converting to
28271  # unix format.
28272  new_path=`$CYGPATH -u "$path"`
28273
28274  # Now try to locate executable using which
28275  new_path=`$WHICH "$new_path" 2> /dev/null`
28276  # bat and cmd files are not always considered executable in cygwin causing which
28277  # to not find them
28278  if test "x$new_path" = x \
28279      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28280      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28281    new_path=`$CYGPATH -u "$path"`
28282  fi
28283  if test "x$new_path" = x; then
28284    # Oops. Which didn't find the executable.
28285    # The splitting of arguments from the executable at a space might have been incorrect,
28286    # since paths with space are more likely in Windows. Give it another try with the whole
28287    # argument.
28288    path="$complete"
28289    arguments="EOL"
28290    new_path=`$CYGPATH -u "$path"`
28291    new_path=`$WHICH "$new_path" 2> /dev/null`
28292    # bat and cmd files are not always considered executable in cygwin causing which
28293    # to not find them
28294    if test "x$new_path" = x \
28295        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28296        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28297      new_path=`$CYGPATH -u "$path"`
28298    fi
28299    if test "x$new_path" = x; then
28300      # It's still not found. Now this is an unrecoverable error.
28301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28302$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28303      has_space=`$ECHO "$complete" | $GREP " "`
28304      if test "x$has_space" != x; then
28305        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28306$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28307      fi
28308      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28309    fi
28310  fi
28311
28312  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28313  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28314  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28315  # "foo.exe" is OK but "foo" is an error.
28316  #
28317  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28318  # It is also a way to make sure we got the proper file name for the real test later on.
28319  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28320  if test "x$test_shortpath" = x; then
28321    # Short path failed, file does not exist as specified.
28322    # Try adding .exe or .cmd
28323    if test -f "${new_path}.exe"; then
28324      input_to_shortpath="${new_path}.exe"
28325    elif test -f "${new_path}.cmd"; then
28326      input_to_shortpath="${new_path}.cmd"
28327    else
28328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28329$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28330      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28331$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28332      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28333    fi
28334  else
28335    input_to_shortpath="$new_path"
28336  fi
28337
28338  # Call helper function which possibly converts this using DOS-style short mode.
28339  # If so, the updated path is stored in $new_path.
28340  new_path="$input_to_shortpath"
28341
28342  input_path="$input_to_shortpath"
28343  # Check if we need to convert this using DOS-style short mode. If the path
28344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28345  # take no chances and rewrite it.
28346  # Note: m4 eats our [], so we need to use [ and ] instead.
28347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28348  if test "x$has_forbidden_chars" != x; then
28349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28353      # Going to short mode and back again did indeed matter. Since short mode is
28354      # case insensitive, let's make it lowercase to improve readability.
28355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28356      # Now convert it back to Unix-stile (cygpath)
28357      input_path=`$CYGPATH -u "$shortmode_path"`
28358      new_path="$input_path"
28359    fi
28360  fi
28361
28362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28363  if test "x$test_cygdrive_prefix" = x; then
28364    # As a simple fix, exclude /usr/bin since it's not a real path.
28365    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28367      # a path prefixed by /cygdrive for fixpath to work.
28368      new_path="$CYGWIN_ROOT_PATH$input_path"
28369    fi
28370  fi
28371
28372  # remove trailing .exe if any
28373  new_path="${new_path/%.exe/}"
28374
28375    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28376
28377  # First separate the path from the arguments. This will split at the first
28378  # space.
28379  complete="$CC"
28380  path="${complete%% *}"
28381  tmp="$complete EOL"
28382  arguments="${tmp#* }"
28383
28384  # Input might be given as Windows format, start by converting to
28385  # unix format.
28386  new_path="$path"
28387
28388  windows_path="$new_path"
28389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28390    unix_path=`$CYGPATH -u "$windows_path"`
28391    new_path="$unix_path"
28392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28394    new_path="$unix_path"
28395  fi
28396
28397
28398  # Now try to locate executable using which
28399  new_path=`$WHICH "$new_path" 2> /dev/null`
28400
28401  if test "x$new_path" = x; then
28402    # Oops. Which didn't find the executable.
28403    # The splitting of arguments from the executable at a space might have been incorrect,
28404    # since paths with space are more likely in Windows. Give it another try with the whole
28405    # argument.
28406    path="$complete"
28407    arguments="EOL"
28408    new_path="$path"
28409
28410  windows_path="$new_path"
28411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28412    unix_path=`$CYGPATH -u "$windows_path"`
28413    new_path="$unix_path"
28414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28416    new_path="$unix_path"
28417  fi
28418
28419
28420    new_path=`$WHICH "$new_path" 2> /dev/null`
28421    # bat and cmd files are not always considered executable in MSYS causing which
28422    # to not find them
28423    if test "x$new_path" = x \
28424        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28425        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28426      new_path="$path"
28427
28428  windows_path="$new_path"
28429  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28430    unix_path=`$CYGPATH -u "$windows_path"`
28431    new_path="$unix_path"
28432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28433    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28434    new_path="$unix_path"
28435  fi
28436
28437    fi
28438
28439    if test "x$new_path" = x; then
28440      # It's still not found. Now this is an unrecoverable error.
28441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28442$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28443      has_space=`$ECHO "$complete" | $GREP " "`
28444      if test "x$has_space" != x; then
28445        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28446$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28447      fi
28448      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28449    fi
28450  fi
28451
28452  # Now new_path has a complete unix path to the binary
28453  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28454    # Keep paths in /bin as-is, but remove trailing .exe if any
28455    new_path="${new_path/%.exe/}"
28456    # Do not save /bin paths to all_fixpath_prefixes!
28457  else
28458    # Not in mixed or Windows style, start by that.
28459    new_path=`cmd //c echo $new_path`
28460
28461  input_path="$new_path"
28462  # Check if we need to convert this using DOS-style short mode. If the path
28463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28464  # take no chances and rewrite it.
28465  # Note: m4 eats our [], so we need to use [ and ] instead.
28466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28467  if test "x$has_forbidden_chars" != x; then
28468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28470  fi
28471
28472    # Output is in $new_path
28473
28474  windows_path="$new_path"
28475  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28476    unix_path=`$CYGPATH -u "$windows_path"`
28477    new_path="$unix_path"
28478  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28479    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28480    new_path="$unix_path"
28481  fi
28482
28483    # remove trailing .exe if any
28484    new_path="${new_path/%.exe/}"
28485
28486    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28487    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28488  fi
28489
28490    else
28491      # We're on a unix platform. Hooray! :)
28492      # First separate the path from the arguments. This will split at the first
28493      # space.
28494      complete="$CC"
28495      path="${complete%% *}"
28496      tmp="$complete EOL"
28497      arguments="${tmp#* }"
28498
28499      # Cannot rely on the command "which" here since it doesn't always work.
28500      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28501      if test -z "$is_absolute_path"; then
28502        # Path to executable is not absolute. Find it.
28503        IFS_save="$IFS"
28504        IFS=:
28505        for p in $PATH; do
28506          if test -f "$p/$path" && test -x "$p/$path"; then
28507            new_path="$p/$path"
28508            break
28509          fi
28510        done
28511        IFS="$IFS_save"
28512      else
28513        # This is an absolute path, we can use it without further modifications.
28514        new_path="$path"
28515      fi
28516
28517      if test "x$new_path" = x; then
28518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28519$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28520        has_space=`$ECHO "$complete" | $GREP " "`
28521        if test "x$has_space" != x; then
28522          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28523$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28524        fi
28525        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28526      fi
28527    fi
28528
28529    # Now join together the path and the arguments once again
28530    if test "x$arguments" != xEOL; then
28531      new_complete="$new_path ${arguments% *}"
28532    else
28533      new_complete="$new_path"
28534    fi
28535
28536    if test "x$complete" != "x$new_complete"; then
28537      CC="$new_complete"
28538      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28539$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28540    fi
28541  fi
28542
28543  TEST_COMPILER="$CC"
28544  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28545  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28546  if test "x$OPENJDK_BUILD_OS" != xaix; then
28547    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28549$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28550
28551  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28552    # Follow a chain of symbolic links. Use readlink
28553    # where it exists, else fall back to horribly
28554    # complicated shell code.
28555    if test "x$READLINK_TESTED" != yes; then
28556      # On MacOSX there is a readlink tool with a different
28557      # purpose than the GNU readlink tool. Check the found readlink.
28558      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28559      if test "x$ISGNU" = x; then
28560        # A readlink that we do not know how to use.
28561        # Are there other non-GNU readlinks out there?
28562        READLINK_TESTED=yes
28563        READLINK=
28564      fi
28565    fi
28566
28567    if test "x$READLINK" != x; then
28568      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28569    else
28570      # Save the current directory for restoring afterwards
28571      STARTDIR=$PWD
28572      COUNTER=0
28573      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28574      sym_link_file=`$BASENAME $TEST_COMPILER`
28575      cd $sym_link_dir
28576      # Use -P flag to resolve symlinks in directories.
28577      cd `$THEPWDCMD -P`
28578      sym_link_dir=`$THEPWDCMD -P`
28579      # Resolve file symlinks
28580      while test $COUNTER -lt 20; do
28581        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28582        if test "x$ISLINK" == x; then
28583          # This is not a symbolic link! We are done!
28584          break
28585        fi
28586        # Again resolve directory symlinks since the target of the just found
28587        # link could be in a different directory
28588        cd `$DIRNAME $ISLINK`
28589        sym_link_dir=`$THEPWDCMD -P`
28590        sym_link_file=`$BASENAME $ISLINK`
28591        let COUNTER=COUNTER+1
28592      done
28593      cd $STARTDIR
28594      TEST_COMPILER=$sym_link_dir/$sym_link_file
28595    fi
28596  fi
28597
28598    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28599$as_echo "$TEST_COMPILER" >&6; }
28600  fi
28601  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28602$as_echo_n "checking if CC is disguised ccache... " >&6; }
28603
28604  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28605  if test "x$COMPILER_BASENAME" = "xccache"; then
28606    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28607$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28608    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28609    # We want to control ccache invocation ourselves, so ignore this cc and try
28610    # searching again.
28611
28612    # Remove the path to the fake ccache cc from the PATH
28613    RETRY_COMPILER_SAVED_PATH="$PATH"
28614    COMPILER_DIRNAME=`$DIRNAME $CC`
28615    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28616
28617    # Try again looking for our compiler
28618    if test -n "$ac_tool_prefix"; then
28619  for ac_prog in $TOOLCHAIN_CC_BINARY
28620  do
28621    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28622set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28624$as_echo_n "checking for $ac_word... " >&6; }
28625if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28626  $as_echo_n "(cached) " >&6
28627else
28628  if test -n "$PROPER_COMPILER_CC"; then
28629  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28630else
28631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28632for as_dir in $PATH
28633do
28634  IFS=$as_save_IFS
28635  test -z "$as_dir" && as_dir=.
28636    for ac_exec_ext in '' $ac_executable_extensions; do
28637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28638    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28640    break 2
28641  fi
28642done
28643  done
28644IFS=$as_save_IFS
28645
28646fi
28647fi
28648PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28649if test -n "$PROPER_COMPILER_CC"; then
28650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28651$as_echo "$PROPER_COMPILER_CC" >&6; }
28652else
28653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28654$as_echo "no" >&6; }
28655fi
28656
28657
28658    test -n "$PROPER_COMPILER_CC" && break
28659  done
28660fi
28661if test -z "$PROPER_COMPILER_CC"; then
28662  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28663  for ac_prog in $TOOLCHAIN_CC_BINARY
28664do
28665  # Extract the first word of "$ac_prog", so it can be a program name with args.
28666set dummy $ac_prog; ac_word=$2
28667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28668$as_echo_n "checking for $ac_word... " >&6; }
28669if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28670  $as_echo_n "(cached) " >&6
28671else
28672  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28673  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28674else
28675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28676for as_dir in $PATH
28677do
28678  IFS=$as_save_IFS
28679  test -z "$as_dir" && as_dir=.
28680    for ac_exec_ext in '' $ac_executable_extensions; do
28681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28682    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28683    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28684    break 2
28685  fi
28686done
28687  done
28688IFS=$as_save_IFS
28689
28690fi
28691fi
28692ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28693if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28695$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28696else
28697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28698$as_echo "no" >&6; }
28699fi
28700
28701
28702  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28703done
28704
28705  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28706    PROPER_COMPILER_CC=""
28707  else
28708    case $cross_compiling:$ac_tool_warned in
28709yes:)
28710{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28711$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28712ac_tool_warned=yes ;;
28713esac
28714    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28715  fi
28716fi
28717
28718
28719  # Only process if variable expands to non-empty
28720
28721  if test "x$PROPER_COMPILER_CC" != x; then
28722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28723
28724  # First separate the path from the arguments. This will split at the first
28725  # space.
28726  complete="$PROPER_COMPILER_CC"
28727  path="${complete%% *}"
28728  tmp="$complete EOL"
28729  arguments="${tmp#* }"
28730
28731  # Input might be given as Windows format, start by converting to
28732  # unix format.
28733  new_path=`$CYGPATH -u "$path"`
28734
28735  # Now try to locate executable using which
28736  new_path=`$WHICH "$new_path" 2> /dev/null`
28737  # bat and cmd files are not always considered executable in cygwin causing which
28738  # to not find them
28739  if test "x$new_path" = x \
28740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28742    new_path=`$CYGPATH -u "$path"`
28743  fi
28744  if test "x$new_path" = x; then
28745    # Oops. Which didn't find the executable.
28746    # The splitting of arguments from the executable at a space might have been incorrect,
28747    # since paths with space are more likely in Windows. Give it another try with the whole
28748    # argument.
28749    path="$complete"
28750    arguments="EOL"
28751    new_path=`$CYGPATH -u "$path"`
28752    new_path=`$WHICH "$new_path" 2> /dev/null`
28753    # bat and cmd files are not always considered executable in cygwin causing which
28754    # to not find them
28755    if test "x$new_path" = x \
28756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28758      new_path=`$CYGPATH -u "$path"`
28759    fi
28760    if test "x$new_path" = x; then
28761      # It's still not found. Now this is an unrecoverable error.
28762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28763$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28764      has_space=`$ECHO "$complete" | $GREP " "`
28765      if test "x$has_space" != x; then
28766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28768      fi
28769      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28770    fi
28771  fi
28772
28773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28776  # "foo.exe" is OK but "foo" is an error.
28777  #
28778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28779  # It is also a way to make sure we got the proper file name for the real test later on.
28780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28781  if test "x$test_shortpath" = x; then
28782    # Short path failed, file does not exist as specified.
28783    # Try adding .exe or .cmd
28784    if test -f "${new_path}.exe"; then
28785      input_to_shortpath="${new_path}.exe"
28786    elif test -f "${new_path}.cmd"; then
28787      input_to_shortpath="${new_path}.cmd"
28788    else
28789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28790$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28793      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28794    fi
28795  else
28796    input_to_shortpath="$new_path"
28797  fi
28798
28799  # Call helper function which possibly converts this using DOS-style short mode.
28800  # If so, the updated path is stored in $new_path.
28801  new_path="$input_to_shortpath"
28802
28803  input_path="$input_to_shortpath"
28804  # Check if we need to convert this using DOS-style short mode. If the path
28805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28806  # take no chances and rewrite it.
28807  # Note: m4 eats our [], so we need to use [ and ] instead.
28808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28809  if test "x$has_forbidden_chars" != x; then
28810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28814      # Going to short mode and back again did indeed matter. Since short mode is
28815      # case insensitive, let's make it lowercase to improve readability.
28816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28817      # Now convert it back to Unix-stile (cygpath)
28818      input_path=`$CYGPATH -u "$shortmode_path"`
28819      new_path="$input_path"
28820    fi
28821  fi
28822
28823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28824  if test "x$test_cygdrive_prefix" = x; then
28825    # As a simple fix, exclude /usr/bin since it's not a real path.
28826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28828      # a path prefixed by /cygdrive for fixpath to work.
28829      new_path="$CYGWIN_ROOT_PATH$input_path"
28830    fi
28831  fi
28832
28833  # remove trailing .exe if any
28834  new_path="${new_path/%.exe/}"
28835
28836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28837
28838  # First separate the path from the arguments. This will split at the first
28839  # space.
28840  complete="$PROPER_COMPILER_CC"
28841  path="${complete%% *}"
28842  tmp="$complete EOL"
28843  arguments="${tmp#* }"
28844
28845  # Input might be given as Windows format, start by converting to
28846  # unix format.
28847  new_path="$path"
28848
28849  windows_path="$new_path"
28850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28851    unix_path=`$CYGPATH -u "$windows_path"`
28852    new_path="$unix_path"
28853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28855    new_path="$unix_path"
28856  fi
28857
28858
28859  # Now try to locate executable using which
28860  new_path=`$WHICH "$new_path" 2> /dev/null`
28861
28862  if test "x$new_path" = x; then
28863    # Oops. Which didn't find the executable.
28864    # The splitting of arguments from the executable at a space might have been incorrect,
28865    # since paths with space are more likely in Windows. Give it another try with the whole
28866    # argument.
28867    path="$complete"
28868    arguments="EOL"
28869    new_path="$path"
28870
28871  windows_path="$new_path"
28872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28873    unix_path=`$CYGPATH -u "$windows_path"`
28874    new_path="$unix_path"
28875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28877    new_path="$unix_path"
28878  fi
28879
28880
28881    new_path=`$WHICH "$new_path" 2> /dev/null`
28882    # bat and cmd files are not always considered executable in MSYS causing which
28883    # to not find them
28884    if test "x$new_path" = x \
28885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28887      new_path="$path"
28888
28889  windows_path="$new_path"
28890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28891    unix_path=`$CYGPATH -u "$windows_path"`
28892    new_path="$unix_path"
28893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28895    new_path="$unix_path"
28896  fi
28897
28898    fi
28899
28900    if test "x$new_path" = x; then
28901      # It's still not found. Now this is an unrecoverable error.
28902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28903$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28904      has_space=`$ECHO "$complete" | $GREP " "`
28905      if test "x$has_space" != x; then
28906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28908      fi
28909      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28910    fi
28911  fi
28912
28913  # Now new_path has a complete unix path to the binary
28914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28915    # Keep paths in /bin as-is, but remove trailing .exe if any
28916    new_path="${new_path/%.exe/}"
28917    # Do not save /bin paths to all_fixpath_prefixes!
28918  else
28919    # Not in mixed or Windows style, start by that.
28920    new_path=`cmd //c echo $new_path`
28921
28922  input_path="$new_path"
28923  # Check if we need to convert this using DOS-style short mode. If the path
28924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28925  # take no chances and rewrite it.
28926  # Note: m4 eats our [], so we need to use [ and ] instead.
28927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28928  if test "x$has_forbidden_chars" != x; then
28929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28931  fi
28932
28933    # Output is in $new_path
28934
28935  windows_path="$new_path"
28936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28937    unix_path=`$CYGPATH -u "$windows_path"`
28938    new_path="$unix_path"
28939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28941    new_path="$unix_path"
28942  fi
28943
28944    # remove trailing .exe if any
28945    new_path="${new_path/%.exe/}"
28946
28947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28949  fi
28950
28951    else
28952      # We're on a unix platform. Hooray! :)
28953      # First separate the path from the arguments. This will split at the first
28954      # space.
28955      complete="$PROPER_COMPILER_CC"
28956      path="${complete%% *}"
28957      tmp="$complete EOL"
28958      arguments="${tmp#* }"
28959
28960      # Cannot rely on the command "which" here since it doesn't always work.
28961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28962      if test -z "$is_absolute_path"; then
28963        # Path to executable is not absolute. Find it.
28964        IFS_save="$IFS"
28965        IFS=:
28966        for p in $PATH; do
28967          if test -f "$p/$path" && test -x "$p/$path"; then
28968            new_path="$p/$path"
28969            break
28970          fi
28971        done
28972        IFS="$IFS_save"
28973      else
28974        # This is an absolute path, we can use it without further modifications.
28975        new_path="$path"
28976      fi
28977
28978      if test "x$new_path" = x; then
28979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28980$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28981        has_space=`$ECHO "$complete" | $GREP " "`
28982        if test "x$has_space" != x; then
28983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28985        fi
28986        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28987      fi
28988    fi
28989
28990    # Now join together the path and the arguments once again
28991    if test "x$arguments" != xEOL; then
28992      new_complete="$new_path ${arguments% *}"
28993    else
28994      new_complete="$new_path"
28995    fi
28996
28997    if test "x$complete" != "x$new_complete"; then
28998      PROPER_COMPILER_CC="$new_complete"
28999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29000$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29001    fi
29002  fi
29003
29004    PATH="$RETRY_COMPILER_SAVED_PATH"
29005
29006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29007$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29008
29009  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29010    # Follow a chain of symbolic links. Use readlink
29011    # where it exists, else fall back to horribly
29012    # complicated shell code.
29013    if test "x$READLINK_TESTED" != yes; then
29014      # On MacOSX there is a readlink tool with a different
29015      # purpose than the GNU readlink tool. Check the found readlink.
29016      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29017      if test "x$ISGNU" = x; then
29018        # A readlink that we do not know how to use.
29019        # Are there other non-GNU readlinks out there?
29020        READLINK_TESTED=yes
29021        READLINK=
29022      fi
29023    fi
29024
29025    if test "x$READLINK" != x; then
29026      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29027    else
29028      # Save the current directory for restoring afterwards
29029      STARTDIR=$PWD
29030      COUNTER=0
29031      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29032      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29033      cd $sym_link_dir
29034      # Use -P flag to resolve symlinks in directories.
29035      cd `$THEPWDCMD -P`
29036      sym_link_dir=`$THEPWDCMD -P`
29037      # Resolve file symlinks
29038      while test $COUNTER -lt 20; do
29039        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29040        if test "x$ISLINK" == x; then
29041          # This is not a symbolic link! We are done!
29042          break
29043        fi
29044        # Again resolve directory symlinks since the target of the just found
29045        # link could be in a different directory
29046        cd `$DIRNAME $ISLINK`
29047        sym_link_dir=`$THEPWDCMD -P`
29048        sym_link_file=`$BASENAME $ISLINK`
29049        let COUNTER=COUNTER+1
29050      done
29051      cd $STARTDIR
29052      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29053    fi
29054  fi
29055
29056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29057$as_echo "$PROPER_COMPILER_CC" >&6; }
29058    CC="$PROPER_COMPILER_CC"
29059  else
29060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29061$as_echo "no, keeping CC" >&6; }
29062  fi
29063
29064
29065  COMPILER=$CC
29066  COMPILER_NAME=$COMPILER_NAME
29067
29068  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29069    # cc -V output typically looks like
29070    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29071    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29072    # Check that this is likely to be the Solaris Studio cc.
29073    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29074    if test $? -ne 0; then
29075      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29076      { $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
29077$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29078      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29079$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29080      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29081$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29082      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29083    fi
29084    # Remove usage instructions (if present), and
29085    # collapse compiler output into a single line
29086    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29087        $SED -e 's/ *[Uu]sage:.*//'`
29088    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29089        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29090  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29091    # xlc -qversion output typically looks like
29092    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29093    #     Version: 11.01.0000.0015
29094    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29095    # Check that this is likely to be the IBM XL C compiler.
29096    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29097    if test $? -ne 0; then
29098      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29099      { $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
29100$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29101      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29102$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29103      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29104$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29105      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29106    fi
29107    # Collapse compiler output into a single line
29108    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29109    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29110        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29111  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29112    # There is no specific version flag, but all output starts with a version string.
29113    # First line typically looks something like:
29114    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29115    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29116    # Check that this is likely to be Microsoft CL.EXE.
29117    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29118    if test $? -ne 0; then
29119      { $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
29120$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29122$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29124    fi
29125    # Collapse compiler output into a single line
29126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29128        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29129  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29130    # gcc --version output typically looks like
29131    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29132    #     Copyright (C) 2013 Free Software Foundation, Inc.
29133    #     This is free software; see the source for copying conditions.  There is NO
29134    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29135    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29136    # Check that this is likely to be GCC.
29137    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29138    if test $? -ne 0; then
29139      { $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
29140$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29142$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29143      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29144    fi
29145    # Remove Copyright and legalese from version string, and
29146    # collapse into a single line
29147    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29148        $SED -e 's/ *Copyright .*//'`
29149    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29150        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29151  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29152    # clang --version output typically looks like
29153    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29154    #    clang version 3.3 (tags/RELEASE_33/final)
29155    # or
29156    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29157    #    Target: x86_64-pc-linux-gnu
29158    #    Thread model: posix
29159    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29160    # Check that this is likely to be clang
29161    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29162    if test $? -ne 0; then
29163      { $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
29164$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29165      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29166$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29167      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29168    fi
29169    # Collapse compiler output into a single line
29170    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29171    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29172        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29173  else
29174      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29175  fi
29176  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29177  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29178  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29179  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29180
29181  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29182$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29183
29184
29185  # Now that we have resolved CC ourself, let autoconf have its go at it
29186  ac_ext=c
29187ac_cpp='$CPP $CPPFLAGS'
29188ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29189ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29190ac_compiler_gnu=$ac_cv_c_compiler_gnu
29191if test -n "$ac_tool_prefix"; then
29192  for ac_prog in $CC
29193  do
29194    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29195set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29197$as_echo_n "checking for $ac_word... " >&6; }
29198if ${ac_cv_prog_CC+:} false; then :
29199  $as_echo_n "(cached) " >&6
29200else
29201  if test -n "$CC"; then
29202  ac_cv_prog_CC="$CC" # Let the user override the test.
29203else
29204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29205for as_dir in $PATH
29206do
29207  IFS=$as_save_IFS
29208  test -z "$as_dir" && as_dir=.
29209    for ac_exec_ext in '' $ac_executable_extensions; do
29210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29211    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29213    break 2
29214  fi
29215done
29216  done
29217IFS=$as_save_IFS
29218
29219fi
29220fi
29221CC=$ac_cv_prog_CC
29222if test -n "$CC"; then
29223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29224$as_echo "$CC" >&6; }
29225else
29226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29227$as_echo "no" >&6; }
29228fi
29229
29230
29231    test -n "$CC" && break
29232  done
29233fi
29234if test -z "$CC"; then
29235  ac_ct_CC=$CC
29236  for ac_prog in $CC
29237do
29238  # Extract the first word of "$ac_prog", so it can be a program name with args.
29239set dummy $ac_prog; ac_word=$2
29240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29241$as_echo_n "checking for $ac_word... " >&6; }
29242if ${ac_cv_prog_ac_ct_CC+:} false; then :
29243  $as_echo_n "(cached) " >&6
29244else
29245  if test -n "$ac_ct_CC"; then
29246  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29247else
29248as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29249for as_dir in $PATH
29250do
29251  IFS=$as_save_IFS
29252  test -z "$as_dir" && as_dir=.
29253    for ac_exec_ext in '' $ac_executable_extensions; do
29254  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29255    ac_cv_prog_ac_ct_CC="$ac_prog"
29256    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29257    break 2
29258  fi
29259done
29260  done
29261IFS=$as_save_IFS
29262
29263fi
29264fi
29265ac_ct_CC=$ac_cv_prog_ac_ct_CC
29266if test -n "$ac_ct_CC"; then
29267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29268$as_echo "$ac_ct_CC" >&6; }
29269else
29270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29271$as_echo "no" >&6; }
29272fi
29273
29274
29275  test -n "$ac_ct_CC" && break
29276done
29277
29278  if test "x$ac_ct_CC" = x; then
29279    CC=""
29280  else
29281    case $cross_compiling:$ac_tool_warned in
29282yes:)
29283{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29284$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29285ac_tool_warned=yes ;;
29286esac
29287    CC=$ac_ct_CC
29288  fi
29289fi
29290
29291
29292test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29294as_fn_error $? "no acceptable C compiler found in \$PATH
29295See \`config.log' for more details" "$LINENO" 5; }
29296
29297# Provide some information about the compiler.
29298$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29299set X $ac_compile
29300ac_compiler=$2
29301for ac_option in --version -v -V -qversion; do
29302  { { ac_try="$ac_compiler $ac_option >&5"
29303case "(($ac_try" in
29304  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29305  *) ac_try_echo=$ac_try;;
29306esac
29307eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29308$as_echo "$ac_try_echo"; } >&5
29309  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29310  ac_status=$?
29311  if test -s conftest.err; then
29312    sed '10a\
29313... rest of stderr output deleted ...
29314         10q' conftest.err >conftest.er1
29315    cat conftest.er1 >&5
29316  fi
29317  rm -f conftest.er1 conftest.err
29318  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29319  test $ac_status = 0; }
29320done
29321
29322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29323/* end confdefs.h.  */
29324
29325int
29326main ()
29327{
29328
29329  ;
29330  return 0;
29331}
29332_ACEOF
29333ac_clean_files_save=$ac_clean_files
29334ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29335# Try to create an executable without -o first, disregard a.out.
29336# It will help us diagnose broken compilers, and finding out an intuition
29337# of exeext.
29338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29339$as_echo_n "checking whether the C compiler works... " >&6; }
29340ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29341
29342# The possible output files:
29343ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29344
29345ac_rmfiles=
29346for ac_file in $ac_files
29347do
29348  case $ac_file in
29349    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29350    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29351  esac
29352done
29353rm -f $ac_rmfiles
29354
29355if { { ac_try="$ac_link_default"
29356case "(($ac_try" in
29357  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29358  *) ac_try_echo=$ac_try;;
29359esac
29360eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29361$as_echo "$ac_try_echo"; } >&5
29362  (eval "$ac_link_default") 2>&5
29363  ac_status=$?
29364  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29365  test $ac_status = 0; }; then :
29366  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29367# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29368# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29369# so that the user can short-circuit this test for compilers unknown to
29370# Autoconf.
29371for ac_file in $ac_files ''
29372do
29373  test -f "$ac_file" || continue
29374  case $ac_file in
29375    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29376	;;
29377    [ab].out )
29378	# We found the default executable, but exeext='' is most
29379	# certainly right.
29380	break;;
29381    *.* )
29382	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29383	then :; else
29384	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29385	fi
29386	# We set ac_cv_exeext here because the later test for it is not
29387	# safe: cross compilers may not add the suffix if given an `-o'
29388	# argument, so we may need to know it at that point already.
29389	# Even if this section looks crufty: it has the advantage of
29390	# actually working.
29391	break;;
29392    * )
29393	break;;
29394  esac
29395done
29396test "$ac_cv_exeext" = no && ac_cv_exeext=
29397
29398else
29399  ac_file=''
29400fi
29401if test -z "$ac_file"; then :
29402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29403$as_echo "no" >&6; }
29404$as_echo "$as_me: failed program was:" >&5
29405sed 's/^/| /' conftest.$ac_ext >&5
29406
29407{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29408$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29409as_fn_error 77 "C compiler cannot create executables
29410See \`config.log' for more details" "$LINENO" 5; }
29411else
29412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29413$as_echo "yes" >&6; }
29414fi
29415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29416$as_echo_n "checking for C compiler default output file name... " >&6; }
29417{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29418$as_echo "$ac_file" >&6; }
29419ac_exeext=$ac_cv_exeext
29420
29421rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29422ac_clean_files=$ac_clean_files_save
29423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29424$as_echo_n "checking for suffix of executables... " >&6; }
29425if { { ac_try="$ac_link"
29426case "(($ac_try" in
29427  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29428  *) ac_try_echo=$ac_try;;
29429esac
29430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29431$as_echo "$ac_try_echo"; } >&5
29432  (eval "$ac_link") 2>&5
29433  ac_status=$?
29434  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29435  test $ac_status = 0; }; then :
29436  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29437# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29438# work properly (i.e., refer to `conftest.exe'), while it won't with
29439# `rm'.
29440for ac_file in conftest.exe conftest conftest.*; do
29441  test -f "$ac_file" || continue
29442  case $ac_file in
29443    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29444    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29445	  break;;
29446    * ) break;;
29447  esac
29448done
29449else
29450  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29451$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29452as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29453See \`config.log' for more details" "$LINENO" 5; }
29454fi
29455rm -f conftest conftest$ac_cv_exeext
29456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29457$as_echo "$ac_cv_exeext" >&6; }
29458
29459rm -f conftest.$ac_ext
29460EXEEXT=$ac_cv_exeext
29461ac_exeext=$EXEEXT
29462cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29463/* end confdefs.h.  */
29464#include <stdio.h>
29465int
29466main ()
29467{
29468FILE *f = fopen ("conftest.out", "w");
29469 return ferror (f) || fclose (f) != 0;
29470
29471  ;
29472  return 0;
29473}
29474_ACEOF
29475ac_clean_files="$ac_clean_files conftest.out"
29476# Check that the compiler produces executables we can run.  If not, either
29477# the compiler is broken, or we cross compile.
29478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29479$as_echo_n "checking whether we are cross compiling... " >&6; }
29480if test "$cross_compiling" != yes; then
29481  { { ac_try="$ac_link"
29482case "(($ac_try" in
29483  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29484  *) ac_try_echo=$ac_try;;
29485esac
29486eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29487$as_echo "$ac_try_echo"; } >&5
29488  (eval "$ac_link") 2>&5
29489  ac_status=$?
29490  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29491  test $ac_status = 0; }
29492  if { ac_try='./conftest$ac_cv_exeext'
29493  { { case "(($ac_try" in
29494  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29495  *) ac_try_echo=$ac_try;;
29496esac
29497eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29498$as_echo "$ac_try_echo"; } >&5
29499  (eval "$ac_try") 2>&5
29500  ac_status=$?
29501  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29502  test $ac_status = 0; }; }; then
29503    cross_compiling=no
29504  else
29505    if test "$cross_compiling" = maybe; then
29506	cross_compiling=yes
29507    else
29508	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29510as_fn_error $? "cannot run C compiled programs.
29511If you meant to cross compile, use \`--host'.
29512See \`config.log' for more details" "$LINENO" 5; }
29513    fi
29514  fi
29515fi
29516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29517$as_echo "$cross_compiling" >&6; }
29518
29519rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29520ac_clean_files=$ac_clean_files_save
29521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29522$as_echo_n "checking for suffix of object files... " >&6; }
29523if ${ac_cv_objext+:} false; then :
29524  $as_echo_n "(cached) " >&6
29525else
29526  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29527/* end confdefs.h.  */
29528
29529int
29530main ()
29531{
29532
29533  ;
29534  return 0;
29535}
29536_ACEOF
29537rm -f conftest.o conftest.obj
29538if { { ac_try="$ac_compile"
29539case "(($ac_try" in
29540  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29541  *) ac_try_echo=$ac_try;;
29542esac
29543eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29544$as_echo "$ac_try_echo"; } >&5
29545  (eval "$ac_compile") 2>&5
29546  ac_status=$?
29547  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29548  test $ac_status = 0; }; then :
29549  for ac_file in conftest.o conftest.obj conftest.*; do
29550  test -f "$ac_file" || continue;
29551  case $ac_file in
29552    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29553    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29554       break;;
29555  esac
29556done
29557else
29558  $as_echo "$as_me: failed program was:" >&5
29559sed 's/^/| /' conftest.$ac_ext >&5
29560
29561{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29562$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29563as_fn_error $? "cannot compute suffix of object files: cannot compile
29564See \`config.log' for more details" "$LINENO" 5; }
29565fi
29566rm -f conftest.$ac_cv_objext conftest.$ac_ext
29567fi
29568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29569$as_echo "$ac_cv_objext" >&6; }
29570OBJEXT=$ac_cv_objext
29571ac_objext=$OBJEXT
29572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29573$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29574if ${ac_cv_c_compiler_gnu+:} false; then :
29575  $as_echo_n "(cached) " >&6
29576else
29577  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29578/* end confdefs.h.  */
29579
29580int
29581main ()
29582{
29583#ifndef __GNUC__
29584       choke me
29585#endif
29586
29587  ;
29588  return 0;
29589}
29590_ACEOF
29591if ac_fn_c_try_compile "$LINENO"; then :
29592  ac_compiler_gnu=yes
29593else
29594  ac_compiler_gnu=no
29595fi
29596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29597ac_cv_c_compiler_gnu=$ac_compiler_gnu
29598
29599fi
29600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29601$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29602if test $ac_compiler_gnu = yes; then
29603  GCC=yes
29604else
29605  GCC=
29606fi
29607ac_test_CFLAGS=${CFLAGS+set}
29608ac_save_CFLAGS=$CFLAGS
29609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29610$as_echo_n "checking whether $CC accepts -g... " >&6; }
29611if ${ac_cv_prog_cc_g+:} false; then :
29612  $as_echo_n "(cached) " >&6
29613else
29614  ac_save_c_werror_flag=$ac_c_werror_flag
29615   ac_c_werror_flag=yes
29616   ac_cv_prog_cc_g=no
29617   CFLAGS="-g"
29618   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29619/* end confdefs.h.  */
29620
29621int
29622main ()
29623{
29624
29625  ;
29626  return 0;
29627}
29628_ACEOF
29629if ac_fn_c_try_compile "$LINENO"; then :
29630  ac_cv_prog_cc_g=yes
29631else
29632  CFLAGS=""
29633      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29634/* end confdefs.h.  */
29635
29636int
29637main ()
29638{
29639
29640  ;
29641  return 0;
29642}
29643_ACEOF
29644if ac_fn_c_try_compile "$LINENO"; then :
29645
29646else
29647  ac_c_werror_flag=$ac_save_c_werror_flag
29648	 CFLAGS="-g"
29649	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29650/* end confdefs.h.  */
29651
29652int
29653main ()
29654{
29655
29656  ;
29657  return 0;
29658}
29659_ACEOF
29660if ac_fn_c_try_compile "$LINENO"; then :
29661  ac_cv_prog_cc_g=yes
29662fi
29663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29664fi
29665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29666fi
29667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29668   ac_c_werror_flag=$ac_save_c_werror_flag
29669fi
29670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29671$as_echo "$ac_cv_prog_cc_g" >&6; }
29672if test "$ac_test_CFLAGS" = set; then
29673  CFLAGS=$ac_save_CFLAGS
29674elif test $ac_cv_prog_cc_g = yes; then
29675  if test "$GCC" = yes; then
29676    CFLAGS="-g -O2"
29677  else
29678    CFLAGS="-g"
29679  fi
29680else
29681  if test "$GCC" = yes; then
29682    CFLAGS="-O2"
29683  else
29684    CFLAGS=
29685  fi
29686fi
29687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29688$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29689if ${ac_cv_prog_cc_c89+:} false; then :
29690  $as_echo_n "(cached) " >&6
29691else
29692  ac_cv_prog_cc_c89=no
29693ac_save_CC=$CC
29694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29695/* end confdefs.h.  */
29696#include <stdarg.h>
29697#include <stdio.h>
29698struct stat;
29699/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29700struct buf { int x; };
29701FILE * (*rcsopen) (struct buf *, struct stat *, int);
29702static char *e (p, i)
29703     char **p;
29704     int i;
29705{
29706  return p[i];
29707}
29708static char *f (char * (*g) (char **, int), char **p, ...)
29709{
29710  char *s;
29711  va_list v;
29712  va_start (v,p);
29713  s = g (p, va_arg (v,int));
29714  va_end (v);
29715  return s;
29716}
29717
29718/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29719   function prototypes and stuff, but not '\xHH' hex character constants.
29720   These don't provoke an error unfortunately, instead are silently treated
29721   as 'x'.  The following induces an error, until -std is added to get
29722   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29723   array size at least.  It's necessary to write '\x00'==0 to get something
29724   that's true only with -std.  */
29725int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29726
29727/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29728   inside strings and character constants.  */
29729#define FOO(x) 'x'
29730int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29731
29732int test (int i, double x);
29733struct s1 {int (*f) (int a);};
29734struct s2 {int (*f) (double a);};
29735int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29736int argc;
29737char **argv;
29738int
29739main ()
29740{
29741return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29742  ;
29743  return 0;
29744}
29745_ACEOF
29746for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29747	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29748do
29749  CC="$ac_save_CC $ac_arg"
29750  if ac_fn_c_try_compile "$LINENO"; then :
29751  ac_cv_prog_cc_c89=$ac_arg
29752fi
29753rm -f core conftest.err conftest.$ac_objext
29754  test "x$ac_cv_prog_cc_c89" != "xno" && break
29755done
29756rm -f conftest.$ac_ext
29757CC=$ac_save_CC
29758
29759fi
29760# AC_CACHE_VAL
29761case "x$ac_cv_prog_cc_c89" in
29762  x)
29763    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29764$as_echo "none needed" >&6; } ;;
29765  xno)
29766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29767$as_echo "unsupported" >&6; } ;;
29768  *)
29769    CC="$CC $ac_cv_prog_cc_c89"
29770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29771$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29772esac
29773if test "x$ac_cv_prog_cc_c89" != xno; then :
29774
29775fi
29776
29777ac_ext=cpp
29778ac_cpp='$CXXCPP $CPPFLAGS'
29779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29782
29783
29784
29785  COMPILER_NAME=C++
29786  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29787
29788  if test "x$CXX" != x; then
29789    # User has supplied compiler name already, always let that override.
29790    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29791$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29792    if test "x`basename $CXX`" = "x$CXX"; then
29793      # A command without a complete path is provided, search $PATH.
29794
29795      for ac_prog in $CXX
29796do
29797  # Extract the first word of "$ac_prog", so it can be a program name with args.
29798set dummy $ac_prog; ac_word=$2
29799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29800$as_echo_n "checking for $ac_word... " >&6; }
29801if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29802  $as_echo_n "(cached) " >&6
29803else
29804  case $POTENTIAL_CXX in
29805  [\\/]* | ?:[\\/]*)
29806  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29807  ;;
29808  *)
29809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29810for as_dir in $PATH
29811do
29812  IFS=$as_save_IFS
29813  test -z "$as_dir" && as_dir=.
29814    for ac_exec_ext in '' $ac_executable_extensions; do
29815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29816    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29818    break 2
29819  fi
29820done
29821  done
29822IFS=$as_save_IFS
29823
29824  ;;
29825esac
29826fi
29827POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29828if test -n "$POTENTIAL_CXX"; then
29829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29830$as_echo "$POTENTIAL_CXX" >&6; }
29831else
29832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29833$as_echo "no" >&6; }
29834fi
29835
29836
29837  test -n "$POTENTIAL_CXX" && break
29838done
29839
29840      if test "x$POTENTIAL_CXX" != x; then
29841        CXX=$POTENTIAL_CXX
29842      else
29843        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29844      fi
29845    else
29846      # Otherwise it might already be a complete path
29847      if test ! -x "$CXX"; then
29848        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29849      fi
29850    fi
29851  else
29852    # No user supplied value. Locate compiler ourselves.
29853
29854    # If we are cross compiling, assume cross compilation tools follows the
29855    # cross compilation standard where they are prefixed with the autoconf
29856    # standard name for the target. For example the binary
29857    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29858    # If we are not cross compiling, then the default compiler name will be
29859    # used.
29860
29861    CXX=
29862    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29863    # before checking the rest of the PATH.
29864    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29865    # step, this should not be necessary.
29866    if test -n "$TOOLCHAIN_PATH"; then
29867      PATH_save="$PATH"
29868      PATH="$TOOLCHAIN_PATH"
29869      for ac_prog in $SEARCH_LIST
29870do
29871  # Extract the first word of "$ac_prog", so it can be a program name with args.
29872set dummy $ac_prog; ac_word=$2
29873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29874$as_echo_n "checking for $ac_word... " >&6; }
29875if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29876  $as_echo_n "(cached) " >&6
29877else
29878  case $TOOLCHAIN_PATH_CXX in
29879  [\\/]* | ?:[\\/]*)
29880  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29881  ;;
29882  *)
29883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29884for as_dir in $PATH
29885do
29886  IFS=$as_save_IFS
29887  test -z "$as_dir" && as_dir=.
29888    for ac_exec_ext in '' $ac_executable_extensions; do
29889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29890    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29892    break 2
29893  fi
29894done
29895  done
29896IFS=$as_save_IFS
29897
29898  ;;
29899esac
29900fi
29901TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29902if test -n "$TOOLCHAIN_PATH_CXX"; then
29903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29904$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29905else
29906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29907$as_echo "no" >&6; }
29908fi
29909
29910
29911  test -n "$TOOLCHAIN_PATH_CXX" && break
29912done
29913
29914      CXX=$TOOLCHAIN_PATH_CXX
29915      PATH="$PATH_save"
29916    fi
29917
29918    # AC_PATH_PROGS can't be run multiple times with the same variable,
29919    # so create a new name for this run.
29920    if test "x$CXX" = x; then
29921      for ac_prog in $SEARCH_LIST
29922do
29923  # Extract the first word of "$ac_prog", so it can be a program name with args.
29924set dummy $ac_prog; ac_word=$2
29925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29926$as_echo_n "checking for $ac_word... " >&6; }
29927if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29928  $as_echo_n "(cached) " >&6
29929else
29930  case $POTENTIAL_CXX in
29931  [\\/]* | ?:[\\/]*)
29932  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29933  ;;
29934  *)
29935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29936for as_dir in $PATH
29937do
29938  IFS=$as_save_IFS
29939  test -z "$as_dir" && as_dir=.
29940    for ac_exec_ext in '' $ac_executable_extensions; do
29941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29942    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29944    break 2
29945  fi
29946done
29947  done
29948IFS=$as_save_IFS
29949
29950  ;;
29951esac
29952fi
29953POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29954if test -n "$POTENTIAL_CXX"; then
29955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29956$as_echo "$POTENTIAL_CXX" >&6; }
29957else
29958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29959$as_echo "no" >&6; }
29960fi
29961
29962
29963  test -n "$POTENTIAL_CXX" && break
29964done
29965
29966      CXX=$POTENTIAL_CXX
29967    fi
29968
29969    if test "x$CXX" = x; then
29970
29971  # Print a helpful message on how to acquire the necessary build dependency.
29972  # devkit is the help tag: freetype, cups, pulse, alsa etc
29973  MISSING_DEPENDENCY=devkit
29974
29975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29976    cygwin_help $MISSING_DEPENDENCY
29977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29978    msys_help $MISSING_DEPENDENCY
29979  else
29980    PKGHANDLER_COMMAND=
29981
29982    case $PKGHANDLER in
29983      apt-get)
29984        apt_help     $MISSING_DEPENDENCY ;;
29985      yum)
29986        yum_help     $MISSING_DEPENDENCY ;;
29987      port)
29988        port_help    $MISSING_DEPENDENCY ;;
29989      pkgutil)
29990        pkgutil_help $MISSING_DEPENDENCY ;;
29991      pkgadd)
29992        pkgadd_help  $MISSING_DEPENDENCY ;;
29993    esac
29994
29995    if test "x$PKGHANDLER_COMMAND" != x; then
29996      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29997    fi
29998  fi
29999
30000      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30001    fi
30002  fi
30003
30004  # Now we have a compiler binary in CXX. Make sure it's okay.
30005
30006  # Only process if variable expands to non-empty
30007
30008  if test "x$CXX" != x; then
30009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30010
30011  # First separate the path from the arguments. This will split at the first
30012  # space.
30013  complete="$CXX"
30014  path="${complete%% *}"
30015  tmp="$complete EOL"
30016  arguments="${tmp#* }"
30017
30018  # Input might be given as Windows format, start by converting to
30019  # unix format.
30020  new_path=`$CYGPATH -u "$path"`
30021
30022  # Now try to locate executable using which
30023  new_path=`$WHICH "$new_path" 2> /dev/null`
30024  # bat and cmd files are not always considered executable in cygwin causing which
30025  # to not find them
30026  if test "x$new_path" = x \
30027      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30028      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30029    new_path=`$CYGPATH -u "$path"`
30030  fi
30031  if test "x$new_path" = x; then
30032    # Oops. Which didn't find the executable.
30033    # The splitting of arguments from the executable at a space might have been incorrect,
30034    # since paths with space are more likely in Windows. Give it another try with the whole
30035    # argument.
30036    path="$complete"
30037    arguments="EOL"
30038    new_path=`$CYGPATH -u "$path"`
30039    new_path=`$WHICH "$new_path" 2> /dev/null`
30040    # bat and cmd files are not always considered executable in cygwin causing which
30041    # to not find them
30042    if test "x$new_path" = x \
30043        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30044        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30045      new_path=`$CYGPATH -u "$path"`
30046    fi
30047    if test "x$new_path" = x; then
30048      # It's still not found. Now this is an unrecoverable error.
30049      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30050$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30051      has_space=`$ECHO "$complete" | $GREP " "`
30052      if test "x$has_space" != x; then
30053        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30054$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30055      fi
30056      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30057    fi
30058  fi
30059
30060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30063  # "foo.exe" is OK but "foo" is an error.
30064  #
30065  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30066  # It is also a way to make sure we got the proper file name for the real test later on.
30067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30068  if test "x$test_shortpath" = x; then
30069    # Short path failed, file does not exist as specified.
30070    # Try adding .exe or .cmd
30071    if test -f "${new_path}.exe"; then
30072      input_to_shortpath="${new_path}.exe"
30073    elif test -f "${new_path}.cmd"; then
30074      input_to_shortpath="${new_path}.cmd"
30075    else
30076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30077$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30078      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30079$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30080      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30081    fi
30082  else
30083    input_to_shortpath="$new_path"
30084  fi
30085
30086  # Call helper function which possibly converts this using DOS-style short mode.
30087  # If so, the updated path is stored in $new_path.
30088  new_path="$input_to_shortpath"
30089
30090  input_path="$input_to_shortpath"
30091  # Check if we need to convert this using DOS-style short mode. If the path
30092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30093  # take no chances and rewrite it.
30094  # Note: m4 eats our [], so we need to use [ and ] instead.
30095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30096  if test "x$has_forbidden_chars" != x; then
30097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30101      # Going to short mode and back again did indeed matter. Since short mode is
30102      # case insensitive, let's make it lowercase to improve readability.
30103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30104      # Now convert it back to Unix-stile (cygpath)
30105      input_path=`$CYGPATH -u "$shortmode_path"`
30106      new_path="$input_path"
30107    fi
30108  fi
30109
30110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30111  if test "x$test_cygdrive_prefix" = x; then
30112    # As a simple fix, exclude /usr/bin since it's not a real path.
30113    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30115      # a path prefixed by /cygdrive for fixpath to work.
30116      new_path="$CYGWIN_ROOT_PATH$input_path"
30117    fi
30118  fi
30119
30120  # remove trailing .exe if any
30121  new_path="${new_path/%.exe/}"
30122
30123    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30124
30125  # First separate the path from the arguments. This will split at the first
30126  # space.
30127  complete="$CXX"
30128  path="${complete%% *}"
30129  tmp="$complete EOL"
30130  arguments="${tmp#* }"
30131
30132  # Input might be given as Windows format, start by converting to
30133  # unix format.
30134  new_path="$path"
30135
30136  windows_path="$new_path"
30137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30138    unix_path=`$CYGPATH -u "$windows_path"`
30139    new_path="$unix_path"
30140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30142    new_path="$unix_path"
30143  fi
30144
30145
30146  # Now try to locate executable using which
30147  new_path=`$WHICH "$new_path" 2> /dev/null`
30148
30149  if test "x$new_path" = x; then
30150    # Oops. Which didn't find the executable.
30151    # The splitting of arguments from the executable at a space might have been incorrect,
30152    # since paths with space are more likely in Windows. Give it another try with the whole
30153    # argument.
30154    path="$complete"
30155    arguments="EOL"
30156    new_path="$path"
30157
30158  windows_path="$new_path"
30159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30160    unix_path=`$CYGPATH -u "$windows_path"`
30161    new_path="$unix_path"
30162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30164    new_path="$unix_path"
30165  fi
30166
30167
30168    new_path=`$WHICH "$new_path" 2> /dev/null`
30169    # bat and cmd files are not always considered executable in MSYS causing which
30170    # to not find them
30171    if test "x$new_path" = x \
30172        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30173        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30174      new_path="$path"
30175
30176  windows_path="$new_path"
30177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30178    unix_path=`$CYGPATH -u "$windows_path"`
30179    new_path="$unix_path"
30180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30182    new_path="$unix_path"
30183  fi
30184
30185    fi
30186
30187    if test "x$new_path" = x; then
30188      # It's still not found. Now this is an unrecoverable error.
30189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30190$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30191      has_space=`$ECHO "$complete" | $GREP " "`
30192      if test "x$has_space" != x; then
30193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30195      fi
30196      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30197    fi
30198  fi
30199
30200  # Now new_path has a complete unix path to the binary
30201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30202    # Keep paths in /bin as-is, but remove trailing .exe if any
30203    new_path="${new_path/%.exe/}"
30204    # Do not save /bin paths to all_fixpath_prefixes!
30205  else
30206    # Not in mixed or Windows style, start by that.
30207    new_path=`cmd //c echo $new_path`
30208
30209  input_path="$new_path"
30210  # Check if we need to convert this using DOS-style short mode. If the path
30211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30212  # take no chances and rewrite it.
30213  # Note: m4 eats our [], so we need to use [ and ] instead.
30214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30215  if test "x$has_forbidden_chars" != x; then
30216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30218  fi
30219
30220    # Output is in $new_path
30221
30222  windows_path="$new_path"
30223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30224    unix_path=`$CYGPATH -u "$windows_path"`
30225    new_path="$unix_path"
30226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30228    new_path="$unix_path"
30229  fi
30230
30231    # remove trailing .exe if any
30232    new_path="${new_path/%.exe/}"
30233
30234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30236  fi
30237
30238    else
30239      # We're on a unix platform. Hooray! :)
30240      # First separate the path from the arguments. This will split at the first
30241      # space.
30242      complete="$CXX"
30243      path="${complete%% *}"
30244      tmp="$complete EOL"
30245      arguments="${tmp#* }"
30246
30247      # Cannot rely on the command "which" here since it doesn't always work.
30248      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30249      if test -z "$is_absolute_path"; then
30250        # Path to executable is not absolute. Find it.
30251        IFS_save="$IFS"
30252        IFS=:
30253        for p in $PATH; do
30254          if test -f "$p/$path" && test -x "$p/$path"; then
30255            new_path="$p/$path"
30256            break
30257          fi
30258        done
30259        IFS="$IFS_save"
30260      else
30261        # This is an absolute path, we can use it without further modifications.
30262        new_path="$path"
30263      fi
30264
30265      if test "x$new_path" = x; then
30266        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30267$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30268        has_space=`$ECHO "$complete" | $GREP " "`
30269        if test "x$has_space" != x; then
30270          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30272        fi
30273        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30274      fi
30275    fi
30276
30277    # Now join together the path and the arguments once again
30278    if test "x$arguments" != xEOL; then
30279      new_complete="$new_path ${arguments% *}"
30280    else
30281      new_complete="$new_path"
30282    fi
30283
30284    if test "x$complete" != "x$new_complete"; then
30285      CXX="$new_complete"
30286      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30287$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30288    fi
30289  fi
30290
30291  TEST_COMPILER="$CXX"
30292  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30293  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30294  if test "x$OPENJDK_BUILD_OS" != xaix; then
30295    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30296    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30297$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30298
30299  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30300    # Follow a chain of symbolic links. Use readlink
30301    # where it exists, else fall back to horribly
30302    # complicated shell code.
30303    if test "x$READLINK_TESTED" != yes; then
30304      # On MacOSX there is a readlink tool with a different
30305      # purpose than the GNU readlink tool. Check the found readlink.
30306      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30307      if test "x$ISGNU" = x; then
30308        # A readlink that we do not know how to use.
30309        # Are there other non-GNU readlinks out there?
30310        READLINK_TESTED=yes
30311        READLINK=
30312      fi
30313    fi
30314
30315    if test "x$READLINK" != x; then
30316      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30317    else
30318      # Save the current directory for restoring afterwards
30319      STARTDIR=$PWD
30320      COUNTER=0
30321      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30322      sym_link_file=`$BASENAME $TEST_COMPILER`
30323      cd $sym_link_dir
30324      # Use -P flag to resolve symlinks in directories.
30325      cd `$THEPWDCMD -P`
30326      sym_link_dir=`$THEPWDCMD -P`
30327      # Resolve file symlinks
30328      while test $COUNTER -lt 20; do
30329        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30330        if test "x$ISLINK" == x; then
30331          # This is not a symbolic link! We are done!
30332          break
30333        fi
30334        # Again resolve directory symlinks since the target of the just found
30335        # link could be in a different directory
30336        cd `$DIRNAME $ISLINK`
30337        sym_link_dir=`$THEPWDCMD -P`
30338        sym_link_file=`$BASENAME $ISLINK`
30339        let COUNTER=COUNTER+1
30340      done
30341      cd $STARTDIR
30342      TEST_COMPILER=$sym_link_dir/$sym_link_file
30343    fi
30344  fi
30345
30346    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30347$as_echo "$TEST_COMPILER" >&6; }
30348  fi
30349  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30350$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30351
30352  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30353  if test "x$COMPILER_BASENAME" = "xccache"; then
30354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30355$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30356    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30357    # We want to control ccache invocation ourselves, so ignore this cc and try
30358    # searching again.
30359
30360    # Remove the path to the fake ccache cc from the PATH
30361    RETRY_COMPILER_SAVED_PATH="$PATH"
30362    COMPILER_DIRNAME=`$DIRNAME $CXX`
30363    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30364
30365    # Try again looking for our compiler
30366    if test -n "$ac_tool_prefix"; then
30367  for ac_prog in $TOOLCHAIN_CXX_BINARY
30368  do
30369    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30370set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30372$as_echo_n "checking for $ac_word... " >&6; }
30373if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30374  $as_echo_n "(cached) " >&6
30375else
30376  if test -n "$PROPER_COMPILER_CXX"; then
30377  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30378else
30379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30380for as_dir in $PATH
30381do
30382  IFS=$as_save_IFS
30383  test -z "$as_dir" && as_dir=.
30384    for ac_exec_ext in '' $ac_executable_extensions; do
30385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30386    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30388    break 2
30389  fi
30390done
30391  done
30392IFS=$as_save_IFS
30393
30394fi
30395fi
30396PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30397if test -n "$PROPER_COMPILER_CXX"; then
30398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30399$as_echo "$PROPER_COMPILER_CXX" >&6; }
30400else
30401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30402$as_echo "no" >&6; }
30403fi
30404
30405
30406    test -n "$PROPER_COMPILER_CXX" && break
30407  done
30408fi
30409if test -z "$PROPER_COMPILER_CXX"; then
30410  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30411  for ac_prog in $TOOLCHAIN_CXX_BINARY
30412do
30413  # Extract the first word of "$ac_prog", so it can be a program name with args.
30414set dummy $ac_prog; ac_word=$2
30415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30416$as_echo_n "checking for $ac_word... " >&6; }
30417if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30418  $as_echo_n "(cached) " >&6
30419else
30420  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30421  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30422else
30423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30424for as_dir in $PATH
30425do
30426  IFS=$as_save_IFS
30427  test -z "$as_dir" && as_dir=.
30428    for ac_exec_ext in '' $ac_executable_extensions; do
30429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30430    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30432    break 2
30433  fi
30434done
30435  done
30436IFS=$as_save_IFS
30437
30438fi
30439fi
30440ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30441if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30443$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30444else
30445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30446$as_echo "no" >&6; }
30447fi
30448
30449
30450  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30451done
30452
30453  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30454    PROPER_COMPILER_CXX=""
30455  else
30456    case $cross_compiling:$ac_tool_warned in
30457yes:)
30458{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30459$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30460ac_tool_warned=yes ;;
30461esac
30462    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30463  fi
30464fi
30465
30466
30467  # Only process if variable expands to non-empty
30468
30469  if test "x$PROPER_COMPILER_CXX" != x; then
30470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30471
30472  # First separate the path from the arguments. This will split at the first
30473  # space.
30474  complete="$PROPER_COMPILER_CXX"
30475  path="${complete%% *}"
30476  tmp="$complete EOL"
30477  arguments="${tmp#* }"
30478
30479  # Input might be given as Windows format, start by converting to
30480  # unix format.
30481  new_path=`$CYGPATH -u "$path"`
30482
30483  # Now try to locate executable using which
30484  new_path=`$WHICH "$new_path" 2> /dev/null`
30485  # bat and cmd files are not always considered executable in cygwin causing which
30486  # to not find them
30487  if test "x$new_path" = x \
30488      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30489      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30490    new_path=`$CYGPATH -u "$path"`
30491  fi
30492  if test "x$new_path" = x; then
30493    # Oops. Which didn't find the executable.
30494    # The splitting of arguments from the executable at a space might have been incorrect,
30495    # since paths with space are more likely in Windows. Give it another try with the whole
30496    # argument.
30497    path="$complete"
30498    arguments="EOL"
30499    new_path=`$CYGPATH -u "$path"`
30500    new_path=`$WHICH "$new_path" 2> /dev/null`
30501    # bat and cmd files are not always considered executable in cygwin causing which
30502    # to not find them
30503    if test "x$new_path" = x \
30504        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30505        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30506      new_path=`$CYGPATH -u "$path"`
30507    fi
30508    if test "x$new_path" = x; then
30509      # It's still not found. Now this is an unrecoverable error.
30510      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30511$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30512      has_space=`$ECHO "$complete" | $GREP " "`
30513      if test "x$has_space" != x; then
30514        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30515$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30516      fi
30517      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30518    fi
30519  fi
30520
30521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30524  # "foo.exe" is OK but "foo" is an error.
30525  #
30526  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30527  # It is also a way to make sure we got the proper file name for the real test later on.
30528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30529  if test "x$test_shortpath" = x; then
30530    # Short path failed, file does not exist as specified.
30531    # Try adding .exe or .cmd
30532    if test -f "${new_path}.exe"; then
30533      input_to_shortpath="${new_path}.exe"
30534    elif test -f "${new_path}.cmd"; then
30535      input_to_shortpath="${new_path}.cmd"
30536    else
30537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30538$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30539      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30540$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30541      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30542    fi
30543  else
30544    input_to_shortpath="$new_path"
30545  fi
30546
30547  # Call helper function which possibly converts this using DOS-style short mode.
30548  # If so, the updated path is stored in $new_path.
30549  new_path="$input_to_shortpath"
30550
30551  input_path="$input_to_shortpath"
30552  # Check if we need to convert this using DOS-style short mode. If the path
30553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30554  # take no chances and rewrite it.
30555  # Note: m4 eats our [], so we need to use [ and ] instead.
30556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30557  if test "x$has_forbidden_chars" != x; then
30558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30559    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30562      # Going to short mode and back again did indeed matter. Since short mode is
30563      # case insensitive, let's make it lowercase to improve readability.
30564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30565      # Now convert it back to Unix-stile (cygpath)
30566      input_path=`$CYGPATH -u "$shortmode_path"`
30567      new_path="$input_path"
30568    fi
30569  fi
30570
30571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30572  if test "x$test_cygdrive_prefix" = x; then
30573    # As a simple fix, exclude /usr/bin since it's not a real path.
30574    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30576      # a path prefixed by /cygdrive for fixpath to work.
30577      new_path="$CYGWIN_ROOT_PATH$input_path"
30578    fi
30579  fi
30580
30581  # remove trailing .exe if any
30582  new_path="${new_path/%.exe/}"
30583
30584    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30585
30586  # First separate the path from the arguments. This will split at the first
30587  # space.
30588  complete="$PROPER_COMPILER_CXX"
30589  path="${complete%% *}"
30590  tmp="$complete EOL"
30591  arguments="${tmp#* }"
30592
30593  # Input might be given as Windows format, start by converting to
30594  # unix format.
30595  new_path="$path"
30596
30597  windows_path="$new_path"
30598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30599    unix_path=`$CYGPATH -u "$windows_path"`
30600    new_path="$unix_path"
30601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30603    new_path="$unix_path"
30604  fi
30605
30606
30607  # Now try to locate executable using which
30608  new_path=`$WHICH "$new_path" 2> /dev/null`
30609
30610  if test "x$new_path" = x; then
30611    # Oops. Which didn't find the executable.
30612    # The splitting of arguments from the executable at a space might have been incorrect,
30613    # since paths with space are more likely in Windows. Give it another try with the whole
30614    # argument.
30615    path="$complete"
30616    arguments="EOL"
30617    new_path="$path"
30618
30619  windows_path="$new_path"
30620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30621    unix_path=`$CYGPATH -u "$windows_path"`
30622    new_path="$unix_path"
30623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30625    new_path="$unix_path"
30626  fi
30627
30628
30629    new_path=`$WHICH "$new_path" 2> /dev/null`
30630    # bat and cmd files are not always considered executable in MSYS causing which
30631    # to not find them
30632    if test "x$new_path" = x \
30633        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30634        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30635      new_path="$path"
30636
30637  windows_path="$new_path"
30638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30639    unix_path=`$CYGPATH -u "$windows_path"`
30640    new_path="$unix_path"
30641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30643    new_path="$unix_path"
30644  fi
30645
30646    fi
30647
30648    if test "x$new_path" = x; then
30649      # It's still not found. Now this is an unrecoverable error.
30650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30651$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30652      has_space=`$ECHO "$complete" | $GREP " "`
30653      if test "x$has_space" != x; then
30654        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30655$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30656      fi
30657      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30658    fi
30659  fi
30660
30661  # Now new_path has a complete unix path to the binary
30662  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30663    # Keep paths in /bin as-is, but remove trailing .exe if any
30664    new_path="${new_path/%.exe/}"
30665    # Do not save /bin paths to all_fixpath_prefixes!
30666  else
30667    # Not in mixed or Windows style, start by that.
30668    new_path=`cmd //c echo $new_path`
30669
30670  input_path="$new_path"
30671  # Check if we need to convert this using DOS-style short mode. If the path
30672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30673  # take no chances and rewrite it.
30674  # Note: m4 eats our [], so we need to use [ and ] instead.
30675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30676  if test "x$has_forbidden_chars" != x; then
30677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30678    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30679  fi
30680
30681    # Output is in $new_path
30682
30683  windows_path="$new_path"
30684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30685    unix_path=`$CYGPATH -u "$windows_path"`
30686    new_path="$unix_path"
30687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30689    new_path="$unix_path"
30690  fi
30691
30692    # remove trailing .exe if any
30693    new_path="${new_path/%.exe/}"
30694
30695    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30696    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30697  fi
30698
30699    else
30700      # We're on a unix platform. Hooray! :)
30701      # First separate the path from the arguments. This will split at the first
30702      # space.
30703      complete="$PROPER_COMPILER_CXX"
30704      path="${complete%% *}"
30705      tmp="$complete EOL"
30706      arguments="${tmp#* }"
30707
30708      # Cannot rely on the command "which" here since it doesn't always work.
30709      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30710      if test -z "$is_absolute_path"; then
30711        # Path to executable is not absolute. Find it.
30712        IFS_save="$IFS"
30713        IFS=:
30714        for p in $PATH; do
30715          if test -f "$p/$path" && test -x "$p/$path"; then
30716            new_path="$p/$path"
30717            break
30718          fi
30719        done
30720        IFS="$IFS_save"
30721      else
30722        # This is an absolute path, we can use it without further modifications.
30723        new_path="$path"
30724      fi
30725
30726      if test "x$new_path" = x; then
30727        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30728$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30729        has_space=`$ECHO "$complete" | $GREP " "`
30730        if test "x$has_space" != x; then
30731          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30732$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30733        fi
30734        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30735      fi
30736    fi
30737
30738    # Now join together the path and the arguments once again
30739    if test "x$arguments" != xEOL; then
30740      new_complete="$new_path ${arguments% *}"
30741    else
30742      new_complete="$new_path"
30743    fi
30744
30745    if test "x$complete" != "x$new_complete"; then
30746      PROPER_COMPILER_CXX="$new_complete"
30747      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30748$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30749    fi
30750  fi
30751
30752    PATH="$RETRY_COMPILER_SAVED_PATH"
30753
30754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30755$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30756
30757  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30758    # Follow a chain of symbolic links. Use readlink
30759    # where it exists, else fall back to horribly
30760    # complicated shell code.
30761    if test "x$READLINK_TESTED" != yes; then
30762      # On MacOSX there is a readlink tool with a different
30763      # purpose than the GNU readlink tool. Check the found readlink.
30764      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30765      if test "x$ISGNU" = x; then
30766        # A readlink that we do not know how to use.
30767        # Are there other non-GNU readlinks out there?
30768        READLINK_TESTED=yes
30769        READLINK=
30770      fi
30771    fi
30772
30773    if test "x$READLINK" != x; then
30774      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30775    else
30776      # Save the current directory for restoring afterwards
30777      STARTDIR=$PWD
30778      COUNTER=0
30779      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30780      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30781      cd $sym_link_dir
30782      # Use -P flag to resolve symlinks in directories.
30783      cd `$THEPWDCMD -P`
30784      sym_link_dir=`$THEPWDCMD -P`
30785      # Resolve file symlinks
30786      while test $COUNTER -lt 20; do
30787        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30788        if test "x$ISLINK" == x; then
30789          # This is not a symbolic link! We are done!
30790          break
30791        fi
30792        # Again resolve directory symlinks since the target of the just found
30793        # link could be in a different directory
30794        cd `$DIRNAME $ISLINK`
30795        sym_link_dir=`$THEPWDCMD -P`
30796        sym_link_file=`$BASENAME $ISLINK`
30797        let COUNTER=COUNTER+1
30798      done
30799      cd $STARTDIR
30800      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30801    fi
30802  fi
30803
30804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30805$as_echo "$PROPER_COMPILER_CXX" >&6; }
30806    CXX="$PROPER_COMPILER_CXX"
30807  else
30808    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30809$as_echo "no, keeping CXX" >&6; }
30810  fi
30811
30812
30813  COMPILER=$CXX
30814  COMPILER_NAME=$COMPILER_NAME
30815
30816  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30817    # cc -V output typically looks like
30818    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30819    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30820    # Check that this is likely to be the Solaris Studio cc.
30821    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30822    if test $? -ne 0; then
30823      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30824      { $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
30825$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30826      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30827$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30828      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30829$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30830      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30831    fi
30832    # Remove usage instructions (if present), and
30833    # collapse compiler output into a single line
30834    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30835        $SED -e 's/ *[Uu]sage:.*//'`
30836    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30837        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30838  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30839    # xlc -qversion output typically looks like
30840    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30841    #     Version: 11.01.0000.0015
30842    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30843    # Check that this is likely to be the IBM XL C compiler.
30844    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30845    if test $? -ne 0; then
30846      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30847      { $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
30848$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30849      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30850$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30851      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30852$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30853      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30854    fi
30855    # Collapse compiler output into a single line
30856    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30857    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30858        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30859  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30860    # There is no specific version flag, but all output starts with a version string.
30861    # First line typically looks something like:
30862    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30863    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30864    # Check that this is likely to be Microsoft CL.EXE.
30865    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30866    if test $? -ne 0; then
30867      { $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
30868$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30869      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30870$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30871      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30872    fi
30873    # Collapse compiler output into a single line
30874    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30875    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30876        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30877  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30878    # gcc --version output typically looks like
30879    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30880    #     Copyright (C) 2013 Free Software Foundation, Inc.
30881    #     This is free software; see the source for copying conditions.  There is NO
30882    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30883    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30884    # Check that this is likely to be GCC.
30885    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30886    if test $? -ne 0; then
30887      { $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
30888$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30889      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30890$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30891      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30892    fi
30893    # Remove Copyright and legalese from version string, and
30894    # collapse into a single line
30895    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30896        $SED -e 's/ *Copyright .*//'`
30897    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30898        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30899  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30900    # clang --version output typically looks like
30901    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30902    #    clang version 3.3 (tags/RELEASE_33/final)
30903    # or
30904    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30905    #    Target: x86_64-pc-linux-gnu
30906    #    Thread model: posix
30907    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30908    # Check that this is likely to be clang
30909    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30910    if test $? -ne 0; then
30911      { $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
30912$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30913      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30914$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30915      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30916    fi
30917    # Collapse compiler output into a single line
30918    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30919    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30920        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30921  else
30922      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30923  fi
30924  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30925  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30926  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30927  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30928
30929  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30930$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30931
30932
30933  # Now that we have resolved CXX ourself, let autoconf have its go at it
30934  ac_ext=cpp
30935ac_cpp='$CXXCPP $CPPFLAGS'
30936ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30937ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30938ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30939if test -z "$CXX"; then
30940  if test -n "$CCC"; then
30941    CXX=$CCC
30942  else
30943    if test -n "$ac_tool_prefix"; then
30944  for ac_prog in $CXX
30945  do
30946    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30947set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30949$as_echo_n "checking for $ac_word... " >&6; }
30950if ${ac_cv_prog_CXX+:} false; then :
30951  $as_echo_n "(cached) " >&6
30952else
30953  if test -n "$CXX"; then
30954  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30955else
30956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30957for as_dir in $PATH
30958do
30959  IFS=$as_save_IFS
30960  test -z "$as_dir" && as_dir=.
30961    for ac_exec_ext in '' $ac_executable_extensions; do
30962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30963    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30965    break 2
30966  fi
30967done
30968  done
30969IFS=$as_save_IFS
30970
30971fi
30972fi
30973CXX=$ac_cv_prog_CXX
30974if test -n "$CXX"; then
30975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30976$as_echo "$CXX" >&6; }
30977else
30978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30979$as_echo "no" >&6; }
30980fi
30981
30982
30983    test -n "$CXX" && break
30984  done
30985fi
30986if test -z "$CXX"; then
30987  ac_ct_CXX=$CXX
30988  for ac_prog in $CXX
30989do
30990  # Extract the first word of "$ac_prog", so it can be a program name with args.
30991set dummy $ac_prog; ac_word=$2
30992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30993$as_echo_n "checking for $ac_word... " >&6; }
30994if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30995  $as_echo_n "(cached) " >&6
30996else
30997  if test -n "$ac_ct_CXX"; then
30998  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30999else
31000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31001for as_dir in $PATH
31002do
31003  IFS=$as_save_IFS
31004  test -z "$as_dir" && as_dir=.
31005    for ac_exec_ext in '' $ac_executable_extensions; do
31006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31007    ac_cv_prog_ac_ct_CXX="$ac_prog"
31008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31009    break 2
31010  fi
31011done
31012  done
31013IFS=$as_save_IFS
31014
31015fi
31016fi
31017ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31018if test -n "$ac_ct_CXX"; then
31019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31020$as_echo "$ac_ct_CXX" >&6; }
31021else
31022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31023$as_echo "no" >&6; }
31024fi
31025
31026
31027  test -n "$ac_ct_CXX" && break
31028done
31029
31030  if test "x$ac_ct_CXX" = x; then
31031    CXX="g++"
31032  else
31033    case $cross_compiling:$ac_tool_warned in
31034yes:)
31035{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31036$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31037ac_tool_warned=yes ;;
31038esac
31039    CXX=$ac_ct_CXX
31040  fi
31041fi
31042
31043  fi
31044fi
31045# Provide some information about the compiler.
31046$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31047set X $ac_compile
31048ac_compiler=$2
31049for ac_option in --version -v -V -qversion; do
31050  { { ac_try="$ac_compiler $ac_option >&5"
31051case "(($ac_try" in
31052  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31053  *) ac_try_echo=$ac_try;;
31054esac
31055eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31056$as_echo "$ac_try_echo"; } >&5
31057  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31058  ac_status=$?
31059  if test -s conftest.err; then
31060    sed '10a\
31061... rest of stderr output deleted ...
31062         10q' conftest.err >conftest.er1
31063    cat conftest.er1 >&5
31064  fi
31065  rm -f conftest.er1 conftest.err
31066  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31067  test $ac_status = 0; }
31068done
31069
31070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31071$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31072if ${ac_cv_cxx_compiler_gnu+:} false; then :
31073  $as_echo_n "(cached) " >&6
31074else
31075  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31076/* end confdefs.h.  */
31077
31078int
31079main ()
31080{
31081#ifndef __GNUC__
31082       choke me
31083#endif
31084
31085  ;
31086  return 0;
31087}
31088_ACEOF
31089if ac_fn_cxx_try_compile "$LINENO"; then :
31090  ac_compiler_gnu=yes
31091else
31092  ac_compiler_gnu=no
31093fi
31094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31095ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31096
31097fi
31098{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31099$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31100if test $ac_compiler_gnu = yes; then
31101  GXX=yes
31102else
31103  GXX=
31104fi
31105ac_test_CXXFLAGS=${CXXFLAGS+set}
31106ac_save_CXXFLAGS=$CXXFLAGS
31107{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31108$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31109if ${ac_cv_prog_cxx_g+:} false; then :
31110  $as_echo_n "(cached) " >&6
31111else
31112  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31113   ac_cxx_werror_flag=yes
31114   ac_cv_prog_cxx_g=no
31115   CXXFLAGS="-g"
31116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31117/* end confdefs.h.  */
31118
31119int
31120main ()
31121{
31122
31123  ;
31124  return 0;
31125}
31126_ACEOF
31127if ac_fn_cxx_try_compile "$LINENO"; then :
31128  ac_cv_prog_cxx_g=yes
31129else
31130  CXXFLAGS=""
31131      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31132/* end confdefs.h.  */
31133
31134int
31135main ()
31136{
31137
31138  ;
31139  return 0;
31140}
31141_ACEOF
31142if ac_fn_cxx_try_compile "$LINENO"; then :
31143
31144else
31145  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31146	 CXXFLAGS="-g"
31147	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31148/* end confdefs.h.  */
31149
31150int
31151main ()
31152{
31153
31154  ;
31155  return 0;
31156}
31157_ACEOF
31158if ac_fn_cxx_try_compile "$LINENO"; then :
31159  ac_cv_prog_cxx_g=yes
31160fi
31161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31162fi
31163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31164fi
31165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31166   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31167fi
31168{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31169$as_echo "$ac_cv_prog_cxx_g" >&6; }
31170if test "$ac_test_CXXFLAGS" = set; then
31171  CXXFLAGS=$ac_save_CXXFLAGS
31172elif test $ac_cv_prog_cxx_g = yes; then
31173  if test "$GXX" = yes; then
31174    CXXFLAGS="-g -O2"
31175  else
31176    CXXFLAGS="-g"
31177  fi
31178else
31179  if test "$GXX" = yes; then
31180    CXXFLAGS="-O2"
31181  else
31182    CXXFLAGS=
31183  fi
31184fi
31185ac_ext=cpp
31186ac_cpp='$CXXCPP $CPPFLAGS'
31187ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31188ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31189ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31190
31191
31192  #
31193  # Setup the preprocessor (CPP and CXXCPP)
31194  #
31195  ac_ext=c
31196ac_cpp='$CPP $CPPFLAGS'
31197ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31198ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31199ac_compiler_gnu=$ac_cv_c_compiler_gnu
31200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31201$as_echo_n "checking how to run the C preprocessor... " >&6; }
31202# On Suns, sometimes $CPP names a directory.
31203if test -n "$CPP" && test -d "$CPP"; then
31204  CPP=
31205fi
31206if test -z "$CPP"; then
31207  if ${ac_cv_prog_CPP+:} false; then :
31208  $as_echo_n "(cached) " >&6
31209else
31210      # Double quotes because CPP needs to be expanded
31211    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31212    do
31213      ac_preproc_ok=false
31214for ac_c_preproc_warn_flag in '' yes
31215do
31216  # Use a header file that comes with gcc, so configuring glibc
31217  # with a fresh cross-compiler works.
31218  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31219  # <limits.h> exists even on freestanding compilers.
31220  # On the NeXT, cc -E runs the code through the compiler's parser,
31221  # not just through cpp. "Syntax error" is here to catch this case.
31222  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31223/* end confdefs.h.  */
31224#ifdef __STDC__
31225# include <limits.h>
31226#else
31227# include <assert.h>
31228#endif
31229		     Syntax error
31230_ACEOF
31231if ac_fn_c_try_cpp "$LINENO"; then :
31232
31233else
31234  # Broken: fails on valid input.
31235continue
31236fi
31237rm -f conftest.err conftest.i conftest.$ac_ext
31238
31239  # OK, works on sane cases.  Now check whether nonexistent headers
31240  # can be detected and how.
31241  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31242/* end confdefs.h.  */
31243#include <ac_nonexistent.h>
31244_ACEOF
31245if ac_fn_c_try_cpp "$LINENO"; then :
31246  # Broken: success on invalid input.
31247continue
31248else
31249  # Passes both tests.
31250ac_preproc_ok=:
31251break
31252fi
31253rm -f conftest.err conftest.i conftest.$ac_ext
31254
31255done
31256# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31257rm -f conftest.i conftest.err conftest.$ac_ext
31258if $ac_preproc_ok; then :
31259  break
31260fi
31261
31262    done
31263    ac_cv_prog_CPP=$CPP
31264
31265fi
31266  CPP=$ac_cv_prog_CPP
31267else
31268  ac_cv_prog_CPP=$CPP
31269fi
31270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31271$as_echo "$CPP" >&6; }
31272ac_preproc_ok=false
31273for ac_c_preproc_warn_flag in '' yes
31274do
31275  # Use a header file that comes with gcc, so configuring glibc
31276  # with a fresh cross-compiler works.
31277  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31278  # <limits.h> exists even on freestanding compilers.
31279  # On the NeXT, cc -E runs the code through the compiler's parser,
31280  # not just through cpp. "Syntax error" is here to catch this case.
31281  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31282/* end confdefs.h.  */
31283#ifdef __STDC__
31284# include <limits.h>
31285#else
31286# include <assert.h>
31287#endif
31288		     Syntax error
31289_ACEOF
31290if ac_fn_c_try_cpp "$LINENO"; then :
31291
31292else
31293  # Broken: fails on valid input.
31294continue
31295fi
31296rm -f conftest.err conftest.i conftest.$ac_ext
31297
31298  # OK, works on sane cases.  Now check whether nonexistent headers
31299  # can be detected and how.
31300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31301/* end confdefs.h.  */
31302#include <ac_nonexistent.h>
31303_ACEOF
31304if ac_fn_c_try_cpp "$LINENO"; then :
31305  # Broken: success on invalid input.
31306continue
31307else
31308  # Passes both tests.
31309ac_preproc_ok=:
31310break
31311fi
31312rm -f conftest.err conftest.i conftest.$ac_ext
31313
31314done
31315# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31316rm -f conftest.i conftest.err conftest.$ac_ext
31317if $ac_preproc_ok; then :
31318
31319else
31320  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31321$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31322as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31323See \`config.log' for more details" "$LINENO" 5; }
31324fi
31325
31326ac_ext=cpp
31327ac_cpp='$CXXCPP $CPPFLAGS'
31328ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31329ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31330ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31331
31332
31333  # Only process if variable expands to non-empty
31334
31335  if test "x$CPP" != x; then
31336    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31337
31338  # First separate the path from the arguments. This will split at the first
31339  # space.
31340  complete="$CPP"
31341  path="${complete%% *}"
31342  tmp="$complete EOL"
31343  arguments="${tmp#* }"
31344
31345  # Input might be given as Windows format, start by converting to
31346  # unix format.
31347  new_path=`$CYGPATH -u "$path"`
31348
31349  # Now try to locate executable using which
31350  new_path=`$WHICH "$new_path" 2> /dev/null`
31351  # bat and cmd files are not always considered executable in cygwin causing which
31352  # to not find them
31353  if test "x$new_path" = x \
31354      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31355      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31356    new_path=`$CYGPATH -u "$path"`
31357  fi
31358  if test "x$new_path" = x; then
31359    # Oops. Which didn't find the executable.
31360    # The splitting of arguments from the executable at a space might have been incorrect,
31361    # since paths with space are more likely in Windows. Give it another try with the whole
31362    # argument.
31363    path="$complete"
31364    arguments="EOL"
31365    new_path=`$CYGPATH -u "$path"`
31366    new_path=`$WHICH "$new_path" 2> /dev/null`
31367    # bat and cmd files are not always considered executable in cygwin causing which
31368    # to not find them
31369    if test "x$new_path" = x \
31370        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31371        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31372      new_path=`$CYGPATH -u "$path"`
31373    fi
31374    if test "x$new_path" = x; then
31375      # It's still not found. Now this is an unrecoverable error.
31376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31377$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31378      has_space=`$ECHO "$complete" | $GREP " "`
31379      if test "x$has_space" != x; then
31380        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31381$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31382      fi
31383      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31384    fi
31385  fi
31386
31387  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31388  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31389  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31390  # "foo.exe" is OK but "foo" is an error.
31391  #
31392  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31393  # It is also a way to make sure we got the proper file name for the real test later on.
31394  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31395  if test "x$test_shortpath" = x; then
31396    # Short path failed, file does not exist as specified.
31397    # Try adding .exe or .cmd
31398    if test -f "${new_path}.exe"; then
31399      input_to_shortpath="${new_path}.exe"
31400    elif test -f "${new_path}.cmd"; then
31401      input_to_shortpath="${new_path}.cmd"
31402    else
31403      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31404$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31405      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31406$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31407      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31408    fi
31409  else
31410    input_to_shortpath="$new_path"
31411  fi
31412
31413  # Call helper function which possibly converts this using DOS-style short mode.
31414  # If so, the updated path is stored in $new_path.
31415  new_path="$input_to_shortpath"
31416
31417  input_path="$input_to_shortpath"
31418  # Check if we need to convert this using DOS-style short mode. If the path
31419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31420  # take no chances and rewrite it.
31421  # Note: m4 eats our [], so we need to use [ and ] instead.
31422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31423  if test "x$has_forbidden_chars" != x; then
31424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31428      # Going to short mode and back again did indeed matter. Since short mode is
31429      # case insensitive, let's make it lowercase to improve readability.
31430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31431      # Now convert it back to Unix-stile (cygpath)
31432      input_path=`$CYGPATH -u "$shortmode_path"`
31433      new_path="$input_path"
31434    fi
31435  fi
31436
31437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31438  if test "x$test_cygdrive_prefix" = x; then
31439    # As a simple fix, exclude /usr/bin since it's not a real path.
31440    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31442      # a path prefixed by /cygdrive for fixpath to work.
31443      new_path="$CYGWIN_ROOT_PATH$input_path"
31444    fi
31445  fi
31446
31447  # remove trailing .exe if any
31448  new_path="${new_path/%.exe/}"
31449
31450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31451
31452  # First separate the path from the arguments. This will split at the first
31453  # space.
31454  complete="$CPP"
31455  path="${complete%% *}"
31456  tmp="$complete EOL"
31457  arguments="${tmp#* }"
31458
31459  # Input might be given as Windows format, start by converting to
31460  # unix format.
31461  new_path="$path"
31462
31463  windows_path="$new_path"
31464  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31465    unix_path=`$CYGPATH -u "$windows_path"`
31466    new_path="$unix_path"
31467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31468    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31469    new_path="$unix_path"
31470  fi
31471
31472
31473  # Now try to locate executable using which
31474  new_path=`$WHICH "$new_path" 2> /dev/null`
31475
31476  if test "x$new_path" = x; then
31477    # Oops. Which didn't find the executable.
31478    # The splitting of arguments from the executable at a space might have been incorrect,
31479    # since paths with space are more likely in Windows. Give it another try with the whole
31480    # argument.
31481    path="$complete"
31482    arguments="EOL"
31483    new_path="$path"
31484
31485  windows_path="$new_path"
31486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31487    unix_path=`$CYGPATH -u "$windows_path"`
31488    new_path="$unix_path"
31489  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31490    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31491    new_path="$unix_path"
31492  fi
31493
31494
31495    new_path=`$WHICH "$new_path" 2> /dev/null`
31496    # bat and cmd files are not always considered executable in MSYS causing which
31497    # to not find them
31498    if test "x$new_path" = x \
31499        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31500        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31501      new_path="$path"
31502
31503  windows_path="$new_path"
31504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31505    unix_path=`$CYGPATH -u "$windows_path"`
31506    new_path="$unix_path"
31507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31509    new_path="$unix_path"
31510  fi
31511
31512    fi
31513
31514    if test "x$new_path" = x; then
31515      # It's still not found. Now this is an unrecoverable error.
31516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31517$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31518      has_space=`$ECHO "$complete" | $GREP " "`
31519      if test "x$has_space" != x; then
31520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31522      fi
31523      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31524    fi
31525  fi
31526
31527  # Now new_path has a complete unix path to the binary
31528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31529    # Keep paths in /bin as-is, but remove trailing .exe if any
31530    new_path="${new_path/%.exe/}"
31531    # Do not save /bin paths to all_fixpath_prefixes!
31532  else
31533    # Not in mixed or Windows style, start by that.
31534    new_path=`cmd //c echo $new_path`
31535
31536  input_path="$new_path"
31537  # Check if we need to convert this using DOS-style short mode. If the path
31538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31539  # take no chances and rewrite it.
31540  # Note: m4 eats our [], so we need to use [ and ] instead.
31541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31542  if test "x$has_forbidden_chars" != x; then
31543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31545  fi
31546
31547    # Output is in $new_path
31548
31549  windows_path="$new_path"
31550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31551    unix_path=`$CYGPATH -u "$windows_path"`
31552    new_path="$unix_path"
31553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31555    new_path="$unix_path"
31556  fi
31557
31558    # remove trailing .exe if any
31559    new_path="${new_path/%.exe/}"
31560
31561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31563  fi
31564
31565    else
31566      # We're on a unix platform. Hooray! :)
31567      # First separate the path from the arguments. This will split at the first
31568      # space.
31569      complete="$CPP"
31570      path="${complete%% *}"
31571      tmp="$complete EOL"
31572      arguments="${tmp#* }"
31573
31574      # Cannot rely on the command "which" here since it doesn't always work.
31575      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31576      if test -z "$is_absolute_path"; then
31577        # Path to executable is not absolute. Find it.
31578        IFS_save="$IFS"
31579        IFS=:
31580        for p in $PATH; do
31581          if test -f "$p/$path" && test -x "$p/$path"; then
31582            new_path="$p/$path"
31583            break
31584          fi
31585        done
31586        IFS="$IFS_save"
31587      else
31588        # This is an absolute path, we can use it without further modifications.
31589        new_path="$path"
31590      fi
31591
31592      if test "x$new_path" = x; then
31593        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31594$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31595        has_space=`$ECHO "$complete" | $GREP " "`
31596        if test "x$has_space" != x; then
31597          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31599        fi
31600        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31601      fi
31602    fi
31603
31604    # Now join together the path and the arguments once again
31605    if test "x$arguments" != xEOL; then
31606      new_complete="$new_path ${arguments% *}"
31607    else
31608      new_complete="$new_path"
31609    fi
31610
31611    if test "x$complete" != "x$new_complete"; then
31612      CPP="$new_complete"
31613      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31614$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31615    fi
31616  fi
31617
31618  ac_ext=cpp
31619ac_cpp='$CXXCPP $CPPFLAGS'
31620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31624$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31625if test -z "$CXXCPP"; then
31626  if ${ac_cv_prog_CXXCPP+:} false; then :
31627  $as_echo_n "(cached) " >&6
31628else
31629      # Double quotes because CXXCPP needs to be expanded
31630    for CXXCPP in "$CXX -E" "/lib/cpp"
31631    do
31632      ac_preproc_ok=false
31633for ac_cxx_preproc_warn_flag in '' yes
31634do
31635  # Use a header file that comes with gcc, so configuring glibc
31636  # with a fresh cross-compiler works.
31637  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31638  # <limits.h> exists even on freestanding compilers.
31639  # On the NeXT, cc -E runs the code through the compiler's parser,
31640  # not just through cpp. "Syntax error" is here to catch this case.
31641  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31642/* end confdefs.h.  */
31643#ifdef __STDC__
31644# include <limits.h>
31645#else
31646# include <assert.h>
31647#endif
31648		     Syntax error
31649_ACEOF
31650if ac_fn_cxx_try_cpp "$LINENO"; then :
31651
31652else
31653  # Broken: fails on valid input.
31654continue
31655fi
31656rm -f conftest.err conftest.i conftest.$ac_ext
31657
31658  # OK, works on sane cases.  Now check whether nonexistent headers
31659  # can be detected and how.
31660  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31661/* end confdefs.h.  */
31662#include <ac_nonexistent.h>
31663_ACEOF
31664if ac_fn_cxx_try_cpp "$LINENO"; then :
31665  # Broken: success on invalid input.
31666continue
31667else
31668  # Passes both tests.
31669ac_preproc_ok=:
31670break
31671fi
31672rm -f conftest.err conftest.i conftest.$ac_ext
31673
31674done
31675# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31676rm -f conftest.i conftest.err conftest.$ac_ext
31677if $ac_preproc_ok; then :
31678  break
31679fi
31680
31681    done
31682    ac_cv_prog_CXXCPP=$CXXCPP
31683
31684fi
31685  CXXCPP=$ac_cv_prog_CXXCPP
31686else
31687  ac_cv_prog_CXXCPP=$CXXCPP
31688fi
31689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31690$as_echo "$CXXCPP" >&6; }
31691ac_preproc_ok=false
31692for ac_cxx_preproc_warn_flag in '' yes
31693do
31694  # Use a header file that comes with gcc, so configuring glibc
31695  # with a fresh cross-compiler works.
31696  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31697  # <limits.h> exists even on freestanding compilers.
31698  # On the NeXT, cc -E runs the code through the compiler's parser,
31699  # not just through cpp. "Syntax error" is here to catch this case.
31700  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31701/* end confdefs.h.  */
31702#ifdef __STDC__
31703# include <limits.h>
31704#else
31705# include <assert.h>
31706#endif
31707		     Syntax error
31708_ACEOF
31709if ac_fn_cxx_try_cpp "$LINENO"; then :
31710
31711else
31712  # Broken: fails on valid input.
31713continue
31714fi
31715rm -f conftest.err conftest.i conftest.$ac_ext
31716
31717  # OK, works on sane cases.  Now check whether nonexistent headers
31718  # can be detected and how.
31719  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31720/* end confdefs.h.  */
31721#include <ac_nonexistent.h>
31722_ACEOF
31723if ac_fn_cxx_try_cpp "$LINENO"; then :
31724  # Broken: success on invalid input.
31725continue
31726else
31727  # Passes both tests.
31728ac_preproc_ok=:
31729break
31730fi
31731rm -f conftest.err conftest.i conftest.$ac_ext
31732
31733done
31734# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31735rm -f conftest.i conftest.err conftest.$ac_ext
31736if $ac_preproc_ok; then :
31737
31738else
31739  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31740$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31741as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31742See \`config.log' for more details" "$LINENO" 5; }
31743fi
31744
31745ac_ext=cpp
31746ac_cpp='$CXXCPP $CPPFLAGS'
31747ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31748ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31749ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31750
31751
31752  # Only process if variable expands to non-empty
31753
31754  if test "x$CXXCPP" != x; then
31755    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31756
31757  # First separate the path from the arguments. This will split at the first
31758  # space.
31759  complete="$CXXCPP"
31760  path="${complete%% *}"
31761  tmp="$complete EOL"
31762  arguments="${tmp#* }"
31763
31764  # Input might be given as Windows format, start by converting to
31765  # unix format.
31766  new_path=`$CYGPATH -u "$path"`
31767
31768  # Now try to locate executable using which
31769  new_path=`$WHICH "$new_path" 2> /dev/null`
31770  # bat and cmd files are not always considered executable in cygwin causing which
31771  # to not find them
31772  if test "x$new_path" = x \
31773      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31774      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31775    new_path=`$CYGPATH -u "$path"`
31776  fi
31777  if test "x$new_path" = x; then
31778    # Oops. Which didn't find the executable.
31779    # The splitting of arguments from the executable at a space might have been incorrect,
31780    # since paths with space are more likely in Windows. Give it another try with the whole
31781    # argument.
31782    path="$complete"
31783    arguments="EOL"
31784    new_path=`$CYGPATH -u "$path"`
31785    new_path=`$WHICH "$new_path" 2> /dev/null`
31786    # bat and cmd files are not always considered executable in cygwin causing which
31787    # to not find them
31788    if test "x$new_path" = x \
31789        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31790        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31791      new_path=`$CYGPATH -u "$path"`
31792    fi
31793    if test "x$new_path" = x; then
31794      # It's still not found. Now this is an unrecoverable error.
31795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31796$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31797      has_space=`$ECHO "$complete" | $GREP " "`
31798      if test "x$has_space" != x; then
31799        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31800$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31801      fi
31802      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31803    fi
31804  fi
31805
31806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31809  # "foo.exe" is OK but "foo" is an error.
31810  #
31811  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31812  # It is also a way to make sure we got the proper file name for the real test later on.
31813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31814  if test "x$test_shortpath" = x; then
31815    # Short path failed, file does not exist as specified.
31816    # Try adding .exe or .cmd
31817    if test -f "${new_path}.exe"; then
31818      input_to_shortpath="${new_path}.exe"
31819    elif test -f "${new_path}.cmd"; then
31820      input_to_shortpath="${new_path}.cmd"
31821    else
31822      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31823$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31824      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31825$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31826      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31827    fi
31828  else
31829    input_to_shortpath="$new_path"
31830  fi
31831
31832  # Call helper function which possibly converts this using DOS-style short mode.
31833  # If so, the updated path is stored in $new_path.
31834  new_path="$input_to_shortpath"
31835
31836  input_path="$input_to_shortpath"
31837  # Check if we need to convert this using DOS-style short mode. If the path
31838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31839  # take no chances and rewrite it.
31840  # Note: m4 eats our [], so we need to use [ and ] instead.
31841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31842  if test "x$has_forbidden_chars" != x; then
31843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31844    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31845    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31846    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31847      # Going to short mode and back again did indeed matter. Since short mode is
31848      # case insensitive, let's make it lowercase to improve readability.
31849      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31850      # Now convert it back to Unix-stile (cygpath)
31851      input_path=`$CYGPATH -u "$shortmode_path"`
31852      new_path="$input_path"
31853    fi
31854  fi
31855
31856  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31857  if test "x$test_cygdrive_prefix" = x; then
31858    # As a simple fix, exclude /usr/bin since it's not a real path.
31859    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31860      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31861      # a path prefixed by /cygdrive for fixpath to work.
31862      new_path="$CYGWIN_ROOT_PATH$input_path"
31863    fi
31864  fi
31865
31866  # remove trailing .exe if any
31867  new_path="${new_path/%.exe/}"
31868
31869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31870
31871  # First separate the path from the arguments. This will split at the first
31872  # space.
31873  complete="$CXXCPP"
31874  path="${complete%% *}"
31875  tmp="$complete EOL"
31876  arguments="${tmp#* }"
31877
31878  # Input might be given as Windows format, start by converting to
31879  # unix format.
31880  new_path="$path"
31881
31882  windows_path="$new_path"
31883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31884    unix_path=`$CYGPATH -u "$windows_path"`
31885    new_path="$unix_path"
31886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31887    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31888    new_path="$unix_path"
31889  fi
31890
31891
31892  # Now try to locate executable using which
31893  new_path=`$WHICH "$new_path" 2> /dev/null`
31894
31895  if test "x$new_path" = x; then
31896    # Oops. Which didn't find the executable.
31897    # The splitting of arguments from the executable at a space might have been incorrect,
31898    # since paths with space are more likely in Windows. Give it another try with the whole
31899    # argument.
31900    path="$complete"
31901    arguments="EOL"
31902    new_path="$path"
31903
31904  windows_path="$new_path"
31905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31906    unix_path=`$CYGPATH -u "$windows_path"`
31907    new_path="$unix_path"
31908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31910    new_path="$unix_path"
31911  fi
31912
31913
31914    new_path=`$WHICH "$new_path" 2> /dev/null`
31915    # bat and cmd files are not always considered executable in MSYS causing which
31916    # to not find them
31917    if test "x$new_path" = x \
31918        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31919        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31920      new_path="$path"
31921
31922  windows_path="$new_path"
31923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31924    unix_path=`$CYGPATH -u "$windows_path"`
31925    new_path="$unix_path"
31926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31928    new_path="$unix_path"
31929  fi
31930
31931    fi
31932
31933    if test "x$new_path" = x; then
31934      # It's still not found. Now this is an unrecoverable error.
31935      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31936$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31937      has_space=`$ECHO "$complete" | $GREP " "`
31938      if test "x$has_space" != x; then
31939        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31940$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31941      fi
31942      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31943    fi
31944  fi
31945
31946  # Now new_path has a complete unix path to the binary
31947  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31948    # Keep paths in /bin as-is, but remove trailing .exe if any
31949    new_path="${new_path/%.exe/}"
31950    # Do not save /bin paths to all_fixpath_prefixes!
31951  else
31952    # Not in mixed or Windows style, start by that.
31953    new_path=`cmd //c echo $new_path`
31954
31955  input_path="$new_path"
31956  # Check if we need to convert this using DOS-style short mode. If the path
31957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31958  # take no chances and rewrite it.
31959  # Note: m4 eats our [], so we need to use [ and ] instead.
31960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31961  if test "x$has_forbidden_chars" != x; then
31962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31964  fi
31965
31966    # Output is in $new_path
31967
31968  windows_path="$new_path"
31969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31970    unix_path=`$CYGPATH -u "$windows_path"`
31971    new_path="$unix_path"
31972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31974    new_path="$unix_path"
31975  fi
31976
31977    # remove trailing .exe if any
31978    new_path="${new_path/%.exe/}"
31979
31980    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31981    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31982  fi
31983
31984    else
31985      # We're on a unix platform. Hooray! :)
31986      # First separate the path from the arguments. This will split at the first
31987      # space.
31988      complete="$CXXCPP"
31989      path="${complete%% *}"
31990      tmp="$complete EOL"
31991      arguments="${tmp#* }"
31992
31993      # Cannot rely on the command "which" here since it doesn't always work.
31994      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31995      if test -z "$is_absolute_path"; then
31996        # Path to executable is not absolute. Find it.
31997        IFS_save="$IFS"
31998        IFS=:
31999        for p in $PATH; do
32000          if test -f "$p/$path" && test -x "$p/$path"; then
32001            new_path="$p/$path"
32002            break
32003          fi
32004        done
32005        IFS="$IFS_save"
32006      else
32007        # This is an absolute path, we can use it without further modifications.
32008        new_path="$path"
32009      fi
32010
32011      if test "x$new_path" = x; then
32012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32013$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32014        has_space=`$ECHO "$complete" | $GREP " "`
32015        if test "x$has_space" != x; then
32016          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32017$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32018        fi
32019        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32020      fi
32021    fi
32022
32023    # Now join together the path and the arguments once again
32024    if test "x$arguments" != xEOL; then
32025      new_complete="$new_path ${arguments% *}"
32026    else
32027      new_complete="$new_path"
32028    fi
32029
32030    if test "x$complete" != "x$new_complete"; then
32031      CXXCPP="$new_complete"
32032      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32033$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32034    fi
32035  fi
32036
32037
32038  #
32039  # Setup the linker (LD)
32040  #
32041  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32042    # In the Microsoft toolchain we have a separate LD command "link".
32043    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32044    # a cygwin program for something completely different.
32045    # Extract the first word of "link", so it can be a program name with args.
32046set dummy link; ac_word=$2
32047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32048$as_echo_n "checking for $ac_word... " >&6; }
32049if ${ac_cv_prog_LD+:} false; then :
32050  $as_echo_n "(cached) " >&6
32051else
32052  if test -n "$LD"; then
32053  ac_cv_prog_LD="$LD" # Let the user override the test.
32054else
32055  ac_prog_rejected=no
32056as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32057for as_dir in $PATH
32058do
32059  IFS=$as_save_IFS
32060  test -z "$as_dir" && as_dir=.
32061    for ac_exec_ext in '' $ac_executable_extensions; do
32062  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32063    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32064       ac_prog_rejected=yes
32065       continue
32066     fi
32067    ac_cv_prog_LD="link"
32068    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32069    break 2
32070  fi
32071done
32072  done
32073IFS=$as_save_IFS
32074
32075if test $ac_prog_rejected = yes; then
32076  # We found a bogon in the path, so make sure we never use it.
32077  set dummy $ac_cv_prog_LD
32078  shift
32079  if test $# != 0; then
32080    # We chose a different compiler from the bogus one.
32081    # However, it has the same basename, so the bogon will be chosen
32082    # first if we set LD to just the basename; use the full file name.
32083    shift
32084    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32085  fi
32086fi
32087fi
32088fi
32089LD=$ac_cv_prog_LD
32090if test -n "$LD"; then
32091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32092$as_echo "$LD" >&6; }
32093else
32094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32095$as_echo "no" >&6; }
32096fi
32097
32098
32099
32100  # Only process if variable expands to non-empty
32101
32102  if test "x$LD" != x; then
32103    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32104
32105  # First separate the path from the arguments. This will split at the first
32106  # space.
32107  complete="$LD"
32108  path="${complete%% *}"
32109  tmp="$complete EOL"
32110  arguments="${tmp#* }"
32111
32112  # Input might be given as Windows format, start by converting to
32113  # unix format.
32114  new_path=`$CYGPATH -u "$path"`
32115
32116  # Now try to locate executable using which
32117  new_path=`$WHICH "$new_path" 2> /dev/null`
32118  # bat and cmd files are not always considered executable in cygwin causing which
32119  # to not find them
32120  if test "x$new_path" = x \
32121      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32122      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32123    new_path=`$CYGPATH -u "$path"`
32124  fi
32125  if test "x$new_path" = x; then
32126    # Oops. Which didn't find the executable.
32127    # The splitting of arguments from the executable at a space might have been incorrect,
32128    # since paths with space are more likely in Windows. Give it another try with the whole
32129    # argument.
32130    path="$complete"
32131    arguments="EOL"
32132    new_path=`$CYGPATH -u "$path"`
32133    new_path=`$WHICH "$new_path" 2> /dev/null`
32134    # bat and cmd files are not always considered executable in cygwin causing which
32135    # to not find them
32136    if test "x$new_path" = x \
32137        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32138        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32139      new_path=`$CYGPATH -u "$path"`
32140    fi
32141    if test "x$new_path" = x; then
32142      # It's still not found. Now this is an unrecoverable error.
32143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32144$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32145      has_space=`$ECHO "$complete" | $GREP " "`
32146      if test "x$has_space" != x; then
32147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32149      fi
32150      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32151    fi
32152  fi
32153
32154  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32155  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32156  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32157  # "foo.exe" is OK but "foo" is an error.
32158  #
32159  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32160  # It is also a way to make sure we got the proper file name for the real test later on.
32161  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32162  if test "x$test_shortpath" = x; then
32163    # Short path failed, file does not exist as specified.
32164    # Try adding .exe or .cmd
32165    if test -f "${new_path}.exe"; then
32166      input_to_shortpath="${new_path}.exe"
32167    elif test -f "${new_path}.cmd"; then
32168      input_to_shortpath="${new_path}.cmd"
32169    else
32170      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32171$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32172      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32173$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32174      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32175    fi
32176  else
32177    input_to_shortpath="$new_path"
32178  fi
32179
32180  # Call helper function which possibly converts this using DOS-style short mode.
32181  # If so, the updated path is stored in $new_path.
32182  new_path="$input_to_shortpath"
32183
32184  input_path="$input_to_shortpath"
32185  # Check if we need to convert this using DOS-style short mode. If the path
32186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32187  # take no chances and rewrite it.
32188  # Note: m4 eats our [], so we need to use [ and ] instead.
32189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32190  if test "x$has_forbidden_chars" != x; then
32191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32192    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32193    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32194    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32195      # Going to short mode and back again did indeed matter. Since short mode is
32196      # case insensitive, let's make it lowercase to improve readability.
32197      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32198      # Now convert it back to Unix-stile (cygpath)
32199      input_path=`$CYGPATH -u "$shortmode_path"`
32200      new_path="$input_path"
32201    fi
32202  fi
32203
32204  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32205  if test "x$test_cygdrive_prefix" = x; then
32206    # As a simple fix, exclude /usr/bin since it's not a real path.
32207    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32208      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32209      # a path prefixed by /cygdrive for fixpath to work.
32210      new_path="$CYGWIN_ROOT_PATH$input_path"
32211    fi
32212  fi
32213
32214  # remove trailing .exe if any
32215  new_path="${new_path/%.exe/}"
32216
32217    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32218
32219  # First separate the path from the arguments. This will split at the first
32220  # space.
32221  complete="$LD"
32222  path="${complete%% *}"
32223  tmp="$complete EOL"
32224  arguments="${tmp#* }"
32225
32226  # Input might be given as Windows format, start by converting to
32227  # unix format.
32228  new_path="$path"
32229
32230  windows_path="$new_path"
32231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32232    unix_path=`$CYGPATH -u "$windows_path"`
32233    new_path="$unix_path"
32234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32236    new_path="$unix_path"
32237  fi
32238
32239
32240  # Now try to locate executable using which
32241  new_path=`$WHICH "$new_path" 2> /dev/null`
32242
32243  if test "x$new_path" = x; then
32244    # Oops. Which didn't find the executable.
32245    # The splitting of arguments from the executable at a space might have been incorrect,
32246    # since paths with space are more likely in Windows. Give it another try with the whole
32247    # argument.
32248    path="$complete"
32249    arguments="EOL"
32250    new_path="$path"
32251
32252  windows_path="$new_path"
32253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32254    unix_path=`$CYGPATH -u "$windows_path"`
32255    new_path="$unix_path"
32256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32258    new_path="$unix_path"
32259  fi
32260
32261
32262    new_path=`$WHICH "$new_path" 2> /dev/null`
32263    # bat and cmd files are not always considered executable in MSYS causing which
32264    # to not find them
32265    if test "x$new_path" = x \
32266        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32267        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32268      new_path="$path"
32269
32270  windows_path="$new_path"
32271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32272    unix_path=`$CYGPATH -u "$windows_path"`
32273    new_path="$unix_path"
32274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32276    new_path="$unix_path"
32277  fi
32278
32279    fi
32280
32281    if test "x$new_path" = x; then
32282      # It's still not found. Now this is an unrecoverable error.
32283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32284$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32285      has_space=`$ECHO "$complete" | $GREP " "`
32286      if test "x$has_space" != x; then
32287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32289      fi
32290      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32291    fi
32292  fi
32293
32294  # Now new_path has a complete unix path to the binary
32295  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32296    # Keep paths in /bin as-is, but remove trailing .exe if any
32297    new_path="${new_path/%.exe/}"
32298    # Do not save /bin paths to all_fixpath_prefixes!
32299  else
32300    # Not in mixed or Windows style, start by that.
32301    new_path=`cmd //c echo $new_path`
32302
32303  input_path="$new_path"
32304  # Check if we need to convert this using DOS-style short mode. If the path
32305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32306  # take no chances and rewrite it.
32307  # Note: m4 eats our [], so we need to use [ and ] instead.
32308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32309  if test "x$has_forbidden_chars" != x; then
32310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32311    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32312  fi
32313
32314    # Output is in $new_path
32315
32316  windows_path="$new_path"
32317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32318    unix_path=`$CYGPATH -u "$windows_path"`
32319    new_path="$unix_path"
32320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32322    new_path="$unix_path"
32323  fi
32324
32325    # remove trailing .exe if any
32326    new_path="${new_path/%.exe/}"
32327
32328    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32329    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32330  fi
32331
32332    else
32333      # We're on a unix platform. Hooray! :)
32334      # First separate the path from the arguments. This will split at the first
32335      # space.
32336      complete="$LD"
32337      path="${complete%% *}"
32338      tmp="$complete EOL"
32339      arguments="${tmp#* }"
32340
32341      # Cannot rely on the command "which" here since it doesn't always work.
32342      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32343      if test -z "$is_absolute_path"; then
32344        # Path to executable is not absolute. Find it.
32345        IFS_save="$IFS"
32346        IFS=:
32347        for p in $PATH; do
32348          if test -f "$p/$path" && test -x "$p/$path"; then
32349            new_path="$p/$path"
32350            break
32351          fi
32352        done
32353        IFS="$IFS_save"
32354      else
32355        # This is an absolute path, we can use it without further modifications.
32356        new_path="$path"
32357      fi
32358
32359      if test "x$new_path" = x; then
32360        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32361$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32362        has_space=`$ECHO "$complete" | $GREP " "`
32363        if test "x$has_space" != x; then
32364          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32365$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32366        fi
32367        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32368      fi
32369    fi
32370
32371    # Now join together the path and the arguments once again
32372    if test "x$arguments" != xEOL; then
32373      new_complete="$new_path ${arguments% *}"
32374    else
32375      new_complete="$new_path"
32376    fi
32377
32378    if test "x$complete" != "x$new_complete"; then
32379      LD="$new_complete"
32380      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32381$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32382    fi
32383  fi
32384
32385    # Verify that we indeed succeeded with this trick.
32386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32387$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32388    "$LD" --version > /dev/null
32389    if test $? -eq 0 ; then
32390      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32391$as_echo "no" >&6; }
32392      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32393    else
32394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32395$as_echo "yes" >&6; }
32396    fi
32397    LDCXX="$LD"
32398  else
32399    # All other toolchains use the compiler to link.
32400    LD="$CC"
32401    LDCXX="$CXX"
32402  fi
32403
32404  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32405
32406
32407  #
32408  # Setup the assembler (AS)
32409  #
32410  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32411    # FIXME: should this really be solaris, or solstudio?
32412
32413
32414  # Publish this variable in the help.
32415
32416
32417  if test "x$AS" = x; then
32418    # The variable is not set by user, try to locate tool using the code snippet
32419    for ac_prog in as
32420do
32421  # Extract the first word of "$ac_prog", so it can be a program name with args.
32422set dummy $ac_prog; ac_word=$2
32423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32424$as_echo_n "checking for $ac_word... " >&6; }
32425if ${ac_cv_path_AS+:} false; then :
32426  $as_echo_n "(cached) " >&6
32427else
32428  case $AS in
32429  [\\/]* | ?:[\\/]*)
32430  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32431  ;;
32432  *)
32433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32434for as_dir in $PATH
32435do
32436  IFS=$as_save_IFS
32437  test -z "$as_dir" && as_dir=.
32438    for ac_exec_ext in '' $ac_executable_extensions; do
32439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32440    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32442    break 2
32443  fi
32444done
32445  done
32446IFS=$as_save_IFS
32447
32448  ;;
32449esac
32450fi
32451AS=$ac_cv_path_AS
32452if test -n "$AS"; then
32453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32454$as_echo "$AS" >&6; }
32455else
32456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32457$as_echo "no" >&6; }
32458fi
32459
32460
32461  test -n "$AS" && break
32462done
32463
32464  else
32465    # The variable is set, but is it from the command line or the environment?
32466
32467    # Try to remove the string !AS! from our list.
32468    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32469    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32470      # If it failed, the variable was not from the command line. Ignore it,
32471      # but warn the user (except for BASH, which is always set by the calling BASH).
32472      if test "xAS" != xBASH; then
32473        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32474$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32475      fi
32476      # Try to locate tool using the code snippet
32477      for ac_prog in as
32478do
32479  # Extract the first word of "$ac_prog", so it can be a program name with args.
32480set dummy $ac_prog; ac_word=$2
32481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32482$as_echo_n "checking for $ac_word... " >&6; }
32483if ${ac_cv_path_AS+:} false; then :
32484  $as_echo_n "(cached) " >&6
32485else
32486  case $AS in
32487  [\\/]* | ?:[\\/]*)
32488  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32489  ;;
32490  *)
32491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32492for as_dir in $PATH
32493do
32494  IFS=$as_save_IFS
32495  test -z "$as_dir" && as_dir=.
32496    for ac_exec_ext in '' $ac_executable_extensions; do
32497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32498    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32500    break 2
32501  fi
32502done
32503  done
32504IFS=$as_save_IFS
32505
32506  ;;
32507esac
32508fi
32509AS=$ac_cv_path_AS
32510if test -n "$AS"; then
32511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32512$as_echo "$AS" >&6; }
32513else
32514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32515$as_echo "no" >&6; }
32516fi
32517
32518
32519  test -n "$AS" && break
32520done
32521
32522    else
32523      # If it succeeded, then it was overridden by the user. We will use it
32524      # for the tool.
32525
32526      # First remove it from the list of overridden variables, so we can test
32527      # for unknown variables in the end.
32528      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32529
32530      # Check if the provided tool contains a complete path.
32531      tool_specified="$AS"
32532      tool_basename="${tool_specified##*/}"
32533      if test "x$tool_basename" = "x$tool_specified"; then
32534        # A command without a complete path is provided, search $PATH.
32535        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32536$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32537        # Extract the first word of "$tool_basename", so it can be a program name with args.
32538set dummy $tool_basename; ac_word=$2
32539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32540$as_echo_n "checking for $ac_word... " >&6; }
32541if ${ac_cv_path_AS+:} false; then :
32542  $as_echo_n "(cached) " >&6
32543else
32544  case $AS in
32545  [\\/]* | ?:[\\/]*)
32546  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32547  ;;
32548  *)
32549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32550for as_dir in $PATH
32551do
32552  IFS=$as_save_IFS
32553  test -z "$as_dir" && as_dir=.
32554    for ac_exec_ext in '' $ac_executable_extensions; do
32555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32556    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32558    break 2
32559  fi
32560done
32561  done
32562IFS=$as_save_IFS
32563
32564  ;;
32565esac
32566fi
32567AS=$ac_cv_path_AS
32568if test -n "$AS"; then
32569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32570$as_echo "$AS" >&6; }
32571else
32572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32573$as_echo "no" >&6; }
32574fi
32575
32576
32577        if test "x$AS" = x; then
32578          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32579        fi
32580      else
32581        # Otherwise we believe it is a complete path. Use it as it is.
32582        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32583$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32585$as_echo_n "checking for AS... " >&6; }
32586        if test ! -x "$tool_specified"; then
32587          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32588$as_echo "not found" >&6; }
32589          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32590        fi
32591        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32592$as_echo "$tool_specified" >&6; }
32593      fi
32594    fi
32595  fi
32596
32597
32598
32599  # Only process if variable expands to non-empty
32600
32601  if test "x$AS" != x; then
32602    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32603
32604  # First separate the path from the arguments. This will split at the first
32605  # space.
32606  complete="$AS"
32607  path="${complete%% *}"
32608  tmp="$complete EOL"
32609  arguments="${tmp#* }"
32610
32611  # Input might be given as Windows format, start by converting to
32612  # unix format.
32613  new_path=`$CYGPATH -u "$path"`
32614
32615  # Now try to locate executable using which
32616  new_path=`$WHICH "$new_path" 2> /dev/null`
32617  # bat and cmd files are not always considered executable in cygwin causing which
32618  # to not find them
32619  if test "x$new_path" = x \
32620      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32621      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32622    new_path=`$CYGPATH -u "$path"`
32623  fi
32624  if test "x$new_path" = x; then
32625    # Oops. Which didn't find the executable.
32626    # The splitting of arguments from the executable at a space might have been incorrect,
32627    # since paths with space are more likely in Windows. Give it another try with the whole
32628    # argument.
32629    path="$complete"
32630    arguments="EOL"
32631    new_path=`$CYGPATH -u "$path"`
32632    new_path=`$WHICH "$new_path" 2> /dev/null`
32633    # bat and cmd files are not always considered executable in cygwin causing which
32634    # to not find them
32635    if test "x$new_path" = x \
32636        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32637        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32638      new_path=`$CYGPATH -u "$path"`
32639    fi
32640    if test "x$new_path" = x; then
32641      # It's still not found. Now this is an unrecoverable error.
32642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32643$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32644      has_space=`$ECHO "$complete" | $GREP " "`
32645      if test "x$has_space" != x; then
32646        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32647$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32648      fi
32649      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32650    fi
32651  fi
32652
32653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32656  # "foo.exe" is OK but "foo" is an error.
32657  #
32658  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32659  # It is also a way to make sure we got the proper file name for the real test later on.
32660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32661  if test "x$test_shortpath" = x; then
32662    # Short path failed, file does not exist as specified.
32663    # Try adding .exe or .cmd
32664    if test -f "${new_path}.exe"; then
32665      input_to_shortpath="${new_path}.exe"
32666    elif test -f "${new_path}.cmd"; then
32667      input_to_shortpath="${new_path}.cmd"
32668    else
32669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32670$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32671      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32672$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32673      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32674    fi
32675  else
32676    input_to_shortpath="$new_path"
32677  fi
32678
32679  # Call helper function which possibly converts this using DOS-style short mode.
32680  # If so, the updated path is stored in $new_path.
32681  new_path="$input_to_shortpath"
32682
32683  input_path="$input_to_shortpath"
32684  # Check if we need to convert this using DOS-style short mode. If the path
32685  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32686  # take no chances and rewrite it.
32687  # Note: m4 eats our [], so we need to use [ and ] instead.
32688  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32689  if test "x$has_forbidden_chars" != x; then
32690    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32691    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32692    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32693    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32694      # Going to short mode and back again did indeed matter. Since short mode is
32695      # case insensitive, let's make it lowercase to improve readability.
32696      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32697      # Now convert it back to Unix-stile (cygpath)
32698      input_path=`$CYGPATH -u "$shortmode_path"`
32699      new_path="$input_path"
32700    fi
32701  fi
32702
32703  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32704  if test "x$test_cygdrive_prefix" = x; then
32705    # As a simple fix, exclude /usr/bin since it's not a real path.
32706    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32707      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32708      # a path prefixed by /cygdrive for fixpath to work.
32709      new_path="$CYGWIN_ROOT_PATH$input_path"
32710    fi
32711  fi
32712
32713  # remove trailing .exe if any
32714  new_path="${new_path/%.exe/}"
32715
32716    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32717
32718  # First separate the path from the arguments. This will split at the first
32719  # space.
32720  complete="$AS"
32721  path="${complete%% *}"
32722  tmp="$complete EOL"
32723  arguments="${tmp#* }"
32724
32725  # Input might be given as Windows format, start by converting to
32726  # unix format.
32727  new_path="$path"
32728
32729  windows_path="$new_path"
32730  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32731    unix_path=`$CYGPATH -u "$windows_path"`
32732    new_path="$unix_path"
32733  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32734    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32735    new_path="$unix_path"
32736  fi
32737
32738
32739  # Now try to locate executable using which
32740  new_path=`$WHICH "$new_path" 2> /dev/null`
32741
32742  if test "x$new_path" = x; then
32743    # Oops. Which didn't find the executable.
32744    # The splitting of arguments from the executable at a space might have been incorrect,
32745    # since paths with space are more likely in Windows. Give it another try with the whole
32746    # argument.
32747    path="$complete"
32748    arguments="EOL"
32749    new_path="$path"
32750
32751  windows_path="$new_path"
32752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32753    unix_path=`$CYGPATH -u "$windows_path"`
32754    new_path="$unix_path"
32755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32757    new_path="$unix_path"
32758  fi
32759
32760
32761    new_path=`$WHICH "$new_path" 2> /dev/null`
32762    # bat and cmd files are not always considered executable in MSYS causing which
32763    # to not find them
32764    if test "x$new_path" = x \
32765        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32766        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32767      new_path="$path"
32768
32769  windows_path="$new_path"
32770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32771    unix_path=`$CYGPATH -u "$windows_path"`
32772    new_path="$unix_path"
32773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32775    new_path="$unix_path"
32776  fi
32777
32778    fi
32779
32780    if test "x$new_path" = x; then
32781      # It's still not found. Now this is an unrecoverable error.
32782      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32783$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32784      has_space=`$ECHO "$complete" | $GREP " "`
32785      if test "x$has_space" != x; then
32786        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32787$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32788      fi
32789      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32790    fi
32791  fi
32792
32793  # Now new_path has a complete unix path to the binary
32794  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32795    # Keep paths in /bin as-is, but remove trailing .exe if any
32796    new_path="${new_path/%.exe/}"
32797    # Do not save /bin paths to all_fixpath_prefixes!
32798  else
32799    # Not in mixed or Windows style, start by that.
32800    new_path=`cmd //c echo $new_path`
32801
32802  input_path="$new_path"
32803  # Check if we need to convert this using DOS-style short mode. If the path
32804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32805  # take no chances and rewrite it.
32806  # Note: m4 eats our [], so we need to use [ and ] instead.
32807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32808  if test "x$has_forbidden_chars" != x; then
32809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32811  fi
32812
32813    # Output is in $new_path
32814
32815  windows_path="$new_path"
32816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32817    unix_path=`$CYGPATH -u "$windows_path"`
32818    new_path="$unix_path"
32819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32821    new_path="$unix_path"
32822  fi
32823
32824    # remove trailing .exe if any
32825    new_path="${new_path/%.exe/}"
32826
32827    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32828    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32829  fi
32830
32831    else
32832      # We're on a unix platform. Hooray! :)
32833      # First separate the path from the arguments. This will split at the first
32834      # space.
32835      complete="$AS"
32836      path="${complete%% *}"
32837      tmp="$complete EOL"
32838      arguments="${tmp#* }"
32839
32840      # Cannot rely on the command "which" here since it doesn't always work.
32841      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32842      if test -z "$is_absolute_path"; then
32843        # Path to executable is not absolute. Find it.
32844        IFS_save="$IFS"
32845        IFS=:
32846        for p in $PATH; do
32847          if test -f "$p/$path" && test -x "$p/$path"; then
32848            new_path="$p/$path"
32849            break
32850          fi
32851        done
32852        IFS="$IFS_save"
32853      else
32854        # This is an absolute path, we can use it without further modifications.
32855        new_path="$path"
32856      fi
32857
32858      if test "x$new_path" = x; then
32859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32860$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32861        has_space=`$ECHO "$complete" | $GREP " "`
32862        if test "x$has_space" != x; then
32863          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32864$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32865        fi
32866        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32867      fi
32868    fi
32869
32870    # Now join together the path and the arguments once again
32871    if test "x$arguments" != xEOL; then
32872      new_complete="$new_path ${arguments% *}"
32873    else
32874      new_complete="$new_path"
32875    fi
32876
32877    if test "x$complete" != "x$new_complete"; then
32878      AS="$new_complete"
32879      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32880$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32881    fi
32882  fi
32883
32884  else
32885    # FIXME: is this correct for microsoft?
32886    AS="$CC -c"
32887  fi
32888
32889
32890  #
32891  # Setup the archiver (AR)
32892  #
32893  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32894    # The corresponding ar tool is lib.exe (used to create static libraries)
32895    # Extract the first word of "lib", so it can be a program name with args.
32896set dummy lib; ac_word=$2
32897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32898$as_echo_n "checking for $ac_word... " >&6; }
32899if ${ac_cv_prog_AR+:} false; then :
32900  $as_echo_n "(cached) " >&6
32901else
32902  if test -n "$AR"; then
32903  ac_cv_prog_AR="$AR" # Let the user override the test.
32904else
32905as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32906for as_dir in $PATH
32907do
32908  IFS=$as_save_IFS
32909  test -z "$as_dir" && as_dir=.
32910    for ac_exec_ext in '' $ac_executable_extensions; do
32911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32912    ac_cv_prog_AR="lib"
32913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32914    break 2
32915  fi
32916done
32917  done
32918IFS=$as_save_IFS
32919
32920fi
32921fi
32922AR=$ac_cv_prog_AR
32923if test -n "$AR"; then
32924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32925$as_echo "$AR" >&6; }
32926else
32927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32928$as_echo "no" >&6; }
32929fi
32930
32931
32932  else
32933
32934
32935  # Publish this variable in the help.
32936
32937
32938  if test "x$AR" = x; then
32939    # The variable is not set by user, try to locate tool using the code snippet
32940    if test -n "$ac_tool_prefix"; then
32941  for ac_prog in ar
32942  do
32943    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32944set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32946$as_echo_n "checking for $ac_word... " >&6; }
32947if ${ac_cv_prog_AR+:} false; then :
32948  $as_echo_n "(cached) " >&6
32949else
32950  if test -n "$AR"; then
32951  ac_cv_prog_AR="$AR" # Let the user override the test.
32952else
32953as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32954for as_dir in $PATH
32955do
32956  IFS=$as_save_IFS
32957  test -z "$as_dir" && as_dir=.
32958    for ac_exec_ext in '' $ac_executable_extensions; do
32959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32960    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32962    break 2
32963  fi
32964done
32965  done
32966IFS=$as_save_IFS
32967
32968fi
32969fi
32970AR=$ac_cv_prog_AR
32971if test -n "$AR"; then
32972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32973$as_echo "$AR" >&6; }
32974else
32975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32976$as_echo "no" >&6; }
32977fi
32978
32979
32980    test -n "$AR" && break
32981  done
32982fi
32983if test -z "$AR"; then
32984  ac_ct_AR=$AR
32985  for ac_prog in ar
32986do
32987  # Extract the first word of "$ac_prog", so it can be a program name with args.
32988set dummy $ac_prog; ac_word=$2
32989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32990$as_echo_n "checking for $ac_word... " >&6; }
32991if ${ac_cv_prog_ac_ct_AR+:} false; then :
32992  $as_echo_n "(cached) " >&6
32993else
32994  if test -n "$ac_ct_AR"; then
32995  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32996else
32997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32998for as_dir in $PATH
32999do
33000  IFS=$as_save_IFS
33001  test -z "$as_dir" && as_dir=.
33002    for ac_exec_ext in '' $ac_executable_extensions; do
33003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33004    ac_cv_prog_ac_ct_AR="$ac_prog"
33005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33006    break 2
33007  fi
33008done
33009  done
33010IFS=$as_save_IFS
33011
33012fi
33013fi
33014ac_ct_AR=$ac_cv_prog_ac_ct_AR
33015if test -n "$ac_ct_AR"; then
33016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33017$as_echo "$ac_ct_AR" >&6; }
33018else
33019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33020$as_echo "no" >&6; }
33021fi
33022
33023
33024  test -n "$ac_ct_AR" && break
33025done
33026
33027  if test "x$ac_ct_AR" = x; then
33028    AR=""
33029  else
33030    case $cross_compiling:$ac_tool_warned in
33031yes:)
33032{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33033$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33034ac_tool_warned=yes ;;
33035esac
33036    AR=$ac_ct_AR
33037  fi
33038fi
33039
33040  else
33041    # The variable is set, but is it from the command line or the environment?
33042
33043    # Try to remove the string !AR! from our list.
33044    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33045    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33046      # If it failed, the variable was not from the command line. Ignore it,
33047      # but warn the user (except for BASH, which is always set by the calling BASH).
33048      if test "xAR" != xBASH; then
33049        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33050$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33051      fi
33052      # Try to locate tool using the code snippet
33053      if test -n "$ac_tool_prefix"; then
33054  for ac_prog in ar
33055  do
33056    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33057set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33059$as_echo_n "checking for $ac_word... " >&6; }
33060if ${ac_cv_prog_AR+:} false; then :
33061  $as_echo_n "(cached) " >&6
33062else
33063  if test -n "$AR"; then
33064  ac_cv_prog_AR="$AR" # Let the user override the test.
33065else
33066as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33067for as_dir in $PATH
33068do
33069  IFS=$as_save_IFS
33070  test -z "$as_dir" && as_dir=.
33071    for ac_exec_ext in '' $ac_executable_extensions; do
33072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33073    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33075    break 2
33076  fi
33077done
33078  done
33079IFS=$as_save_IFS
33080
33081fi
33082fi
33083AR=$ac_cv_prog_AR
33084if test -n "$AR"; then
33085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33086$as_echo "$AR" >&6; }
33087else
33088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33089$as_echo "no" >&6; }
33090fi
33091
33092
33093    test -n "$AR" && break
33094  done
33095fi
33096if test -z "$AR"; then
33097  ac_ct_AR=$AR
33098  for ac_prog in ar
33099do
33100  # Extract the first word of "$ac_prog", so it can be a program name with args.
33101set dummy $ac_prog; ac_word=$2
33102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33103$as_echo_n "checking for $ac_word... " >&6; }
33104if ${ac_cv_prog_ac_ct_AR+:} false; then :
33105  $as_echo_n "(cached) " >&6
33106else
33107  if test -n "$ac_ct_AR"; then
33108  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33109else
33110as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33111for as_dir in $PATH
33112do
33113  IFS=$as_save_IFS
33114  test -z "$as_dir" && as_dir=.
33115    for ac_exec_ext in '' $ac_executable_extensions; do
33116  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33117    ac_cv_prog_ac_ct_AR="$ac_prog"
33118    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33119    break 2
33120  fi
33121done
33122  done
33123IFS=$as_save_IFS
33124
33125fi
33126fi
33127ac_ct_AR=$ac_cv_prog_ac_ct_AR
33128if test -n "$ac_ct_AR"; then
33129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33130$as_echo "$ac_ct_AR" >&6; }
33131else
33132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33133$as_echo "no" >&6; }
33134fi
33135
33136
33137  test -n "$ac_ct_AR" && break
33138done
33139
33140  if test "x$ac_ct_AR" = x; then
33141    AR=""
33142  else
33143    case $cross_compiling:$ac_tool_warned in
33144yes:)
33145{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33146$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33147ac_tool_warned=yes ;;
33148esac
33149    AR=$ac_ct_AR
33150  fi
33151fi
33152
33153    else
33154      # If it succeeded, then it was overridden by the user. We will use it
33155      # for the tool.
33156
33157      # First remove it from the list of overridden variables, so we can test
33158      # for unknown variables in the end.
33159      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33160
33161      # Check if the provided tool contains a complete path.
33162      tool_specified="$AR"
33163      tool_basename="${tool_specified##*/}"
33164      if test "x$tool_basename" = "x$tool_specified"; then
33165        # A command without a complete path is provided, search $PATH.
33166        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33167$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33168        # Extract the first word of "$tool_basename", so it can be a program name with args.
33169set dummy $tool_basename; ac_word=$2
33170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33171$as_echo_n "checking for $ac_word... " >&6; }
33172if ${ac_cv_path_AR+:} false; then :
33173  $as_echo_n "(cached) " >&6
33174else
33175  case $AR in
33176  [\\/]* | ?:[\\/]*)
33177  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33178  ;;
33179  *)
33180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33181for as_dir in $PATH
33182do
33183  IFS=$as_save_IFS
33184  test -z "$as_dir" && as_dir=.
33185    for ac_exec_ext in '' $ac_executable_extensions; do
33186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33187    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33189    break 2
33190  fi
33191done
33192  done
33193IFS=$as_save_IFS
33194
33195  ;;
33196esac
33197fi
33198AR=$ac_cv_path_AR
33199if test -n "$AR"; then
33200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33201$as_echo "$AR" >&6; }
33202else
33203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33204$as_echo "no" >&6; }
33205fi
33206
33207
33208        if test "x$AR" = x; then
33209          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33210        fi
33211      else
33212        # Otherwise we believe it is a complete path. Use it as it is.
33213        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33214$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33216$as_echo_n "checking for AR... " >&6; }
33217        if test ! -x "$tool_specified"; then
33218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33219$as_echo "not found" >&6; }
33220          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33221        fi
33222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33223$as_echo "$tool_specified" >&6; }
33224      fi
33225    fi
33226  fi
33227
33228
33229  fi
33230
33231  # Only process if variable expands to non-empty
33232
33233  if test "x$AR" != x; then
33234    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33235
33236  # First separate the path from the arguments. This will split at the first
33237  # space.
33238  complete="$AR"
33239  path="${complete%% *}"
33240  tmp="$complete EOL"
33241  arguments="${tmp#* }"
33242
33243  # Input might be given as Windows format, start by converting to
33244  # unix format.
33245  new_path=`$CYGPATH -u "$path"`
33246
33247  # Now try to locate executable using which
33248  new_path=`$WHICH "$new_path" 2> /dev/null`
33249  # bat and cmd files are not always considered executable in cygwin causing which
33250  # to not find them
33251  if test "x$new_path" = x \
33252      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33253      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33254    new_path=`$CYGPATH -u "$path"`
33255  fi
33256  if test "x$new_path" = x; then
33257    # Oops. Which didn't find the executable.
33258    # The splitting of arguments from the executable at a space might have been incorrect,
33259    # since paths with space are more likely in Windows. Give it another try with the whole
33260    # argument.
33261    path="$complete"
33262    arguments="EOL"
33263    new_path=`$CYGPATH -u "$path"`
33264    new_path=`$WHICH "$new_path" 2> /dev/null`
33265    # bat and cmd files are not always considered executable in cygwin causing which
33266    # to not find them
33267    if test "x$new_path" = x \
33268        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33269        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33270      new_path=`$CYGPATH -u "$path"`
33271    fi
33272    if test "x$new_path" = x; then
33273      # It's still not found. Now this is an unrecoverable error.
33274      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33275$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33276      has_space=`$ECHO "$complete" | $GREP " "`
33277      if test "x$has_space" != x; then
33278        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33279$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33280      fi
33281      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33282    fi
33283  fi
33284
33285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33288  # "foo.exe" is OK but "foo" is an error.
33289  #
33290  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33291  # It is also a way to make sure we got the proper file name for the real test later on.
33292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33293  if test "x$test_shortpath" = x; then
33294    # Short path failed, file does not exist as specified.
33295    # Try adding .exe or .cmd
33296    if test -f "${new_path}.exe"; then
33297      input_to_shortpath="${new_path}.exe"
33298    elif test -f "${new_path}.cmd"; then
33299      input_to_shortpath="${new_path}.cmd"
33300    else
33301      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33302$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33303      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33304$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33305      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33306    fi
33307  else
33308    input_to_shortpath="$new_path"
33309  fi
33310
33311  # Call helper function which possibly converts this using DOS-style short mode.
33312  # If so, the updated path is stored in $new_path.
33313  new_path="$input_to_shortpath"
33314
33315  input_path="$input_to_shortpath"
33316  # Check if we need to convert this using DOS-style short mode. If the path
33317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33318  # take no chances and rewrite it.
33319  # Note: m4 eats our [], so we need to use [ and ] instead.
33320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33321  if test "x$has_forbidden_chars" != x; then
33322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33323    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33324    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33325    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33326      # Going to short mode and back again did indeed matter. Since short mode is
33327      # case insensitive, let's make it lowercase to improve readability.
33328      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33329      # Now convert it back to Unix-stile (cygpath)
33330      input_path=`$CYGPATH -u "$shortmode_path"`
33331      new_path="$input_path"
33332    fi
33333  fi
33334
33335  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33336  if test "x$test_cygdrive_prefix" = x; then
33337    # As a simple fix, exclude /usr/bin since it's not a real path.
33338    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33339      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33340      # a path prefixed by /cygdrive for fixpath to work.
33341      new_path="$CYGWIN_ROOT_PATH$input_path"
33342    fi
33343  fi
33344
33345  # remove trailing .exe if any
33346  new_path="${new_path/%.exe/}"
33347
33348    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33349
33350  # First separate the path from the arguments. This will split at the first
33351  # space.
33352  complete="$AR"
33353  path="${complete%% *}"
33354  tmp="$complete EOL"
33355  arguments="${tmp#* }"
33356
33357  # Input might be given as Windows format, start by converting to
33358  # unix format.
33359  new_path="$path"
33360
33361  windows_path="$new_path"
33362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33363    unix_path=`$CYGPATH -u "$windows_path"`
33364    new_path="$unix_path"
33365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33367    new_path="$unix_path"
33368  fi
33369
33370
33371  # Now try to locate executable using which
33372  new_path=`$WHICH "$new_path" 2> /dev/null`
33373
33374  if test "x$new_path" = x; then
33375    # Oops. Which didn't find the executable.
33376    # The splitting of arguments from the executable at a space might have been incorrect,
33377    # since paths with space are more likely in Windows. Give it another try with the whole
33378    # argument.
33379    path="$complete"
33380    arguments="EOL"
33381    new_path="$path"
33382
33383  windows_path="$new_path"
33384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33385    unix_path=`$CYGPATH -u "$windows_path"`
33386    new_path="$unix_path"
33387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33389    new_path="$unix_path"
33390  fi
33391
33392
33393    new_path=`$WHICH "$new_path" 2> /dev/null`
33394    # bat and cmd files are not always considered executable in MSYS causing which
33395    # to not find them
33396    if test "x$new_path" = x \
33397        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33398        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33399      new_path="$path"
33400
33401  windows_path="$new_path"
33402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33403    unix_path=`$CYGPATH -u "$windows_path"`
33404    new_path="$unix_path"
33405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33407    new_path="$unix_path"
33408  fi
33409
33410    fi
33411
33412    if test "x$new_path" = x; then
33413      # It's still not found. Now this is an unrecoverable error.
33414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33415$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33416      has_space=`$ECHO "$complete" | $GREP " "`
33417      if test "x$has_space" != x; then
33418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33420      fi
33421      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33422    fi
33423  fi
33424
33425  # Now new_path has a complete unix path to the binary
33426  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33427    # Keep paths in /bin as-is, but remove trailing .exe if any
33428    new_path="${new_path/%.exe/}"
33429    # Do not save /bin paths to all_fixpath_prefixes!
33430  else
33431    # Not in mixed or Windows style, start by that.
33432    new_path=`cmd //c echo $new_path`
33433
33434  input_path="$new_path"
33435  # Check if we need to convert this using DOS-style short mode. If the path
33436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33437  # take no chances and rewrite it.
33438  # Note: m4 eats our [], so we need to use [ and ] instead.
33439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33440  if test "x$has_forbidden_chars" != x; then
33441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33442    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33443  fi
33444
33445    # Output is in $new_path
33446
33447  windows_path="$new_path"
33448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33449    unix_path=`$CYGPATH -u "$windows_path"`
33450    new_path="$unix_path"
33451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33452    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33453    new_path="$unix_path"
33454  fi
33455
33456    # remove trailing .exe if any
33457    new_path="${new_path/%.exe/}"
33458
33459    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33460    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33461  fi
33462
33463    else
33464      # We're on a unix platform. Hooray! :)
33465      # First separate the path from the arguments. This will split at the first
33466      # space.
33467      complete="$AR"
33468      path="${complete%% *}"
33469      tmp="$complete EOL"
33470      arguments="${tmp#* }"
33471
33472      # Cannot rely on the command "which" here since it doesn't always work.
33473      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33474      if test -z "$is_absolute_path"; then
33475        # Path to executable is not absolute. Find it.
33476        IFS_save="$IFS"
33477        IFS=:
33478        for p in $PATH; do
33479          if test -f "$p/$path" && test -x "$p/$path"; then
33480            new_path="$p/$path"
33481            break
33482          fi
33483        done
33484        IFS="$IFS_save"
33485      else
33486        # This is an absolute path, we can use it without further modifications.
33487        new_path="$path"
33488      fi
33489
33490      if test "x$new_path" = x; then
33491        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33492$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33493        has_space=`$ECHO "$complete" | $GREP " "`
33494        if test "x$has_space" != x; then
33495          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33496$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33497        fi
33498        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33499      fi
33500    fi
33501
33502    # Now join together the path and the arguments once again
33503    if test "x$arguments" != xEOL; then
33504      new_complete="$new_path ${arguments% *}"
33505    else
33506      new_complete="$new_path"
33507    fi
33508
33509    if test "x$complete" != "x$new_complete"; then
33510      AR="$new_complete"
33511      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33512$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33513    fi
33514  fi
33515
33516
33517
33518  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33519
33520
33521  # Publish this variable in the help.
33522
33523
33524  if test "x$LIPO" = x; then
33525    # The variable is not set by user, try to locate tool using the code snippet
33526    for ac_prog in lipo
33527do
33528  # Extract the first word of "$ac_prog", so it can be a program name with args.
33529set dummy $ac_prog; ac_word=$2
33530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33531$as_echo_n "checking for $ac_word... " >&6; }
33532if ${ac_cv_path_LIPO+:} false; then :
33533  $as_echo_n "(cached) " >&6
33534else
33535  case $LIPO in
33536  [\\/]* | ?:[\\/]*)
33537  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33538  ;;
33539  *)
33540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33541for as_dir in $PATH
33542do
33543  IFS=$as_save_IFS
33544  test -z "$as_dir" && as_dir=.
33545    for ac_exec_ext in '' $ac_executable_extensions; do
33546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33547    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33549    break 2
33550  fi
33551done
33552  done
33553IFS=$as_save_IFS
33554
33555  ;;
33556esac
33557fi
33558LIPO=$ac_cv_path_LIPO
33559if test -n "$LIPO"; then
33560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33561$as_echo "$LIPO" >&6; }
33562else
33563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33564$as_echo "no" >&6; }
33565fi
33566
33567
33568  test -n "$LIPO" && break
33569done
33570
33571  else
33572    # The variable is set, but is it from the command line or the environment?
33573
33574    # Try to remove the string !LIPO! from our list.
33575    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33576    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33577      # If it failed, the variable was not from the command line. Ignore it,
33578      # but warn the user (except for BASH, which is always set by the calling BASH).
33579      if test "xLIPO" != xBASH; then
33580        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33581$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33582      fi
33583      # Try to locate tool using the code snippet
33584      for ac_prog in lipo
33585do
33586  # Extract the first word of "$ac_prog", so it can be a program name with args.
33587set dummy $ac_prog; ac_word=$2
33588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33589$as_echo_n "checking for $ac_word... " >&6; }
33590if ${ac_cv_path_LIPO+:} false; then :
33591  $as_echo_n "(cached) " >&6
33592else
33593  case $LIPO in
33594  [\\/]* | ?:[\\/]*)
33595  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33596  ;;
33597  *)
33598  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33599for as_dir in $PATH
33600do
33601  IFS=$as_save_IFS
33602  test -z "$as_dir" && as_dir=.
33603    for ac_exec_ext in '' $ac_executable_extensions; do
33604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33605    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33607    break 2
33608  fi
33609done
33610  done
33611IFS=$as_save_IFS
33612
33613  ;;
33614esac
33615fi
33616LIPO=$ac_cv_path_LIPO
33617if test -n "$LIPO"; then
33618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33619$as_echo "$LIPO" >&6; }
33620else
33621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33622$as_echo "no" >&6; }
33623fi
33624
33625
33626  test -n "$LIPO" && break
33627done
33628
33629    else
33630      # If it succeeded, then it was overridden by the user. We will use it
33631      # for the tool.
33632
33633      # First remove it from the list of overridden variables, so we can test
33634      # for unknown variables in the end.
33635      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33636
33637      # Check if the provided tool contains a complete path.
33638      tool_specified="$LIPO"
33639      tool_basename="${tool_specified##*/}"
33640      if test "x$tool_basename" = "x$tool_specified"; then
33641        # A command without a complete path is provided, search $PATH.
33642        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33643$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33644        # Extract the first word of "$tool_basename", so it can be a program name with args.
33645set dummy $tool_basename; ac_word=$2
33646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33647$as_echo_n "checking for $ac_word... " >&6; }
33648if ${ac_cv_path_LIPO+:} false; then :
33649  $as_echo_n "(cached) " >&6
33650else
33651  case $LIPO in
33652  [\\/]* | ?:[\\/]*)
33653  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33654  ;;
33655  *)
33656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33657for as_dir in $PATH
33658do
33659  IFS=$as_save_IFS
33660  test -z "$as_dir" && as_dir=.
33661    for ac_exec_ext in '' $ac_executable_extensions; do
33662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33663    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33665    break 2
33666  fi
33667done
33668  done
33669IFS=$as_save_IFS
33670
33671  ;;
33672esac
33673fi
33674LIPO=$ac_cv_path_LIPO
33675if test -n "$LIPO"; then
33676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33677$as_echo "$LIPO" >&6; }
33678else
33679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33680$as_echo "no" >&6; }
33681fi
33682
33683
33684        if test "x$LIPO" = x; then
33685          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33686        fi
33687      else
33688        # Otherwise we believe it is a complete path. Use it as it is.
33689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33690$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33691        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33692$as_echo_n "checking for LIPO... " >&6; }
33693        if test ! -x "$tool_specified"; then
33694          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33695$as_echo "not found" >&6; }
33696          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33697        fi
33698        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33699$as_echo "$tool_specified" >&6; }
33700      fi
33701    fi
33702  fi
33703
33704
33705
33706  # Only process if variable expands to non-empty
33707
33708  if test "x$LIPO" != x; then
33709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33710
33711  # First separate the path from the arguments. This will split at the first
33712  # space.
33713  complete="$LIPO"
33714  path="${complete%% *}"
33715  tmp="$complete EOL"
33716  arguments="${tmp#* }"
33717
33718  # Input might be given as Windows format, start by converting to
33719  # unix format.
33720  new_path=`$CYGPATH -u "$path"`
33721
33722  # Now try to locate executable using which
33723  new_path=`$WHICH "$new_path" 2> /dev/null`
33724  # bat and cmd files are not always considered executable in cygwin causing which
33725  # to not find them
33726  if test "x$new_path" = x \
33727      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33728      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33729    new_path=`$CYGPATH -u "$path"`
33730  fi
33731  if test "x$new_path" = x; then
33732    # Oops. Which didn't find the executable.
33733    # The splitting of arguments from the executable at a space might have been incorrect,
33734    # since paths with space are more likely in Windows. Give it another try with the whole
33735    # argument.
33736    path="$complete"
33737    arguments="EOL"
33738    new_path=`$CYGPATH -u "$path"`
33739    new_path=`$WHICH "$new_path" 2> /dev/null`
33740    # bat and cmd files are not always considered executable in cygwin causing which
33741    # to not find them
33742    if test "x$new_path" = x \
33743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33745      new_path=`$CYGPATH -u "$path"`
33746    fi
33747    if test "x$new_path" = x; then
33748      # It's still not found. Now this is an unrecoverable error.
33749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33750$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33751      has_space=`$ECHO "$complete" | $GREP " "`
33752      if test "x$has_space" != x; then
33753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33755      fi
33756      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33757    fi
33758  fi
33759
33760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33763  # "foo.exe" is OK but "foo" is an error.
33764  #
33765  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33766  # It is also a way to make sure we got the proper file name for the real test later on.
33767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33768  if test "x$test_shortpath" = x; then
33769    # Short path failed, file does not exist as specified.
33770    # Try adding .exe or .cmd
33771    if test -f "${new_path}.exe"; then
33772      input_to_shortpath="${new_path}.exe"
33773    elif test -f "${new_path}.cmd"; then
33774      input_to_shortpath="${new_path}.cmd"
33775    else
33776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33777$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33778      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33779$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33780      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33781    fi
33782  else
33783    input_to_shortpath="$new_path"
33784  fi
33785
33786  # Call helper function which possibly converts this using DOS-style short mode.
33787  # If so, the updated path is stored in $new_path.
33788  new_path="$input_to_shortpath"
33789
33790  input_path="$input_to_shortpath"
33791  # Check if we need to convert this using DOS-style short mode. If the path
33792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33793  # take no chances and rewrite it.
33794  # Note: m4 eats our [], so we need to use [ and ] instead.
33795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33796  if test "x$has_forbidden_chars" != x; then
33797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33801      # Going to short mode and back again did indeed matter. Since short mode is
33802      # case insensitive, let's make it lowercase to improve readability.
33803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33804      # Now convert it back to Unix-stile (cygpath)
33805      input_path=`$CYGPATH -u "$shortmode_path"`
33806      new_path="$input_path"
33807    fi
33808  fi
33809
33810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33811  if test "x$test_cygdrive_prefix" = x; then
33812    # As a simple fix, exclude /usr/bin since it's not a real path.
33813    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33815      # a path prefixed by /cygdrive for fixpath to work.
33816      new_path="$CYGWIN_ROOT_PATH$input_path"
33817    fi
33818  fi
33819
33820  # remove trailing .exe if any
33821  new_path="${new_path/%.exe/}"
33822
33823    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33824
33825  # First separate the path from the arguments. This will split at the first
33826  # space.
33827  complete="$LIPO"
33828  path="${complete%% *}"
33829  tmp="$complete EOL"
33830  arguments="${tmp#* }"
33831
33832  # Input might be given as Windows format, start by converting to
33833  # unix format.
33834  new_path="$path"
33835
33836  windows_path="$new_path"
33837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33838    unix_path=`$CYGPATH -u "$windows_path"`
33839    new_path="$unix_path"
33840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33842    new_path="$unix_path"
33843  fi
33844
33845
33846  # Now try to locate executable using which
33847  new_path=`$WHICH "$new_path" 2> /dev/null`
33848
33849  if test "x$new_path" = x; then
33850    # Oops. Which didn't find the executable.
33851    # The splitting of arguments from the executable at a space might have been incorrect,
33852    # since paths with space are more likely in Windows. Give it another try with the whole
33853    # argument.
33854    path="$complete"
33855    arguments="EOL"
33856    new_path="$path"
33857
33858  windows_path="$new_path"
33859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33860    unix_path=`$CYGPATH -u "$windows_path"`
33861    new_path="$unix_path"
33862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33864    new_path="$unix_path"
33865  fi
33866
33867
33868    new_path=`$WHICH "$new_path" 2> /dev/null`
33869    # bat and cmd files are not always considered executable in MSYS causing which
33870    # to not find them
33871    if test "x$new_path" = x \
33872        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33873        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33874      new_path="$path"
33875
33876  windows_path="$new_path"
33877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33878    unix_path=`$CYGPATH -u "$windows_path"`
33879    new_path="$unix_path"
33880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33881    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33882    new_path="$unix_path"
33883  fi
33884
33885    fi
33886
33887    if test "x$new_path" = x; then
33888      # It's still not found. Now this is an unrecoverable error.
33889      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33890$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33891      has_space=`$ECHO "$complete" | $GREP " "`
33892      if test "x$has_space" != x; then
33893        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33894$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33895      fi
33896      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33897    fi
33898  fi
33899
33900  # Now new_path has a complete unix path to the binary
33901  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33902    # Keep paths in /bin as-is, but remove trailing .exe if any
33903    new_path="${new_path/%.exe/}"
33904    # Do not save /bin paths to all_fixpath_prefixes!
33905  else
33906    # Not in mixed or Windows style, start by that.
33907    new_path=`cmd //c echo $new_path`
33908
33909  input_path="$new_path"
33910  # Check if we need to convert this using DOS-style short mode. If the path
33911  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33912  # take no chances and rewrite it.
33913  # Note: m4 eats our [], so we need to use [ and ] instead.
33914  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33915  if test "x$has_forbidden_chars" != x; then
33916    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33917    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33918  fi
33919
33920    # Output is in $new_path
33921
33922  windows_path="$new_path"
33923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33924    unix_path=`$CYGPATH -u "$windows_path"`
33925    new_path="$unix_path"
33926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33928    new_path="$unix_path"
33929  fi
33930
33931    # remove trailing .exe if any
33932    new_path="${new_path/%.exe/}"
33933
33934    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33935    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33936  fi
33937
33938    else
33939      # We're on a unix platform. Hooray! :)
33940      # First separate the path from the arguments. This will split at the first
33941      # space.
33942      complete="$LIPO"
33943      path="${complete%% *}"
33944      tmp="$complete EOL"
33945      arguments="${tmp#* }"
33946
33947      # Cannot rely on the command "which" here since it doesn't always work.
33948      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33949      if test -z "$is_absolute_path"; then
33950        # Path to executable is not absolute. Find it.
33951        IFS_save="$IFS"
33952        IFS=:
33953        for p in $PATH; do
33954          if test -f "$p/$path" && test -x "$p/$path"; then
33955            new_path="$p/$path"
33956            break
33957          fi
33958        done
33959        IFS="$IFS_save"
33960      else
33961        # This is an absolute path, we can use it without further modifications.
33962        new_path="$path"
33963      fi
33964
33965      if test "x$new_path" = x; then
33966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33967$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33968        has_space=`$ECHO "$complete" | $GREP " "`
33969        if test "x$has_space" != x; then
33970          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33971$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33972        fi
33973        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33974      fi
33975    fi
33976
33977    # Now join together the path and the arguments once again
33978    if test "x$arguments" != xEOL; then
33979      new_complete="$new_path ${arguments% *}"
33980    else
33981      new_complete="$new_path"
33982    fi
33983
33984    if test "x$complete" != "x$new_complete"; then
33985      LIPO="$new_complete"
33986      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33987$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33988    fi
33989  fi
33990
33991  fi
33992
33993  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33994    # Extract the first word of "mt", so it can be a program name with args.
33995set dummy mt; ac_word=$2
33996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33997$as_echo_n "checking for $ac_word... " >&6; }
33998if ${ac_cv_prog_MT+:} false; then :
33999  $as_echo_n "(cached) " >&6
34000else
34001  if test -n "$MT"; then
34002  ac_cv_prog_MT="$MT" # Let the user override the test.
34003else
34004  ac_prog_rejected=no
34005as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34006for as_dir in $PATH
34007do
34008  IFS=$as_save_IFS
34009  test -z "$as_dir" && as_dir=.
34010    for ac_exec_ext in '' $ac_executable_extensions; do
34011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34012    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34013       ac_prog_rejected=yes
34014       continue
34015     fi
34016    ac_cv_prog_MT="mt"
34017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34018    break 2
34019  fi
34020done
34021  done
34022IFS=$as_save_IFS
34023
34024if test $ac_prog_rejected = yes; then
34025  # We found a bogon in the path, so make sure we never use it.
34026  set dummy $ac_cv_prog_MT
34027  shift
34028  if test $# != 0; then
34029    # We chose a different compiler from the bogus one.
34030    # However, it has the same basename, so the bogon will be chosen
34031    # first if we set MT to just the basename; use the full file name.
34032    shift
34033    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34034  fi
34035fi
34036fi
34037fi
34038MT=$ac_cv_prog_MT
34039if test -n "$MT"; then
34040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34041$as_echo "$MT" >&6; }
34042else
34043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34044$as_echo "no" >&6; }
34045fi
34046
34047
34048
34049  # Only process if variable expands to non-empty
34050
34051  if test "x$MT" != x; then
34052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34053
34054  # First separate the path from the arguments. This will split at the first
34055  # space.
34056  complete="$MT"
34057  path="${complete%% *}"
34058  tmp="$complete EOL"
34059  arguments="${tmp#* }"
34060
34061  # Input might be given as Windows format, start by converting to
34062  # unix format.
34063  new_path=`$CYGPATH -u "$path"`
34064
34065  # Now try to locate executable using which
34066  new_path=`$WHICH "$new_path" 2> /dev/null`
34067  # bat and cmd files are not always considered executable in cygwin causing which
34068  # to not find them
34069  if test "x$new_path" = x \
34070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34072    new_path=`$CYGPATH -u "$path"`
34073  fi
34074  if test "x$new_path" = x; then
34075    # Oops. Which didn't find the executable.
34076    # The splitting of arguments from the executable at a space might have been incorrect,
34077    # since paths with space are more likely in Windows. Give it another try with the whole
34078    # argument.
34079    path="$complete"
34080    arguments="EOL"
34081    new_path=`$CYGPATH -u "$path"`
34082    new_path=`$WHICH "$new_path" 2> /dev/null`
34083    # bat and cmd files are not always considered executable in cygwin causing which
34084    # to not find them
34085    if test "x$new_path" = x \
34086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34088      new_path=`$CYGPATH -u "$path"`
34089    fi
34090    if test "x$new_path" = x; then
34091      # It's still not found. Now this is an unrecoverable error.
34092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34093$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34094      has_space=`$ECHO "$complete" | $GREP " "`
34095      if test "x$has_space" != x; then
34096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34098      fi
34099      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34100    fi
34101  fi
34102
34103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34106  # "foo.exe" is OK but "foo" is an error.
34107  #
34108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34109  # It is also a way to make sure we got the proper file name for the real test later on.
34110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34111  if test "x$test_shortpath" = x; then
34112    # Short path failed, file does not exist as specified.
34113    # Try adding .exe or .cmd
34114    if test -f "${new_path}.exe"; then
34115      input_to_shortpath="${new_path}.exe"
34116    elif test -f "${new_path}.cmd"; then
34117      input_to_shortpath="${new_path}.cmd"
34118    else
34119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34120$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34123      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34124    fi
34125  else
34126    input_to_shortpath="$new_path"
34127  fi
34128
34129  # Call helper function which possibly converts this using DOS-style short mode.
34130  # If so, the updated path is stored in $new_path.
34131  new_path="$input_to_shortpath"
34132
34133  input_path="$input_to_shortpath"
34134  # Check if we need to convert this using DOS-style short mode. If the path
34135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34136  # take no chances and rewrite it.
34137  # Note: m4 eats our [], so we need to use [ and ] instead.
34138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34139  if test "x$has_forbidden_chars" != x; then
34140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34144      # Going to short mode and back again did indeed matter. Since short mode is
34145      # case insensitive, let's make it lowercase to improve readability.
34146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34147      # Now convert it back to Unix-stile (cygpath)
34148      input_path=`$CYGPATH -u "$shortmode_path"`
34149      new_path="$input_path"
34150    fi
34151  fi
34152
34153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34154  if test "x$test_cygdrive_prefix" = x; then
34155    # As a simple fix, exclude /usr/bin since it's not a real path.
34156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34158      # a path prefixed by /cygdrive for fixpath to work.
34159      new_path="$CYGWIN_ROOT_PATH$input_path"
34160    fi
34161  fi
34162
34163  # remove trailing .exe if any
34164  new_path="${new_path/%.exe/}"
34165
34166    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34167
34168  # First separate the path from the arguments. This will split at the first
34169  # space.
34170  complete="$MT"
34171  path="${complete%% *}"
34172  tmp="$complete EOL"
34173  arguments="${tmp#* }"
34174
34175  # Input might be given as Windows format, start by converting to
34176  # unix format.
34177  new_path="$path"
34178
34179  windows_path="$new_path"
34180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34181    unix_path=`$CYGPATH -u "$windows_path"`
34182    new_path="$unix_path"
34183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34185    new_path="$unix_path"
34186  fi
34187
34188
34189  # Now try to locate executable using which
34190  new_path=`$WHICH "$new_path" 2> /dev/null`
34191
34192  if test "x$new_path" = x; then
34193    # Oops. Which didn't find the executable.
34194    # The splitting of arguments from the executable at a space might have been incorrect,
34195    # since paths with space are more likely in Windows. Give it another try with the whole
34196    # argument.
34197    path="$complete"
34198    arguments="EOL"
34199    new_path="$path"
34200
34201  windows_path="$new_path"
34202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34203    unix_path=`$CYGPATH -u "$windows_path"`
34204    new_path="$unix_path"
34205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34207    new_path="$unix_path"
34208  fi
34209
34210
34211    new_path=`$WHICH "$new_path" 2> /dev/null`
34212    # bat and cmd files are not always considered executable in MSYS causing which
34213    # to not find them
34214    if test "x$new_path" = x \
34215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34217      new_path="$path"
34218
34219  windows_path="$new_path"
34220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34221    unix_path=`$CYGPATH -u "$windows_path"`
34222    new_path="$unix_path"
34223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34225    new_path="$unix_path"
34226  fi
34227
34228    fi
34229
34230    if test "x$new_path" = x; then
34231      # It's still not found. Now this is an unrecoverable error.
34232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34233$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34234      has_space=`$ECHO "$complete" | $GREP " "`
34235      if test "x$has_space" != x; then
34236        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34237$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34238      fi
34239      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34240    fi
34241  fi
34242
34243  # Now new_path has a complete unix path to the binary
34244  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34245    # Keep paths in /bin as-is, but remove trailing .exe if any
34246    new_path="${new_path/%.exe/}"
34247    # Do not save /bin paths to all_fixpath_prefixes!
34248  else
34249    # Not in mixed or Windows style, start by that.
34250    new_path=`cmd //c echo $new_path`
34251
34252  input_path="$new_path"
34253  # Check if we need to convert this using DOS-style short mode. If the path
34254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34255  # take no chances and rewrite it.
34256  # Note: m4 eats our [], so we need to use [ and ] instead.
34257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34258  if test "x$has_forbidden_chars" != x; then
34259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34261  fi
34262
34263    # Output is in $new_path
34264
34265  windows_path="$new_path"
34266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34267    unix_path=`$CYGPATH -u "$windows_path"`
34268    new_path="$unix_path"
34269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34270    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34271    new_path="$unix_path"
34272  fi
34273
34274    # remove trailing .exe if any
34275    new_path="${new_path/%.exe/}"
34276
34277    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34278    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34279  fi
34280
34281    else
34282      # We're on a unix platform. Hooray! :)
34283      # First separate the path from the arguments. This will split at the first
34284      # space.
34285      complete="$MT"
34286      path="${complete%% *}"
34287      tmp="$complete EOL"
34288      arguments="${tmp#* }"
34289
34290      # Cannot rely on the command "which" here since it doesn't always work.
34291      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34292      if test -z "$is_absolute_path"; then
34293        # Path to executable is not absolute. Find it.
34294        IFS_save="$IFS"
34295        IFS=:
34296        for p in $PATH; do
34297          if test -f "$p/$path" && test -x "$p/$path"; then
34298            new_path="$p/$path"
34299            break
34300          fi
34301        done
34302        IFS="$IFS_save"
34303      else
34304        # This is an absolute path, we can use it without further modifications.
34305        new_path="$path"
34306      fi
34307
34308      if test "x$new_path" = x; then
34309        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34310$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34311        has_space=`$ECHO "$complete" | $GREP " "`
34312        if test "x$has_space" != x; then
34313          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34314$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34315        fi
34316        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34317      fi
34318    fi
34319
34320    # Now join together the path and the arguments once again
34321    if test "x$arguments" != xEOL; then
34322      new_complete="$new_path ${arguments% *}"
34323    else
34324      new_complete="$new_path"
34325    fi
34326
34327    if test "x$complete" != "x$new_complete"; then
34328      MT="$new_complete"
34329      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34330$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34331    fi
34332  fi
34333
34334    # Setup the resource compiler (RC)
34335    # Extract the first word of "rc", so it can be a program name with args.
34336set dummy rc; ac_word=$2
34337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34338$as_echo_n "checking for $ac_word... " >&6; }
34339if ${ac_cv_prog_RC+:} false; then :
34340  $as_echo_n "(cached) " >&6
34341else
34342  if test -n "$RC"; then
34343  ac_cv_prog_RC="$RC" # Let the user override the test.
34344else
34345  ac_prog_rejected=no
34346as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34347for as_dir in $PATH
34348do
34349  IFS=$as_save_IFS
34350  test -z "$as_dir" && as_dir=.
34351    for ac_exec_ext in '' $ac_executable_extensions; do
34352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34353    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34354       ac_prog_rejected=yes
34355       continue
34356     fi
34357    ac_cv_prog_RC="rc"
34358    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34359    break 2
34360  fi
34361done
34362  done
34363IFS=$as_save_IFS
34364
34365if test $ac_prog_rejected = yes; then
34366  # We found a bogon in the path, so make sure we never use it.
34367  set dummy $ac_cv_prog_RC
34368  shift
34369  if test $# != 0; then
34370    # We chose a different compiler from the bogus one.
34371    # However, it has the same basename, so the bogon will be chosen
34372    # first if we set RC to just the basename; use the full file name.
34373    shift
34374    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34375  fi
34376fi
34377fi
34378fi
34379RC=$ac_cv_prog_RC
34380if test -n "$RC"; then
34381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34382$as_echo "$RC" >&6; }
34383else
34384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34385$as_echo "no" >&6; }
34386fi
34387
34388
34389
34390  # Only process if variable expands to non-empty
34391
34392  if test "x$RC" != x; then
34393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34394
34395  # First separate the path from the arguments. This will split at the first
34396  # space.
34397  complete="$RC"
34398  path="${complete%% *}"
34399  tmp="$complete EOL"
34400  arguments="${tmp#* }"
34401
34402  # Input might be given as Windows format, start by converting to
34403  # unix format.
34404  new_path=`$CYGPATH -u "$path"`
34405
34406  # Now try to locate executable using which
34407  new_path=`$WHICH "$new_path" 2> /dev/null`
34408  # bat and cmd files are not always considered executable in cygwin causing which
34409  # to not find them
34410  if test "x$new_path" = x \
34411      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34412      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34413    new_path=`$CYGPATH -u "$path"`
34414  fi
34415  if test "x$new_path" = x; then
34416    # Oops. Which didn't find the executable.
34417    # The splitting of arguments from the executable at a space might have been incorrect,
34418    # since paths with space are more likely in Windows. Give it another try with the whole
34419    # argument.
34420    path="$complete"
34421    arguments="EOL"
34422    new_path=`$CYGPATH -u "$path"`
34423    new_path=`$WHICH "$new_path" 2> /dev/null`
34424    # bat and cmd files are not always considered executable in cygwin causing which
34425    # to not find them
34426    if test "x$new_path" = x \
34427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34429      new_path=`$CYGPATH -u "$path"`
34430    fi
34431    if test "x$new_path" = x; then
34432      # It's still not found. Now this is an unrecoverable error.
34433      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34434$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34435      has_space=`$ECHO "$complete" | $GREP " "`
34436      if test "x$has_space" != x; then
34437        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34438$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34439      fi
34440      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34441    fi
34442  fi
34443
34444  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34445  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34446  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34447  # "foo.exe" is OK but "foo" is an error.
34448  #
34449  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34450  # It is also a way to make sure we got the proper file name for the real test later on.
34451  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34452  if test "x$test_shortpath" = x; then
34453    # Short path failed, file does not exist as specified.
34454    # Try adding .exe or .cmd
34455    if test -f "${new_path}.exe"; then
34456      input_to_shortpath="${new_path}.exe"
34457    elif test -f "${new_path}.cmd"; then
34458      input_to_shortpath="${new_path}.cmd"
34459    else
34460      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34461$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34462      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34463$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34464      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34465    fi
34466  else
34467    input_to_shortpath="$new_path"
34468  fi
34469
34470  # Call helper function which possibly converts this using DOS-style short mode.
34471  # If so, the updated path is stored in $new_path.
34472  new_path="$input_to_shortpath"
34473
34474  input_path="$input_to_shortpath"
34475  # Check if we need to convert this using DOS-style short mode. If the path
34476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34477  # take no chances and rewrite it.
34478  # Note: m4 eats our [], so we need to use [ and ] instead.
34479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34480  if test "x$has_forbidden_chars" != x; then
34481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34485      # Going to short mode and back again did indeed matter. Since short mode is
34486      # case insensitive, let's make it lowercase to improve readability.
34487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34488      # Now convert it back to Unix-stile (cygpath)
34489      input_path=`$CYGPATH -u "$shortmode_path"`
34490      new_path="$input_path"
34491    fi
34492  fi
34493
34494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34495  if test "x$test_cygdrive_prefix" = x; then
34496    # As a simple fix, exclude /usr/bin since it's not a real path.
34497    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34499      # a path prefixed by /cygdrive for fixpath to work.
34500      new_path="$CYGWIN_ROOT_PATH$input_path"
34501    fi
34502  fi
34503
34504  # remove trailing .exe if any
34505  new_path="${new_path/%.exe/}"
34506
34507    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34508
34509  # First separate the path from the arguments. This will split at the first
34510  # space.
34511  complete="$RC"
34512  path="${complete%% *}"
34513  tmp="$complete EOL"
34514  arguments="${tmp#* }"
34515
34516  # Input might be given as Windows format, start by converting to
34517  # unix format.
34518  new_path="$path"
34519
34520  windows_path="$new_path"
34521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34522    unix_path=`$CYGPATH -u "$windows_path"`
34523    new_path="$unix_path"
34524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34525    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34526    new_path="$unix_path"
34527  fi
34528
34529
34530  # Now try to locate executable using which
34531  new_path=`$WHICH "$new_path" 2> /dev/null`
34532
34533  if test "x$new_path" = x; then
34534    # Oops. Which didn't find the executable.
34535    # The splitting of arguments from the executable at a space might have been incorrect,
34536    # since paths with space are more likely in Windows. Give it another try with the whole
34537    # argument.
34538    path="$complete"
34539    arguments="EOL"
34540    new_path="$path"
34541
34542  windows_path="$new_path"
34543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34544    unix_path=`$CYGPATH -u "$windows_path"`
34545    new_path="$unix_path"
34546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34548    new_path="$unix_path"
34549  fi
34550
34551
34552    new_path=`$WHICH "$new_path" 2> /dev/null`
34553    # bat and cmd files are not always considered executable in MSYS causing which
34554    # to not find them
34555    if test "x$new_path" = x \
34556        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34557        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34558      new_path="$path"
34559
34560  windows_path="$new_path"
34561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34562    unix_path=`$CYGPATH -u "$windows_path"`
34563    new_path="$unix_path"
34564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34565    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34566    new_path="$unix_path"
34567  fi
34568
34569    fi
34570
34571    if test "x$new_path" = x; then
34572      # It's still not found. Now this is an unrecoverable error.
34573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34574$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34575      has_space=`$ECHO "$complete" | $GREP " "`
34576      if test "x$has_space" != x; then
34577        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34578$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34579      fi
34580      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34581    fi
34582  fi
34583
34584  # Now new_path has a complete unix path to the binary
34585  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34586    # Keep paths in /bin as-is, but remove trailing .exe if any
34587    new_path="${new_path/%.exe/}"
34588    # Do not save /bin paths to all_fixpath_prefixes!
34589  else
34590    # Not in mixed or Windows style, start by that.
34591    new_path=`cmd //c echo $new_path`
34592
34593  input_path="$new_path"
34594  # Check if we need to convert this using DOS-style short mode. If the path
34595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34596  # take no chances and rewrite it.
34597  # Note: m4 eats our [], so we need to use [ and ] instead.
34598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34599  if test "x$has_forbidden_chars" != x; then
34600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34602  fi
34603
34604    # Output is in $new_path
34605
34606  windows_path="$new_path"
34607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34608    unix_path=`$CYGPATH -u "$windows_path"`
34609    new_path="$unix_path"
34610  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34611    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34612    new_path="$unix_path"
34613  fi
34614
34615    # remove trailing .exe if any
34616    new_path="${new_path/%.exe/}"
34617
34618    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34619    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34620  fi
34621
34622    else
34623      # We're on a unix platform. Hooray! :)
34624      # First separate the path from the arguments. This will split at the first
34625      # space.
34626      complete="$RC"
34627      path="${complete%% *}"
34628      tmp="$complete EOL"
34629      arguments="${tmp#* }"
34630
34631      # Cannot rely on the command "which" here since it doesn't always work.
34632      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34633      if test -z "$is_absolute_path"; then
34634        # Path to executable is not absolute. Find it.
34635        IFS_save="$IFS"
34636        IFS=:
34637        for p in $PATH; do
34638          if test -f "$p/$path" && test -x "$p/$path"; then
34639            new_path="$p/$path"
34640            break
34641          fi
34642        done
34643        IFS="$IFS_save"
34644      else
34645        # This is an absolute path, we can use it without further modifications.
34646        new_path="$path"
34647      fi
34648
34649      if test "x$new_path" = x; then
34650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34651$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34652        has_space=`$ECHO "$complete" | $GREP " "`
34653        if test "x$has_space" != x; then
34654          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34655$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34656        fi
34657        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34658      fi
34659    fi
34660
34661    # Now join together the path and the arguments once again
34662    if test "x$arguments" != xEOL; then
34663      new_complete="$new_path ${arguments% *}"
34664    else
34665      new_complete="$new_path"
34666    fi
34667
34668    if test "x$complete" != "x$new_complete"; then
34669      RC="$new_complete"
34670      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34671$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34672    fi
34673  fi
34674
34675    # Extract the first word of "dumpbin", so it can be a program name with args.
34676set dummy dumpbin; ac_word=$2
34677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34678$as_echo_n "checking for $ac_word... " >&6; }
34679if ${ac_cv_prog_DUMPBIN+:} false; then :
34680  $as_echo_n "(cached) " >&6
34681else
34682  if test -n "$DUMPBIN"; then
34683  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34684else
34685as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34686for as_dir in $PATH
34687do
34688  IFS=$as_save_IFS
34689  test -z "$as_dir" && as_dir=.
34690    for ac_exec_ext in '' $ac_executable_extensions; do
34691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34692    ac_cv_prog_DUMPBIN="dumpbin"
34693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34694    break 2
34695  fi
34696done
34697  done
34698IFS=$as_save_IFS
34699
34700fi
34701fi
34702DUMPBIN=$ac_cv_prog_DUMPBIN
34703if test -n "$DUMPBIN"; then
34704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34705$as_echo "$DUMPBIN" >&6; }
34706else
34707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34708$as_echo "no" >&6; }
34709fi
34710
34711
34712
34713  # Only process if variable expands to non-empty
34714
34715  if test "x$DUMPBIN" != x; then
34716    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34717
34718  # First separate the path from the arguments. This will split at the first
34719  # space.
34720  complete="$DUMPBIN"
34721  path="${complete%% *}"
34722  tmp="$complete EOL"
34723  arguments="${tmp#* }"
34724
34725  # Input might be given as Windows format, start by converting to
34726  # unix format.
34727  new_path=`$CYGPATH -u "$path"`
34728
34729  # Now try to locate executable using which
34730  new_path=`$WHICH "$new_path" 2> /dev/null`
34731  # bat and cmd files are not always considered executable in cygwin causing which
34732  # to not find them
34733  if test "x$new_path" = x \
34734      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34735      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34736    new_path=`$CYGPATH -u "$path"`
34737  fi
34738  if test "x$new_path" = x; then
34739    # Oops. Which didn't find the executable.
34740    # The splitting of arguments from the executable at a space might have been incorrect,
34741    # since paths with space are more likely in Windows. Give it another try with the whole
34742    # argument.
34743    path="$complete"
34744    arguments="EOL"
34745    new_path=`$CYGPATH -u "$path"`
34746    new_path=`$WHICH "$new_path" 2> /dev/null`
34747    # bat and cmd files are not always considered executable in cygwin causing which
34748    # to not find them
34749    if test "x$new_path" = x \
34750        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34751        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34752      new_path=`$CYGPATH -u "$path"`
34753    fi
34754    if test "x$new_path" = x; then
34755      # It's still not found. Now this is an unrecoverable error.
34756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34757$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34758      has_space=`$ECHO "$complete" | $GREP " "`
34759      if test "x$has_space" != x; then
34760        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34761$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34762      fi
34763      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34764    fi
34765  fi
34766
34767  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34768  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34769  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34770  # "foo.exe" is OK but "foo" is an error.
34771  #
34772  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34773  # It is also a way to make sure we got the proper file name for the real test later on.
34774  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34775  if test "x$test_shortpath" = x; then
34776    # Short path failed, file does not exist as specified.
34777    # Try adding .exe or .cmd
34778    if test -f "${new_path}.exe"; then
34779      input_to_shortpath="${new_path}.exe"
34780    elif test -f "${new_path}.cmd"; then
34781      input_to_shortpath="${new_path}.cmd"
34782    else
34783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34784$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34785      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34786$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34787      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34788    fi
34789  else
34790    input_to_shortpath="$new_path"
34791  fi
34792
34793  # Call helper function which possibly converts this using DOS-style short mode.
34794  # If so, the updated path is stored in $new_path.
34795  new_path="$input_to_shortpath"
34796
34797  input_path="$input_to_shortpath"
34798  # Check if we need to convert this using DOS-style short mode. If the path
34799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34800  # take no chances and rewrite it.
34801  # Note: m4 eats our [], so we need to use [ and ] instead.
34802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34803  if test "x$has_forbidden_chars" != x; then
34804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34808      # Going to short mode and back again did indeed matter. Since short mode is
34809      # case insensitive, let's make it lowercase to improve readability.
34810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34811      # Now convert it back to Unix-stile (cygpath)
34812      input_path=`$CYGPATH -u "$shortmode_path"`
34813      new_path="$input_path"
34814    fi
34815  fi
34816
34817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34818  if test "x$test_cygdrive_prefix" = x; then
34819    # As a simple fix, exclude /usr/bin since it's not a real path.
34820    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34822      # a path prefixed by /cygdrive for fixpath to work.
34823      new_path="$CYGWIN_ROOT_PATH$input_path"
34824    fi
34825  fi
34826
34827  # remove trailing .exe if any
34828  new_path="${new_path/%.exe/}"
34829
34830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34831
34832  # First separate the path from the arguments. This will split at the first
34833  # space.
34834  complete="$DUMPBIN"
34835  path="${complete%% *}"
34836  tmp="$complete EOL"
34837  arguments="${tmp#* }"
34838
34839  # Input might be given as Windows format, start by converting to
34840  # unix format.
34841  new_path="$path"
34842
34843  windows_path="$new_path"
34844  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34845    unix_path=`$CYGPATH -u "$windows_path"`
34846    new_path="$unix_path"
34847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34848    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34849    new_path="$unix_path"
34850  fi
34851
34852
34853  # Now try to locate executable using which
34854  new_path=`$WHICH "$new_path" 2> /dev/null`
34855
34856  if test "x$new_path" = x; then
34857    # Oops. Which didn't find the executable.
34858    # The splitting of arguments from the executable at a space might have been incorrect,
34859    # since paths with space are more likely in Windows. Give it another try with the whole
34860    # argument.
34861    path="$complete"
34862    arguments="EOL"
34863    new_path="$path"
34864
34865  windows_path="$new_path"
34866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34867    unix_path=`$CYGPATH -u "$windows_path"`
34868    new_path="$unix_path"
34869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34871    new_path="$unix_path"
34872  fi
34873
34874
34875    new_path=`$WHICH "$new_path" 2> /dev/null`
34876    # bat and cmd files are not always considered executable in MSYS causing which
34877    # to not find them
34878    if test "x$new_path" = x \
34879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34881      new_path="$path"
34882
34883  windows_path="$new_path"
34884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34885    unix_path=`$CYGPATH -u "$windows_path"`
34886    new_path="$unix_path"
34887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34889    new_path="$unix_path"
34890  fi
34891
34892    fi
34893
34894    if test "x$new_path" = x; then
34895      # It's still not found. Now this is an unrecoverable error.
34896      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34897$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34898      has_space=`$ECHO "$complete" | $GREP " "`
34899      if test "x$has_space" != x; then
34900        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34901$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34902      fi
34903      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34904    fi
34905  fi
34906
34907  # Now new_path has a complete unix path to the binary
34908  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34909    # Keep paths in /bin as-is, but remove trailing .exe if any
34910    new_path="${new_path/%.exe/}"
34911    # Do not save /bin paths to all_fixpath_prefixes!
34912  else
34913    # Not in mixed or Windows style, start by that.
34914    new_path=`cmd //c echo $new_path`
34915
34916  input_path="$new_path"
34917  # Check if we need to convert this using DOS-style short mode. If the path
34918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34919  # take no chances and rewrite it.
34920  # Note: m4 eats our [], so we need to use [ and ] instead.
34921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34922  if test "x$has_forbidden_chars" != x; then
34923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34924    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34925  fi
34926
34927    # Output is in $new_path
34928
34929  windows_path="$new_path"
34930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34931    unix_path=`$CYGPATH -u "$windows_path"`
34932    new_path="$unix_path"
34933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34935    new_path="$unix_path"
34936  fi
34937
34938    # remove trailing .exe if any
34939    new_path="${new_path/%.exe/}"
34940
34941    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34942    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34943  fi
34944
34945    else
34946      # We're on a unix platform. Hooray! :)
34947      # First separate the path from the arguments. This will split at the first
34948      # space.
34949      complete="$DUMPBIN"
34950      path="${complete%% *}"
34951      tmp="$complete EOL"
34952      arguments="${tmp#* }"
34953
34954      # Cannot rely on the command "which" here since it doesn't always work.
34955      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34956      if test -z "$is_absolute_path"; then
34957        # Path to executable is not absolute. Find it.
34958        IFS_save="$IFS"
34959        IFS=:
34960        for p in $PATH; do
34961          if test -f "$p/$path" && test -x "$p/$path"; then
34962            new_path="$p/$path"
34963            break
34964          fi
34965        done
34966        IFS="$IFS_save"
34967      else
34968        # This is an absolute path, we can use it without further modifications.
34969        new_path="$path"
34970      fi
34971
34972      if test "x$new_path" = x; then
34973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34974$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34975        has_space=`$ECHO "$complete" | $GREP " "`
34976        if test "x$has_space" != x; then
34977          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34978$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34979        fi
34980        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34981      fi
34982    fi
34983
34984    # Now join together the path and the arguments once again
34985    if test "x$arguments" != xEOL; then
34986      new_complete="$new_path ${arguments% *}"
34987    else
34988      new_complete="$new_path"
34989    fi
34990
34991    if test "x$complete" != "x$new_complete"; then
34992      DUMPBIN="$new_complete"
34993      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34994$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34995    fi
34996  fi
34997
34998    # We need to check for 'msbuild.exe' because at the place where we expect to
34999    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35000    # won't find the 'msbuild.exe' executable in that case (and the
35001    # 'ac_executable_extensions' is unusable due to performance reasons).
35002    # Notice that we intentionally don't fix up the path to MSBUILD because we
35003    # will call it in a DOS shell during freetype detection on Windows (see
35004    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35005    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35006set dummy msbuild.exe; ac_word=$2
35007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35008$as_echo_n "checking for $ac_word... " >&6; }
35009if ${ac_cv_prog_MSBUILD+:} false; then :
35010  $as_echo_n "(cached) " >&6
35011else
35012  if test -n "$MSBUILD"; then
35013  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35014else
35015as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35016for as_dir in $PATH
35017do
35018  IFS=$as_save_IFS
35019  test -z "$as_dir" && as_dir=.
35020    for ac_exec_ext in '' $ac_executable_extensions; do
35021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35022    ac_cv_prog_MSBUILD="msbuild.exe"
35023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35024    break 2
35025  fi
35026done
35027  done
35028IFS=$as_save_IFS
35029
35030fi
35031fi
35032MSBUILD=$ac_cv_prog_MSBUILD
35033if test -n "$MSBUILD"; then
35034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35035$as_echo "$MSBUILD" >&6; }
35036else
35037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35038$as_echo "no" >&6; }
35039fi
35040
35041
35042  fi
35043
35044  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35045
35046
35047  # Publish this variable in the help.
35048
35049
35050  if test "x$STRIP" = x; then
35051    # The variable is not set by user, try to locate tool using the code snippet
35052    for ac_prog in strip
35053do
35054  # Extract the first word of "$ac_prog", so it can be a program name with args.
35055set dummy $ac_prog; ac_word=$2
35056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35057$as_echo_n "checking for $ac_word... " >&6; }
35058if ${ac_cv_path_STRIP+:} false; then :
35059  $as_echo_n "(cached) " >&6
35060else
35061  case $STRIP in
35062  [\\/]* | ?:[\\/]*)
35063  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35064  ;;
35065  *)
35066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35067for as_dir in $PATH
35068do
35069  IFS=$as_save_IFS
35070  test -z "$as_dir" && as_dir=.
35071    for ac_exec_ext in '' $ac_executable_extensions; do
35072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35073    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35075    break 2
35076  fi
35077done
35078  done
35079IFS=$as_save_IFS
35080
35081  ;;
35082esac
35083fi
35084STRIP=$ac_cv_path_STRIP
35085if test -n "$STRIP"; then
35086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35087$as_echo "$STRIP" >&6; }
35088else
35089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35090$as_echo "no" >&6; }
35091fi
35092
35093
35094  test -n "$STRIP" && break
35095done
35096
35097  else
35098    # The variable is set, but is it from the command line or the environment?
35099
35100    # Try to remove the string !STRIP! from our list.
35101    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35102    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35103      # If it failed, the variable was not from the command line. Ignore it,
35104      # but warn the user (except for BASH, which is always set by the calling BASH).
35105      if test "xSTRIP" != xBASH; then
35106        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35107$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35108      fi
35109      # Try to locate tool using the code snippet
35110      for ac_prog in strip
35111do
35112  # Extract the first word of "$ac_prog", so it can be a program name with args.
35113set dummy $ac_prog; ac_word=$2
35114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35115$as_echo_n "checking for $ac_word... " >&6; }
35116if ${ac_cv_path_STRIP+:} false; then :
35117  $as_echo_n "(cached) " >&6
35118else
35119  case $STRIP in
35120  [\\/]* | ?:[\\/]*)
35121  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35122  ;;
35123  *)
35124  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35125for as_dir in $PATH
35126do
35127  IFS=$as_save_IFS
35128  test -z "$as_dir" && as_dir=.
35129    for ac_exec_ext in '' $ac_executable_extensions; do
35130  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35131    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35132    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35133    break 2
35134  fi
35135done
35136  done
35137IFS=$as_save_IFS
35138
35139  ;;
35140esac
35141fi
35142STRIP=$ac_cv_path_STRIP
35143if test -n "$STRIP"; then
35144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35145$as_echo "$STRIP" >&6; }
35146else
35147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35148$as_echo "no" >&6; }
35149fi
35150
35151
35152  test -n "$STRIP" && break
35153done
35154
35155    else
35156      # If it succeeded, then it was overridden by the user. We will use it
35157      # for the tool.
35158
35159      # First remove it from the list of overridden variables, so we can test
35160      # for unknown variables in the end.
35161      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35162
35163      # Check if the provided tool contains a complete path.
35164      tool_specified="$STRIP"
35165      tool_basename="${tool_specified##*/}"
35166      if test "x$tool_basename" = "x$tool_specified"; then
35167        # A command without a complete path is provided, search $PATH.
35168        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35169$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35170        # Extract the first word of "$tool_basename", so it can be a program name with args.
35171set dummy $tool_basename; ac_word=$2
35172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35173$as_echo_n "checking for $ac_word... " >&6; }
35174if ${ac_cv_path_STRIP+:} false; then :
35175  $as_echo_n "(cached) " >&6
35176else
35177  case $STRIP in
35178  [\\/]* | ?:[\\/]*)
35179  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35180  ;;
35181  *)
35182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35183for as_dir in $PATH
35184do
35185  IFS=$as_save_IFS
35186  test -z "$as_dir" && as_dir=.
35187    for ac_exec_ext in '' $ac_executable_extensions; do
35188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35189    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35191    break 2
35192  fi
35193done
35194  done
35195IFS=$as_save_IFS
35196
35197  ;;
35198esac
35199fi
35200STRIP=$ac_cv_path_STRIP
35201if test -n "$STRIP"; then
35202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35203$as_echo "$STRIP" >&6; }
35204else
35205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35206$as_echo "no" >&6; }
35207fi
35208
35209
35210        if test "x$STRIP" = x; then
35211          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35212        fi
35213      else
35214        # Otherwise we believe it is a complete path. Use it as it is.
35215        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35216$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35217        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35218$as_echo_n "checking for STRIP... " >&6; }
35219        if test ! -x "$tool_specified"; then
35220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35221$as_echo "not found" >&6; }
35222          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35223        fi
35224        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35225$as_echo "$tool_specified" >&6; }
35226      fi
35227    fi
35228  fi
35229
35230
35231
35232  # Only process if variable expands to non-empty
35233
35234  if test "x$STRIP" != x; then
35235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35236
35237  # First separate the path from the arguments. This will split at the first
35238  # space.
35239  complete="$STRIP"
35240  path="${complete%% *}"
35241  tmp="$complete EOL"
35242  arguments="${tmp#* }"
35243
35244  # Input might be given as Windows format, start by converting to
35245  # unix format.
35246  new_path=`$CYGPATH -u "$path"`
35247
35248  # Now try to locate executable using which
35249  new_path=`$WHICH "$new_path" 2> /dev/null`
35250  # bat and cmd files are not always considered executable in cygwin causing which
35251  # to not find them
35252  if test "x$new_path" = x \
35253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35255    new_path=`$CYGPATH -u "$path"`
35256  fi
35257  if test "x$new_path" = x; then
35258    # Oops. Which didn't find the executable.
35259    # The splitting of arguments from the executable at a space might have been incorrect,
35260    # since paths with space are more likely in Windows. Give it another try with the whole
35261    # argument.
35262    path="$complete"
35263    arguments="EOL"
35264    new_path=`$CYGPATH -u "$path"`
35265    new_path=`$WHICH "$new_path" 2> /dev/null`
35266    # bat and cmd files are not always considered executable in cygwin causing which
35267    # to not find them
35268    if test "x$new_path" = x \
35269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35271      new_path=`$CYGPATH -u "$path"`
35272    fi
35273    if test "x$new_path" = x; then
35274      # It's still not found. Now this is an unrecoverable error.
35275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35276$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35277      has_space=`$ECHO "$complete" | $GREP " "`
35278      if test "x$has_space" != x; then
35279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35281      fi
35282      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35283    fi
35284  fi
35285
35286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35289  # "foo.exe" is OK but "foo" is an error.
35290  #
35291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35292  # It is also a way to make sure we got the proper file name for the real test later on.
35293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35294  if test "x$test_shortpath" = x; then
35295    # Short path failed, file does not exist as specified.
35296    # Try adding .exe or .cmd
35297    if test -f "${new_path}.exe"; then
35298      input_to_shortpath="${new_path}.exe"
35299    elif test -f "${new_path}.cmd"; then
35300      input_to_shortpath="${new_path}.cmd"
35301    else
35302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35303$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35306      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35307    fi
35308  else
35309    input_to_shortpath="$new_path"
35310  fi
35311
35312  # Call helper function which possibly converts this using DOS-style short mode.
35313  # If so, the updated path is stored in $new_path.
35314  new_path="$input_to_shortpath"
35315
35316  input_path="$input_to_shortpath"
35317  # Check if we need to convert this using DOS-style short mode. If the path
35318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35319  # take no chances and rewrite it.
35320  # Note: m4 eats our [], so we need to use [ and ] instead.
35321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35322  if test "x$has_forbidden_chars" != x; then
35323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35327      # Going to short mode and back again did indeed matter. Since short mode is
35328      # case insensitive, let's make it lowercase to improve readability.
35329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35330      # Now convert it back to Unix-stile (cygpath)
35331      input_path=`$CYGPATH -u "$shortmode_path"`
35332      new_path="$input_path"
35333    fi
35334  fi
35335
35336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35337  if test "x$test_cygdrive_prefix" = x; then
35338    # As a simple fix, exclude /usr/bin since it's not a real path.
35339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35341      # a path prefixed by /cygdrive for fixpath to work.
35342      new_path="$CYGWIN_ROOT_PATH$input_path"
35343    fi
35344  fi
35345
35346  # remove trailing .exe if any
35347  new_path="${new_path/%.exe/}"
35348
35349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35350
35351  # First separate the path from the arguments. This will split at the first
35352  # space.
35353  complete="$STRIP"
35354  path="${complete%% *}"
35355  tmp="$complete EOL"
35356  arguments="${tmp#* }"
35357
35358  # Input might be given as Windows format, start by converting to
35359  # unix format.
35360  new_path="$path"
35361
35362  windows_path="$new_path"
35363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35364    unix_path=`$CYGPATH -u "$windows_path"`
35365    new_path="$unix_path"
35366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35368    new_path="$unix_path"
35369  fi
35370
35371
35372  # Now try to locate executable using which
35373  new_path=`$WHICH "$new_path" 2> /dev/null`
35374
35375  if test "x$new_path" = x; then
35376    # Oops. Which didn't find the executable.
35377    # The splitting of arguments from the executable at a space might have been incorrect,
35378    # since paths with space are more likely in Windows. Give it another try with the whole
35379    # argument.
35380    path="$complete"
35381    arguments="EOL"
35382    new_path="$path"
35383
35384  windows_path="$new_path"
35385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35386    unix_path=`$CYGPATH -u "$windows_path"`
35387    new_path="$unix_path"
35388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35390    new_path="$unix_path"
35391  fi
35392
35393
35394    new_path=`$WHICH "$new_path" 2> /dev/null`
35395    # bat and cmd files are not always considered executable in MSYS causing which
35396    # to not find them
35397    if test "x$new_path" = x \
35398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35400      new_path="$path"
35401
35402  windows_path="$new_path"
35403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35404    unix_path=`$CYGPATH -u "$windows_path"`
35405    new_path="$unix_path"
35406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35408    new_path="$unix_path"
35409  fi
35410
35411    fi
35412
35413    if test "x$new_path" = x; then
35414      # It's still not found. Now this is an unrecoverable error.
35415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35416$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35417      has_space=`$ECHO "$complete" | $GREP " "`
35418      if test "x$has_space" != x; then
35419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35421      fi
35422      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35423    fi
35424  fi
35425
35426  # Now new_path has a complete unix path to the binary
35427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35428    # Keep paths in /bin as-is, but remove trailing .exe if any
35429    new_path="${new_path/%.exe/}"
35430    # Do not save /bin paths to all_fixpath_prefixes!
35431  else
35432    # Not in mixed or Windows style, start by that.
35433    new_path=`cmd //c echo $new_path`
35434
35435  input_path="$new_path"
35436  # Check if we need to convert this using DOS-style short mode. If the path
35437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35438  # take no chances and rewrite it.
35439  # Note: m4 eats our [], so we need to use [ and ] instead.
35440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35441  if test "x$has_forbidden_chars" != x; then
35442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35444  fi
35445
35446    # Output is in $new_path
35447
35448  windows_path="$new_path"
35449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35450    unix_path=`$CYGPATH -u "$windows_path"`
35451    new_path="$unix_path"
35452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35454    new_path="$unix_path"
35455  fi
35456
35457    # remove trailing .exe if any
35458    new_path="${new_path/%.exe/}"
35459
35460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35462  fi
35463
35464    else
35465      # We're on a unix platform. Hooray! :)
35466      # First separate the path from the arguments. This will split at the first
35467      # space.
35468      complete="$STRIP"
35469      path="${complete%% *}"
35470      tmp="$complete EOL"
35471      arguments="${tmp#* }"
35472
35473      # Cannot rely on the command "which" here since it doesn't always work.
35474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35475      if test -z "$is_absolute_path"; then
35476        # Path to executable is not absolute. Find it.
35477        IFS_save="$IFS"
35478        IFS=:
35479        for p in $PATH; do
35480          if test -f "$p/$path" && test -x "$p/$path"; then
35481            new_path="$p/$path"
35482            break
35483          fi
35484        done
35485        IFS="$IFS_save"
35486      else
35487        # This is an absolute path, we can use it without further modifications.
35488        new_path="$path"
35489      fi
35490
35491      if test "x$new_path" = x; then
35492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35493$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35494        has_space=`$ECHO "$complete" | $GREP " "`
35495        if test "x$has_space" != x; then
35496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35498        fi
35499        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35500      fi
35501    fi
35502
35503    # Now join together the path and the arguments once again
35504    if test "x$arguments" != xEOL; then
35505      new_complete="$new_path ${arguments% *}"
35506    else
35507      new_complete="$new_path"
35508    fi
35509
35510    if test "x$complete" != "x$new_complete"; then
35511      STRIP="$new_complete"
35512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35513$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35514    fi
35515  fi
35516
35517
35518
35519  # Publish this variable in the help.
35520
35521
35522  if test "x$NM" = x; then
35523    # The variable is not set by user, try to locate tool using the code snippet
35524    for ac_prog in nm
35525do
35526  # Extract the first word of "$ac_prog", so it can be a program name with args.
35527set dummy $ac_prog; ac_word=$2
35528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35529$as_echo_n "checking for $ac_word... " >&6; }
35530if ${ac_cv_path_NM+:} false; then :
35531  $as_echo_n "(cached) " >&6
35532else
35533  case $NM in
35534  [\\/]* | ?:[\\/]*)
35535  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35536  ;;
35537  *)
35538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35539for as_dir in $PATH
35540do
35541  IFS=$as_save_IFS
35542  test -z "$as_dir" && as_dir=.
35543    for ac_exec_ext in '' $ac_executable_extensions; do
35544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35545    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35547    break 2
35548  fi
35549done
35550  done
35551IFS=$as_save_IFS
35552
35553  ;;
35554esac
35555fi
35556NM=$ac_cv_path_NM
35557if test -n "$NM"; then
35558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35559$as_echo "$NM" >&6; }
35560else
35561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35562$as_echo "no" >&6; }
35563fi
35564
35565
35566  test -n "$NM" && break
35567done
35568
35569  else
35570    # The variable is set, but is it from the command line or the environment?
35571
35572    # Try to remove the string !NM! from our list.
35573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35575      # If it failed, the variable was not from the command line. Ignore it,
35576      # but warn the user (except for BASH, which is always set by the calling BASH).
35577      if test "xNM" != xBASH; then
35578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35579$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35580      fi
35581      # Try to locate tool using the code snippet
35582      for ac_prog in nm
35583do
35584  # Extract the first word of "$ac_prog", so it can be a program name with args.
35585set dummy $ac_prog; ac_word=$2
35586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35587$as_echo_n "checking for $ac_word... " >&6; }
35588if ${ac_cv_path_NM+:} false; then :
35589  $as_echo_n "(cached) " >&6
35590else
35591  case $NM in
35592  [\\/]* | ?:[\\/]*)
35593  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35594  ;;
35595  *)
35596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35597for as_dir in $PATH
35598do
35599  IFS=$as_save_IFS
35600  test -z "$as_dir" && as_dir=.
35601    for ac_exec_ext in '' $ac_executable_extensions; do
35602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35603    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35605    break 2
35606  fi
35607done
35608  done
35609IFS=$as_save_IFS
35610
35611  ;;
35612esac
35613fi
35614NM=$ac_cv_path_NM
35615if test -n "$NM"; then
35616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35617$as_echo "$NM" >&6; }
35618else
35619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35620$as_echo "no" >&6; }
35621fi
35622
35623
35624  test -n "$NM" && break
35625done
35626
35627    else
35628      # If it succeeded, then it was overridden by the user. We will use it
35629      # for the tool.
35630
35631      # First remove it from the list of overridden variables, so we can test
35632      # for unknown variables in the end.
35633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35634
35635      # Check if the provided tool contains a complete path.
35636      tool_specified="$NM"
35637      tool_basename="${tool_specified##*/}"
35638      if test "x$tool_basename" = "x$tool_specified"; then
35639        # A command without a complete path is provided, search $PATH.
35640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35641$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35642        # Extract the first word of "$tool_basename", so it can be a program name with args.
35643set dummy $tool_basename; ac_word=$2
35644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35645$as_echo_n "checking for $ac_word... " >&6; }
35646if ${ac_cv_path_NM+:} false; then :
35647  $as_echo_n "(cached) " >&6
35648else
35649  case $NM in
35650  [\\/]* | ?:[\\/]*)
35651  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35652  ;;
35653  *)
35654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35655for as_dir in $PATH
35656do
35657  IFS=$as_save_IFS
35658  test -z "$as_dir" && as_dir=.
35659    for ac_exec_ext in '' $ac_executable_extensions; do
35660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35661    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35663    break 2
35664  fi
35665done
35666  done
35667IFS=$as_save_IFS
35668
35669  ;;
35670esac
35671fi
35672NM=$ac_cv_path_NM
35673if test -n "$NM"; then
35674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35675$as_echo "$NM" >&6; }
35676else
35677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35678$as_echo "no" >&6; }
35679fi
35680
35681
35682        if test "x$NM" = x; then
35683          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35684        fi
35685      else
35686        # Otherwise we believe it is a complete path. Use it as it is.
35687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35688$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35690$as_echo_n "checking for NM... " >&6; }
35691        if test ! -x "$tool_specified"; then
35692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35693$as_echo "not found" >&6; }
35694          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35695        fi
35696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35697$as_echo "$tool_specified" >&6; }
35698      fi
35699    fi
35700  fi
35701
35702
35703
35704  # Only process if variable expands to non-empty
35705
35706  if test "x$NM" != x; then
35707    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35708
35709  # First separate the path from the arguments. This will split at the first
35710  # space.
35711  complete="$NM"
35712  path="${complete%% *}"
35713  tmp="$complete EOL"
35714  arguments="${tmp#* }"
35715
35716  # Input might be given as Windows format, start by converting to
35717  # unix format.
35718  new_path=`$CYGPATH -u "$path"`
35719
35720  # Now try to locate executable using which
35721  new_path=`$WHICH "$new_path" 2> /dev/null`
35722  # bat and cmd files are not always considered executable in cygwin causing which
35723  # to not find them
35724  if test "x$new_path" = x \
35725      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35726      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35727    new_path=`$CYGPATH -u "$path"`
35728  fi
35729  if test "x$new_path" = x; then
35730    # Oops. Which didn't find the executable.
35731    # The splitting of arguments from the executable at a space might have been incorrect,
35732    # since paths with space are more likely in Windows. Give it another try with the whole
35733    # argument.
35734    path="$complete"
35735    arguments="EOL"
35736    new_path=`$CYGPATH -u "$path"`
35737    new_path=`$WHICH "$new_path" 2> /dev/null`
35738    # bat and cmd files are not always considered executable in cygwin causing which
35739    # to not find them
35740    if test "x$new_path" = x \
35741        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35742        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35743      new_path=`$CYGPATH -u "$path"`
35744    fi
35745    if test "x$new_path" = x; then
35746      # It's still not found. Now this is an unrecoverable error.
35747      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35748$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35749      has_space=`$ECHO "$complete" | $GREP " "`
35750      if test "x$has_space" != x; then
35751        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35752$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35753      fi
35754      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35755    fi
35756  fi
35757
35758  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35759  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35760  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35761  # "foo.exe" is OK but "foo" is an error.
35762  #
35763  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35764  # It is also a way to make sure we got the proper file name for the real test later on.
35765  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35766  if test "x$test_shortpath" = x; then
35767    # Short path failed, file does not exist as specified.
35768    # Try adding .exe or .cmd
35769    if test -f "${new_path}.exe"; then
35770      input_to_shortpath="${new_path}.exe"
35771    elif test -f "${new_path}.cmd"; then
35772      input_to_shortpath="${new_path}.cmd"
35773    else
35774      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35775$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35776      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35777$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35778      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35779    fi
35780  else
35781    input_to_shortpath="$new_path"
35782  fi
35783
35784  # Call helper function which possibly converts this using DOS-style short mode.
35785  # If so, the updated path is stored in $new_path.
35786  new_path="$input_to_shortpath"
35787
35788  input_path="$input_to_shortpath"
35789  # Check if we need to convert this using DOS-style short mode. If the path
35790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35791  # take no chances and rewrite it.
35792  # Note: m4 eats our [], so we need to use [ and ] instead.
35793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35794  if test "x$has_forbidden_chars" != x; then
35795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35799      # Going to short mode and back again did indeed matter. Since short mode is
35800      # case insensitive, let's make it lowercase to improve readability.
35801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35802      # Now convert it back to Unix-stile (cygpath)
35803      input_path=`$CYGPATH -u "$shortmode_path"`
35804      new_path="$input_path"
35805    fi
35806  fi
35807
35808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35809  if test "x$test_cygdrive_prefix" = x; then
35810    # As a simple fix, exclude /usr/bin since it's not a real path.
35811    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35813      # a path prefixed by /cygdrive for fixpath to work.
35814      new_path="$CYGWIN_ROOT_PATH$input_path"
35815    fi
35816  fi
35817
35818  # remove trailing .exe if any
35819  new_path="${new_path/%.exe/}"
35820
35821    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35822
35823  # First separate the path from the arguments. This will split at the first
35824  # space.
35825  complete="$NM"
35826  path="${complete%% *}"
35827  tmp="$complete EOL"
35828  arguments="${tmp#* }"
35829
35830  # Input might be given as Windows format, start by converting to
35831  # unix format.
35832  new_path="$path"
35833
35834  windows_path="$new_path"
35835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35836    unix_path=`$CYGPATH -u "$windows_path"`
35837    new_path="$unix_path"
35838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35840    new_path="$unix_path"
35841  fi
35842
35843
35844  # Now try to locate executable using which
35845  new_path=`$WHICH "$new_path" 2> /dev/null`
35846
35847  if test "x$new_path" = x; then
35848    # Oops. Which didn't find the executable.
35849    # The splitting of arguments from the executable at a space might have been incorrect,
35850    # since paths with space are more likely in Windows. Give it another try with the whole
35851    # argument.
35852    path="$complete"
35853    arguments="EOL"
35854    new_path="$path"
35855
35856  windows_path="$new_path"
35857  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35858    unix_path=`$CYGPATH -u "$windows_path"`
35859    new_path="$unix_path"
35860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35861    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35862    new_path="$unix_path"
35863  fi
35864
35865
35866    new_path=`$WHICH "$new_path" 2> /dev/null`
35867    # bat and cmd files are not always considered executable in MSYS causing which
35868    # to not find them
35869    if test "x$new_path" = x \
35870        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35871        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35872      new_path="$path"
35873
35874  windows_path="$new_path"
35875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35876    unix_path=`$CYGPATH -u "$windows_path"`
35877    new_path="$unix_path"
35878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35880    new_path="$unix_path"
35881  fi
35882
35883    fi
35884
35885    if test "x$new_path" = x; then
35886      # It's still not found. Now this is an unrecoverable error.
35887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35888$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35889      has_space=`$ECHO "$complete" | $GREP " "`
35890      if test "x$has_space" != x; then
35891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35893      fi
35894      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35895    fi
35896  fi
35897
35898  # Now new_path has a complete unix path to the binary
35899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35900    # Keep paths in /bin as-is, but remove trailing .exe if any
35901    new_path="${new_path/%.exe/}"
35902    # Do not save /bin paths to all_fixpath_prefixes!
35903  else
35904    # Not in mixed or Windows style, start by that.
35905    new_path=`cmd //c echo $new_path`
35906
35907  input_path="$new_path"
35908  # Check if we need to convert this using DOS-style short mode. If the path
35909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35910  # take no chances and rewrite it.
35911  # Note: m4 eats our [], so we need to use [ and ] instead.
35912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35913  if test "x$has_forbidden_chars" != x; then
35914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35916  fi
35917
35918    # Output is in $new_path
35919
35920  windows_path="$new_path"
35921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35922    unix_path=`$CYGPATH -u "$windows_path"`
35923    new_path="$unix_path"
35924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35926    new_path="$unix_path"
35927  fi
35928
35929    # remove trailing .exe if any
35930    new_path="${new_path/%.exe/}"
35931
35932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35934  fi
35935
35936    else
35937      # We're on a unix platform. Hooray! :)
35938      # First separate the path from the arguments. This will split at the first
35939      # space.
35940      complete="$NM"
35941      path="${complete%% *}"
35942      tmp="$complete EOL"
35943      arguments="${tmp#* }"
35944
35945      # Cannot rely on the command "which" here since it doesn't always work.
35946      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35947      if test -z "$is_absolute_path"; then
35948        # Path to executable is not absolute. Find it.
35949        IFS_save="$IFS"
35950        IFS=:
35951        for p in $PATH; do
35952          if test -f "$p/$path" && test -x "$p/$path"; then
35953            new_path="$p/$path"
35954            break
35955          fi
35956        done
35957        IFS="$IFS_save"
35958      else
35959        # This is an absolute path, we can use it without further modifications.
35960        new_path="$path"
35961      fi
35962
35963      if test "x$new_path" = x; then
35964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35965$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35966        has_space=`$ECHO "$complete" | $GREP " "`
35967        if test "x$has_space" != x; then
35968          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35970        fi
35971        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35972      fi
35973    fi
35974
35975    # Now join together the path and the arguments once again
35976    if test "x$arguments" != xEOL; then
35977      new_complete="$new_path ${arguments% *}"
35978    else
35979      new_complete="$new_path"
35980    fi
35981
35982    if test "x$complete" != "x$new_complete"; then
35983      NM="$new_complete"
35984      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35985$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35986    fi
35987  fi
35988
35989
35990
35991  # Publish this variable in the help.
35992
35993
35994  if test "x$GNM" = x; then
35995    # The variable is not set by user, try to locate tool using the code snippet
35996    for ac_prog in gnm
35997do
35998  # Extract the first word of "$ac_prog", so it can be a program name with args.
35999set dummy $ac_prog; ac_word=$2
36000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36001$as_echo_n "checking for $ac_word... " >&6; }
36002if ${ac_cv_path_GNM+:} false; then :
36003  $as_echo_n "(cached) " >&6
36004else
36005  case $GNM in
36006  [\\/]* | ?:[\\/]*)
36007  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36008  ;;
36009  *)
36010  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36011for as_dir in $PATH
36012do
36013  IFS=$as_save_IFS
36014  test -z "$as_dir" && as_dir=.
36015    for ac_exec_ext in '' $ac_executable_extensions; do
36016  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36017    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36019    break 2
36020  fi
36021done
36022  done
36023IFS=$as_save_IFS
36024
36025  ;;
36026esac
36027fi
36028GNM=$ac_cv_path_GNM
36029if test -n "$GNM"; then
36030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36031$as_echo "$GNM" >&6; }
36032else
36033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36034$as_echo "no" >&6; }
36035fi
36036
36037
36038  test -n "$GNM" && break
36039done
36040
36041  else
36042    # The variable is set, but is it from the command line or the environment?
36043
36044    # Try to remove the string !GNM! from our list.
36045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36047      # If it failed, the variable was not from the command line. Ignore it,
36048      # but warn the user (except for BASH, which is always set by the calling BASH).
36049      if test "xGNM" != xBASH; then
36050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36051$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36052      fi
36053      # Try to locate tool using the code snippet
36054      for ac_prog in gnm
36055do
36056  # Extract the first word of "$ac_prog", so it can be a program name with args.
36057set dummy $ac_prog; ac_word=$2
36058{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36059$as_echo_n "checking for $ac_word... " >&6; }
36060if ${ac_cv_path_GNM+:} false; then :
36061  $as_echo_n "(cached) " >&6
36062else
36063  case $GNM in
36064  [\\/]* | ?:[\\/]*)
36065  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36066  ;;
36067  *)
36068  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36069for as_dir in $PATH
36070do
36071  IFS=$as_save_IFS
36072  test -z "$as_dir" && as_dir=.
36073    for ac_exec_ext in '' $ac_executable_extensions; do
36074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36075    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36077    break 2
36078  fi
36079done
36080  done
36081IFS=$as_save_IFS
36082
36083  ;;
36084esac
36085fi
36086GNM=$ac_cv_path_GNM
36087if test -n "$GNM"; then
36088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36089$as_echo "$GNM" >&6; }
36090else
36091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36092$as_echo "no" >&6; }
36093fi
36094
36095
36096  test -n "$GNM" && break
36097done
36098
36099    else
36100      # If it succeeded, then it was overridden by the user. We will use it
36101      # for the tool.
36102
36103      # First remove it from the list of overridden variables, so we can test
36104      # for unknown variables in the end.
36105      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36106
36107      # Check if the provided tool contains a complete path.
36108      tool_specified="$GNM"
36109      tool_basename="${tool_specified##*/}"
36110      if test "x$tool_basename" = "x$tool_specified"; then
36111        # A command without a complete path is provided, search $PATH.
36112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36113$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36114        # Extract the first word of "$tool_basename", so it can be a program name with args.
36115set dummy $tool_basename; ac_word=$2
36116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36117$as_echo_n "checking for $ac_word... " >&6; }
36118if ${ac_cv_path_GNM+:} false; then :
36119  $as_echo_n "(cached) " >&6
36120else
36121  case $GNM in
36122  [\\/]* | ?:[\\/]*)
36123  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36124  ;;
36125  *)
36126  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36127for as_dir in $PATH
36128do
36129  IFS=$as_save_IFS
36130  test -z "$as_dir" && as_dir=.
36131    for ac_exec_ext in '' $ac_executable_extensions; do
36132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36133    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36135    break 2
36136  fi
36137done
36138  done
36139IFS=$as_save_IFS
36140
36141  ;;
36142esac
36143fi
36144GNM=$ac_cv_path_GNM
36145if test -n "$GNM"; then
36146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36147$as_echo "$GNM" >&6; }
36148else
36149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36150$as_echo "no" >&6; }
36151fi
36152
36153
36154        if test "x$GNM" = x; then
36155          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36156        fi
36157      else
36158        # Otherwise we believe it is a complete path. Use it as it is.
36159        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36160$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36161        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36162$as_echo_n "checking for GNM... " >&6; }
36163        if test ! -x "$tool_specified"; then
36164          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36165$as_echo "not found" >&6; }
36166          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36167        fi
36168        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36169$as_echo "$tool_specified" >&6; }
36170      fi
36171    fi
36172  fi
36173
36174
36175
36176  # Only process if variable expands to non-empty
36177
36178  if test "x$GNM" != x; then
36179    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36180
36181  # First separate the path from the arguments. This will split at the first
36182  # space.
36183  complete="$GNM"
36184  path="${complete%% *}"
36185  tmp="$complete EOL"
36186  arguments="${tmp#* }"
36187
36188  # Input might be given as Windows format, start by converting to
36189  # unix format.
36190  new_path=`$CYGPATH -u "$path"`
36191
36192  # Now try to locate executable using which
36193  new_path=`$WHICH "$new_path" 2> /dev/null`
36194  # bat and cmd files are not always considered executable in cygwin causing which
36195  # to not find them
36196  if test "x$new_path" = x \
36197      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36198      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36199    new_path=`$CYGPATH -u "$path"`
36200  fi
36201  if test "x$new_path" = x; then
36202    # Oops. Which didn't find the executable.
36203    # The splitting of arguments from the executable at a space might have been incorrect,
36204    # since paths with space are more likely in Windows. Give it another try with the whole
36205    # argument.
36206    path="$complete"
36207    arguments="EOL"
36208    new_path=`$CYGPATH -u "$path"`
36209    new_path=`$WHICH "$new_path" 2> /dev/null`
36210    # bat and cmd files are not always considered executable in cygwin causing which
36211    # to not find them
36212    if test "x$new_path" = x \
36213        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36214        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36215      new_path=`$CYGPATH -u "$path"`
36216    fi
36217    if test "x$new_path" = x; then
36218      # It's still not found. Now this is an unrecoverable error.
36219      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36220$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36221      has_space=`$ECHO "$complete" | $GREP " "`
36222      if test "x$has_space" != x; then
36223        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36224$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36225      fi
36226      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36227    fi
36228  fi
36229
36230  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36231  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36232  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36233  # "foo.exe" is OK but "foo" is an error.
36234  #
36235  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36236  # It is also a way to make sure we got the proper file name for the real test later on.
36237  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36238  if test "x$test_shortpath" = x; then
36239    # Short path failed, file does not exist as specified.
36240    # Try adding .exe or .cmd
36241    if test -f "${new_path}.exe"; then
36242      input_to_shortpath="${new_path}.exe"
36243    elif test -f "${new_path}.cmd"; then
36244      input_to_shortpath="${new_path}.cmd"
36245    else
36246      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36247$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36248      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36249$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36250      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36251    fi
36252  else
36253    input_to_shortpath="$new_path"
36254  fi
36255
36256  # Call helper function which possibly converts this using DOS-style short mode.
36257  # If so, the updated path is stored in $new_path.
36258  new_path="$input_to_shortpath"
36259
36260  input_path="$input_to_shortpath"
36261  # Check if we need to convert this using DOS-style short mode. If the path
36262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36263  # take no chances and rewrite it.
36264  # Note: m4 eats our [], so we need to use [ and ] instead.
36265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36266  if test "x$has_forbidden_chars" != x; then
36267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36271      # Going to short mode and back again did indeed matter. Since short mode is
36272      # case insensitive, let's make it lowercase to improve readability.
36273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36274      # Now convert it back to Unix-stile (cygpath)
36275      input_path=`$CYGPATH -u "$shortmode_path"`
36276      new_path="$input_path"
36277    fi
36278  fi
36279
36280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36281  if test "x$test_cygdrive_prefix" = x; then
36282    # As a simple fix, exclude /usr/bin since it's not a real path.
36283    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36285      # a path prefixed by /cygdrive for fixpath to work.
36286      new_path="$CYGWIN_ROOT_PATH$input_path"
36287    fi
36288  fi
36289
36290  # remove trailing .exe if any
36291  new_path="${new_path/%.exe/}"
36292
36293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36294
36295  # First separate the path from the arguments. This will split at the first
36296  # space.
36297  complete="$GNM"
36298  path="${complete%% *}"
36299  tmp="$complete EOL"
36300  arguments="${tmp#* }"
36301
36302  # Input might be given as Windows format, start by converting to
36303  # unix format.
36304  new_path="$path"
36305
36306  windows_path="$new_path"
36307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36308    unix_path=`$CYGPATH -u "$windows_path"`
36309    new_path="$unix_path"
36310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36312    new_path="$unix_path"
36313  fi
36314
36315
36316  # Now try to locate executable using which
36317  new_path=`$WHICH "$new_path" 2> /dev/null`
36318
36319  if test "x$new_path" = x; then
36320    # Oops. Which didn't find the executable.
36321    # The splitting of arguments from the executable at a space might have been incorrect,
36322    # since paths with space are more likely in Windows. Give it another try with the whole
36323    # argument.
36324    path="$complete"
36325    arguments="EOL"
36326    new_path="$path"
36327
36328  windows_path="$new_path"
36329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36330    unix_path=`$CYGPATH -u "$windows_path"`
36331    new_path="$unix_path"
36332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36334    new_path="$unix_path"
36335  fi
36336
36337
36338    new_path=`$WHICH "$new_path" 2> /dev/null`
36339    # bat and cmd files are not always considered executable in MSYS causing which
36340    # to not find them
36341    if test "x$new_path" = x \
36342        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36343        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36344      new_path="$path"
36345
36346  windows_path="$new_path"
36347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36348    unix_path=`$CYGPATH -u "$windows_path"`
36349    new_path="$unix_path"
36350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36352    new_path="$unix_path"
36353  fi
36354
36355    fi
36356
36357    if test "x$new_path" = x; then
36358      # It's still not found. Now this is an unrecoverable error.
36359      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36360$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36361      has_space=`$ECHO "$complete" | $GREP " "`
36362      if test "x$has_space" != x; then
36363        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36364$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36365      fi
36366      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36367    fi
36368  fi
36369
36370  # Now new_path has a complete unix path to the binary
36371  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36372    # Keep paths in /bin as-is, but remove trailing .exe if any
36373    new_path="${new_path/%.exe/}"
36374    # Do not save /bin paths to all_fixpath_prefixes!
36375  else
36376    # Not in mixed or Windows style, start by that.
36377    new_path=`cmd //c echo $new_path`
36378
36379  input_path="$new_path"
36380  # Check if we need to convert this using DOS-style short mode. If the path
36381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36382  # take no chances and rewrite it.
36383  # Note: m4 eats our [], so we need to use [ and ] instead.
36384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36385  if test "x$has_forbidden_chars" != x; then
36386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36388  fi
36389
36390    # Output is in $new_path
36391
36392  windows_path="$new_path"
36393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36394    unix_path=`$CYGPATH -u "$windows_path"`
36395    new_path="$unix_path"
36396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36398    new_path="$unix_path"
36399  fi
36400
36401    # remove trailing .exe if any
36402    new_path="${new_path/%.exe/}"
36403
36404    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36405    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36406  fi
36407
36408    else
36409      # We're on a unix platform. Hooray! :)
36410      # First separate the path from the arguments. This will split at the first
36411      # space.
36412      complete="$GNM"
36413      path="${complete%% *}"
36414      tmp="$complete EOL"
36415      arguments="${tmp#* }"
36416
36417      # Cannot rely on the command "which" here since it doesn't always work.
36418      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36419      if test -z "$is_absolute_path"; then
36420        # Path to executable is not absolute. Find it.
36421        IFS_save="$IFS"
36422        IFS=:
36423        for p in $PATH; do
36424          if test -f "$p/$path" && test -x "$p/$path"; then
36425            new_path="$p/$path"
36426            break
36427          fi
36428        done
36429        IFS="$IFS_save"
36430      else
36431        # This is an absolute path, we can use it without further modifications.
36432        new_path="$path"
36433      fi
36434
36435      if test "x$new_path" = x; then
36436        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36437$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36438        has_space=`$ECHO "$complete" | $GREP " "`
36439        if test "x$has_space" != x; then
36440          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36441$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36442        fi
36443        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36444      fi
36445    fi
36446
36447    # Now join together the path and the arguments once again
36448    if test "x$arguments" != xEOL; then
36449      new_complete="$new_path ${arguments% *}"
36450    else
36451      new_complete="$new_path"
36452    fi
36453
36454    if test "x$complete" != "x$new_complete"; then
36455      GNM="$new_complete"
36456      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36457$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36458    fi
36459  fi
36460
36461
36462
36463
36464  # Publish this variable in the help.
36465
36466
36467  if test "x$MCS" = x; then
36468    # The variable is not set by user, try to locate tool using the code snippet
36469    for ac_prog in mcs
36470do
36471  # Extract the first word of "$ac_prog", so it can be a program name with args.
36472set dummy $ac_prog; ac_word=$2
36473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36474$as_echo_n "checking for $ac_word... " >&6; }
36475if ${ac_cv_path_MCS+:} false; then :
36476  $as_echo_n "(cached) " >&6
36477else
36478  case $MCS in
36479  [\\/]* | ?:[\\/]*)
36480  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36481  ;;
36482  *)
36483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36484for as_dir in $PATH
36485do
36486  IFS=$as_save_IFS
36487  test -z "$as_dir" && as_dir=.
36488    for ac_exec_ext in '' $ac_executable_extensions; do
36489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36490    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36492    break 2
36493  fi
36494done
36495  done
36496IFS=$as_save_IFS
36497
36498  ;;
36499esac
36500fi
36501MCS=$ac_cv_path_MCS
36502if test -n "$MCS"; then
36503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36504$as_echo "$MCS" >&6; }
36505else
36506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36507$as_echo "no" >&6; }
36508fi
36509
36510
36511  test -n "$MCS" && break
36512done
36513
36514  else
36515    # The variable is set, but is it from the command line or the environment?
36516
36517    # Try to remove the string !MCS! from our list.
36518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36520      # If it failed, the variable was not from the command line. Ignore it,
36521      # but warn the user (except for BASH, which is always set by the calling BASH).
36522      if test "xMCS" != xBASH; then
36523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36524$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36525      fi
36526      # Try to locate tool using the code snippet
36527      for ac_prog in mcs
36528do
36529  # Extract the first word of "$ac_prog", so it can be a program name with args.
36530set dummy $ac_prog; ac_word=$2
36531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36532$as_echo_n "checking for $ac_word... " >&6; }
36533if ${ac_cv_path_MCS+:} false; then :
36534  $as_echo_n "(cached) " >&6
36535else
36536  case $MCS in
36537  [\\/]* | ?:[\\/]*)
36538  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36539  ;;
36540  *)
36541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36542for as_dir in $PATH
36543do
36544  IFS=$as_save_IFS
36545  test -z "$as_dir" && as_dir=.
36546    for ac_exec_ext in '' $ac_executable_extensions; do
36547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36548    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36550    break 2
36551  fi
36552done
36553  done
36554IFS=$as_save_IFS
36555
36556  ;;
36557esac
36558fi
36559MCS=$ac_cv_path_MCS
36560if test -n "$MCS"; then
36561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36562$as_echo "$MCS" >&6; }
36563else
36564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36565$as_echo "no" >&6; }
36566fi
36567
36568
36569  test -n "$MCS" && break
36570done
36571
36572    else
36573      # If it succeeded, then it was overridden by the user. We will use it
36574      # for the tool.
36575
36576      # First remove it from the list of overridden variables, so we can test
36577      # for unknown variables in the end.
36578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36579
36580      # Check if the provided tool contains a complete path.
36581      tool_specified="$MCS"
36582      tool_basename="${tool_specified##*/}"
36583      if test "x$tool_basename" = "x$tool_specified"; then
36584        # A command without a complete path is provided, search $PATH.
36585        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36586$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36587        # Extract the first word of "$tool_basename", so it can be a program name with args.
36588set dummy $tool_basename; ac_word=$2
36589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36590$as_echo_n "checking for $ac_word... " >&6; }
36591if ${ac_cv_path_MCS+:} false; then :
36592  $as_echo_n "(cached) " >&6
36593else
36594  case $MCS in
36595  [\\/]* | ?:[\\/]*)
36596  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36597  ;;
36598  *)
36599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36600for as_dir in $PATH
36601do
36602  IFS=$as_save_IFS
36603  test -z "$as_dir" && as_dir=.
36604    for ac_exec_ext in '' $ac_executable_extensions; do
36605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36606    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36608    break 2
36609  fi
36610done
36611  done
36612IFS=$as_save_IFS
36613
36614  ;;
36615esac
36616fi
36617MCS=$ac_cv_path_MCS
36618if test -n "$MCS"; then
36619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36620$as_echo "$MCS" >&6; }
36621else
36622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36623$as_echo "no" >&6; }
36624fi
36625
36626
36627        if test "x$MCS" = x; then
36628          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36629        fi
36630      else
36631        # Otherwise we believe it is a complete path. Use it as it is.
36632        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36633$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36635$as_echo_n "checking for MCS... " >&6; }
36636        if test ! -x "$tool_specified"; then
36637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36638$as_echo "not found" >&6; }
36639          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36640        fi
36641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36642$as_echo "$tool_specified" >&6; }
36643      fi
36644    fi
36645  fi
36646
36647
36648
36649  # Only process if variable expands to non-empty
36650
36651  if test "x$MCS" != x; then
36652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36653
36654  # First separate the path from the arguments. This will split at the first
36655  # space.
36656  complete="$MCS"
36657  path="${complete%% *}"
36658  tmp="$complete EOL"
36659  arguments="${tmp#* }"
36660
36661  # Input might be given as Windows format, start by converting to
36662  # unix format.
36663  new_path=`$CYGPATH -u "$path"`
36664
36665  # Now try to locate executable using which
36666  new_path=`$WHICH "$new_path" 2> /dev/null`
36667  # bat and cmd files are not always considered executable in cygwin causing which
36668  # to not find them
36669  if test "x$new_path" = x \
36670      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36671      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36672    new_path=`$CYGPATH -u "$path"`
36673  fi
36674  if test "x$new_path" = x; then
36675    # Oops. Which didn't find the executable.
36676    # The splitting of arguments from the executable at a space might have been incorrect,
36677    # since paths with space are more likely in Windows. Give it another try with the whole
36678    # argument.
36679    path="$complete"
36680    arguments="EOL"
36681    new_path=`$CYGPATH -u "$path"`
36682    new_path=`$WHICH "$new_path" 2> /dev/null`
36683    # bat and cmd files are not always considered executable in cygwin causing which
36684    # to not find them
36685    if test "x$new_path" = x \
36686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36688      new_path=`$CYGPATH -u "$path"`
36689    fi
36690    if test "x$new_path" = x; then
36691      # It's still not found. Now this is an unrecoverable error.
36692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36693$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36694      has_space=`$ECHO "$complete" | $GREP " "`
36695      if test "x$has_space" != x; then
36696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36698      fi
36699      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36700    fi
36701  fi
36702
36703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36706  # "foo.exe" is OK but "foo" is an error.
36707  #
36708  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36709  # It is also a way to make sure we got the proper file name for the real test later on.
36710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36711  if test "x$test_shortpath" = x; then
36712    # Short path failed, file does not exist as specified.
36713    # Try adding .exe or .cmd
36714    if test -f "${new_path}.exe"; then
36715      input_to_shortpath="${new_path}.exe"
36716    elif test -f "${new_path}.cmd"; then
36717      input_to_shortpath="${new_path}.cmd"
36718    else
36719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36720$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36723      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36724    fi
36725  else
36726    input_to_shortpath="$new_path"
36727  fi
36728
36729  # Call helper function which possibly converts this using DOS-style short mode.
36730  # If so, the updated path is stored in $new_path.
36731  new_path="$input_to_shortpath"
36732
36733  input_path="$input_to_shortpath"
36734  # Check if we need to convert this using DOS-style short mode. If the path
36735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36736  # take no chances and rewrite it.
36737  # Note: m4 eats our [], so we need to use [ and ] instead.
36738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36739  if test "x$has_forbidden_chars" != x; then
36740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36744      # Going to short mode and back again did indeed matter. Since short mode is
36745      # case insensitive, let's make it lowercase to improve readability.
36746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36747      # Now convert it back to Unix-stile (cygpath)
36748      input_path=`$CYGPATH -u "$shortmode_path"`
36749      new_path="$input_path"
36750    fi
36751  fi
36752
36753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36754  if test "x$test_cygdrive_prefix" = x; then
36755    # As a simple fix, exclude /usr/bin since it's not a real path.
36756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36758      # a path prefixed by /cygdrive for fixpath to work.
36759      new_path="$CYGWIN_ROOT_PATH$input_path"
36760    fi
36761  fi
36762
36763  # remove trailing .exe if any
36764  new_path="${new_path/%.exe/}"
36765
36766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36767
36768  # First separate the path from the arguments. This will split at the first
36769  # space.
36770  complete="$MCS"
36771  path="${complete%% *}"
36772  tmp="$complete EOL"
36773  arguments="${tmp#* }"
36774
36775  # Input might be given as Windows format, start by converting to
36776  # unix format.
36777  new_path="$path"
36778
36779  windows_path="$new_path"
36780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36781    unix_path=`$CYGPATH -u "$windows_path"`
36782    new_path="$unix_path"
36783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36785    new_path="$unix_path"
36786  fi
36787
36788
36789  # Now try to locate executable using which
36790  new_path=`$WHICH "$new_path" 2> /dev/null`
36791
36792  if test "x$new_path" = x; then
36793    # Oops. Which didn't find the executable.
36794    # The splitting of arguments from the executable at a space might have been incorrect,
36795    # since paths with space are more likely in Windows. Give it another try with the whole
36796    # argument.
36797    path="$complete"
36798    arguments="EOL"
36799    new_path="$path"
36800
36801  windows_path="$new_path"
36802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36803    unix_path=`$CYGPATH -u "$windows_path"`
36804    new_path="$unix_path"
36805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36807    new_path="$unix_path"
36808  fi
36809
36810
36811    new_path=`$WHICH "$new_path" 2> /dev/null`
36812    # bat and cmd files are not always considered executable in MSYS causing which
36813    # to not find them
36814    if test "x$new_path" = x \
36815        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36816        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36817      new_path="$path"
36818
36819  windows_path="$new_path"
36820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36821    unix_path=`$CYGPATH -u "$windows_path"`
36822    new_path="$unix_path"
36823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36825    new_path="$unix_path"
36826  fi
36827
36828    fi
36829
36830    if test "x$new_path" = x; then
36831      # It's still not found. Now this is an unrecoverable error.
36832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36833$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36834      has_space=`$ECHO "$complete" | $GREP " "`
36835      if test "x$has_space" != x; then
36836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36838      fi
36839      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36840    fi
36841  fi
36842
36843  # Now new_path has a complete unix path to the binary
36844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36845    # Keep paths in /bin as-is, but remove trailing .exe if any
36846    new_path="${new_path/%.exe/}"
36847    # Do not save /bin paths to all_fixpath_prefixes!
36848  else
36849    # Not in mixed or Windows style, start by that.
36850    new_path=`cmd //c echo $new_path`
36851
36852  input_path="$new_path"
36853  # Check if we need to convert this using DOS-style short mode. If the path
36854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36855  # take no chances and rewrite it.
36856  # Note: m4 eats our [], so we need to use [ and ] instead.
36857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36858  if test "x$has_forbidden_chars" != x; then
36859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36861  fi
36862
36863    # Output is in $new_path
36864
36865  windows_path="$new_path"
36866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36867    unix_path=`$CYGPATH -u "$windows_path"`
36868    new_path="$unix_path"
36869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36871    new_path="$unix_path"
36872  fi
36873
36874    # remove trailing .exe if any
36875    new_path="${new_path/%.exe/}"
36876
36877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36879  fi
36880
36881    else
36882      # We're on a unix platform. Hooray! :)
36883      # First separate the path from the arguments. This will split at the first
36884      # space.
36885      complete="$MCS"
36886      path="${complete%% *}"
36887      tmp="$complete EOL"
36888      arguments="${tmp#* }"
36889
36890      # Cannot rely on the command "which" here since it doesn't always work.
36891      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36892      if test -z "$is_absolute_path"; then
36893        # Path to executable is not absolute. Find it.
36894        IFS_save="$IFS"
36895        IFS=:
36896        for p in $PATH; do
36897          if test -f "$p/$path" && test -x "$p/$path"; then
36898            new_path="$p/$path"
36899            break
36900          fi
36901        done
36902        IFS="$IFS_save"
36903      else
36904        # This is an absolute path, we can use it without further modifications.
36905        new_path="$path"
36906      fi
36907
36908      if test "x$new_path" = x; then
36909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36910$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36911        has_space=`$ECHO "$complete" | $GREP " "`
36912        if test "x$has_space" != x; then
36913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36915        fi
36916        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36917      fi
36918    fi
36919
36920    # Now join together the path and the arguments once again
36921    if test "x$arguments" != xEOL; then
36922      new_complete="$new_path ${arguments% *}"
36923    else
36924      new_complete="$new_path"
36925    fi
36926
36927    if test "x$complete" != "x$new_complete"; then
36928      MCS="$new_complete"
36929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36930$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36931    fi
36932  fi
36933
36934  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36935    # FIXME: we should unify this with the solaris case above.
36936
36937
36938  # Publish this variable in the help.
36939
36940
36941  if test "x$STRIP" = x; then
36942    # The variable is not set by user, try to locate tool using the code snippet
36943    if test -n "$ac_tool_prefix"; then
36944  for ac_prog in strip
36945  do
36946    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36947set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36949$as_echo_n "checking for $ac_word... " >&6; }
36950if ${ac_cv_prog_STRIP+:} false; then :
36951  $as_echo_n "(cached) " >&6
36952else
36953  if test -n "$STRIP"; then
36954  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36955else
36956as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36957for as_dir in $PATH
36958do
36959  IFS=$as_save_IFS
36960  test -z "$as_dir" && as_dir=.
36961    for ac_exec_ext in '' $ac_executable_extensions; do
36962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36963    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36965    break 2
36966  fi
36967done
36968  done
36969IFS=$as_save_IFS
36970
36971fi
36972fi
36973STRIP=$ac_cv_prog_STRIP
36974if test -n "$STRIP"; then
36975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36976$as_echo "$STRIP" >&6; }
36977else
36978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36979$as_echo "no" >&6; }
36980fi
36981
36982
36983    test -n "$STRIP" && break
36984  done
36985fi
36986if test -z "$STRIP"; then
36987  ac_ct_STRIP=$STRIP
36988  for ac_prog in strip
36989do
36990  # Extract the first word of "$ac_prog", so it can be a program name with args.
36991set dummy $ac_prog; ac_word=$2
36992{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36993$as_echo_n "checking for $ac_word... " >&6; }
36994if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36995  $as_echo_n "(cached) " >&6
36996else
36997  if test -n "$ac_ct_STRIP"; then
36998  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36999else
37000as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37001for as_dir in $PATH
37002do
37003  IFS=$as_save_IFS
37004  test -z "$as_dir" && as_dir=.
37005    for ac_exec_ext in '' $ac_executable_extensions; do
37006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37007    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37009    break 2
37010  fi
37011done
37012  done
37013IFS=$as_save_IFS
37014
37015fi
37016fi
37017ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37018if test -n "$ac_ct_STRIP"; then
37019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37020$as_echo "$ac_ct_STRIP" >&6; }
37021else
37022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37023$as_echo "no" >&6; }
37024fi
37025
37026
37027  test -n "$ac_ct_STRIP" && break
37028done
37029
37030  if test "x$ac_ct_STRIP" = x; then
37031    STRIP=""
37032  else
37033    case $cross_compiling:$ac_tool_warned in
37034yes:)
37035{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37036$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37037ac_tool_warned=yes ;;
37038esac
37039    STRIP=$ac_ct_STRIP
37040  fi
37041fi
37042
37043  else
37044    # The variable is set, but is it from the command line or the environment?
37045
37046    # Try to remove the string !STRIP! from our list.
37047    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37048    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37049      # If it failed, the variable was not from the command line. Ignore it,
37050      # but warn the user (except for BASH, which is always set by the calling BASH).
37051      if test "xSTRIP" != xBASH; then
37052        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37053$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37054      fi
37055      # Try to locate tool using the code snippet
37056      if test -n "$ac_tool_prefix"; then
37057  for ac_prog in strip
37058  do
37059    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37060set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37062$as_echo_n "checking for $ac_word... " >&6; }
37063if ${ac_cv_prog_STRIP+:} false; then :
37064  $as_echo_n "(cached) " >&6
37065else
37066  if test -n "$STRIP"; then
37067  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37068else
37069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37070for as_dir in $PATH
37071do
37072  IFS=$as_save_IFS
37073  test -z "$as_dir" && as_dir=.
37074    for ac_exec_ext in '' $ac_executable_extensions; do
37075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37076    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37078    break 2
37079  fi
37080done
37081  done
37082IFS=$as_save_IFS
37083
37084fi
37085fi
37086STRIP=$ac_cv_prog_STRIP
37087if test -n "$STRIP"; then
37088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37089$as_echo "$STRIP" >&6; }
37090else
37091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37092$as_echo "no" >&6; }
37093fi
37094
37095
37096    test -n "$STRIP" && break
37097  done
37098fi
37099if test -z "$STRIP"; then
37100  ac_ct_STRIP=$STRIP
37101  for ac_prog in strip
37102do
37103  # Extract the first word of "$ac_prog", so it can be a program name with args.
37104set dummy $ac_prog; ac_word=$2
37105{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37106$as_echo_n "checking for $ac_word... " >&6; }
37107if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37108  $as_echo_n "(cached) " >&6
37109else
37110  if test -n "$ac_ct_STRIP"; then
37111  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37112else
37113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37114for as_dir in $PATH
37115do
37116  IFS=$as_save_IFS
37117  test -z "$as_dir" && as_dir=.
37118    for ac_exec_ext in '' $ac_executable_extensions; do
37119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37120    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37122    break 2
37123  fi
37124done
37125  done
37126IFS=$as_save_IFS
37127
37128fi
37129fi
37130ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37131if test -n "$ac_ct_STRIP"; then
37132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37133$as_echo "$ac_ct_STRIP" >&6; }
37134else
37135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37136$as_echo "no" >&6; }
37137fi
37138
37139
37140  test -n "$ac_ct_STRIP" && break
37141done
37142
37143  if test "x$ac_ct_STRIP" = x; then
37144    STRIP=""
37145  else
37146    case $cross_compiling:$ac_tool_warned in
37147yes:)
37148{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37149$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37150ac_tool_warned=yes ;;
37151esac
37152    STRIP=$ac_ct_STRIP
37153  fi
37154fi
37155
37156    else
37157      # If it succeeded, then it was overridden by the user. We will use it
37158      # for the tool.
37159
37160      # First remove it from the list of overridden variables, so we can test
37161      # for unknown variables in the end.
37162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37163
37164      # Check if the provided tool contains a complete path.
37165      tool_specified="$STRIP"
37166      tool_basename="${tool_specified##*/}"
37167      if test "x$tool_basename" = "x$tool_specified"; then
37168        # A command without a complete path is provided, search $PATH.
37169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37170$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37171        # Extract the first word of "$tool_basename", so it can be a program name with args.
37172set dummy $tool_basename; ac_word=$2
37173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37174$as_echo_n "checking for $ac_word... " >&6; }
37175if ${ac_cv_path_STRIP+:} false; then :
37176  $as_echo_n "(cached) " >&6
37177else
37178  case $STRIP in
37179  [\\/]* | ?:[\\/]*)
37180  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37181  ;;
37182  *)
37183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37184for as_dir in $PATH
37185do
37186  IFS=$as_save_IFS
37187  test -z "$as_dir" && as_dir=.
37188    for ac_exec_ext in '' $ac_executable_extensions; do
37189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37190    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37192    break 2
37193  fi
37194done
37195  done
37196IFS=$as_save_IFS
37197
37198  ;;
37199esac
37200fi
37201STRIP=$ac_cv_path_STRIP
37202if test -n "$STRIP"; then
37203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37204$as_echo "$STRIP" >&6; }
37205else
37206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37207$as_echo "no" >&6; }
37208fi
37209
37210
37211        if test "x$STRIP" = x; then
37212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37213        fi
37214      else
37215        # Otherwise we believe it is a complete path. Use it as it is.
37216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37217$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37219$as_echo_n "checking for STRIP... " >&6; }
37220        if test ! -x "$tool_specified"; then
37221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37222$as_echo "not found" >&6; }
37223          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37224        fi
37225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37226$as_echo "$tool_specified" >&6; }
37227      fi
37228    fi
37229  fi
37230
37231
37232
37233  # Only process if variable expands to non-empty
37234
37235  if test "x$STRIP" != x; then
37236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37237
37238  # First separate the path from the arguments. This will split at the first
37239  # space.
37240  complete="$STRIP"
37241  path="${complete%% *}"
37242  tmp="$complete EOL"
37243  arguments="${tmp#* }"
37244
37245  # Input might be given as Windows format, start by converting to
37246  # unix format.
37247  new_path=`$CYGPATH -u "$path"`
37248
37249  # Now try to locate executable using which
37250  new_path=`$WHICH "$new_path" 2> /dev/null`
37251  # bat and cmd files are not always considered executable in cygwin causing which
37252  # to not find them
37253  if test "x$new_path" = x \
37254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37256    new_path=`$CYGPATH -u "$path"`
37257  fi
37258  if test "x$new_path" = x; then
37259    # Oops. Which didn't find the executable.
37260    # The splitting of arguments from the executable at a space might have been incorrect,
37261    # since paths with space are more likely in Windows. Give it another try with the whole
37262    # argument.
37263    path="$complete"
37264    arguments="EOL"
37265    new_path=`$CYGPATH -u "$path"`
37266    new_path=`$WHICH "$new_path" 2> /dev/null`
37267    # bat and cmd files are not always considered executable in cygwin causing which
37268    # to not find them
37269    if test "x$new_path" = x \
37270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37272      new_path=`$CYGPATH -u "$path"`
37273    fi
37274    if test "x$new_path" = x; then
37275      # It's still not found. Now this is an unrecoverable error.
37276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37277$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37278      has_space=`$ECHO "$complete" | $GREP " "`
37279      if test "x$has_space" != x; then
37280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37282      fi
37283      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37284    fi
37285  fi
37286
37287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37290  # "foo.exe" is OK but "foo" is an error.
37291  #
37292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37293  # It is also a way to make sure we got the proper file name for the real test later on.
37294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37295  if test "x$test_shortpath" = x; then
37296    # Short path failed, file does not exist as specified.
37297    # Try adding .exe or .cmd
37298    if test -f "${new_path}.exe"; then
37299      input_to_shortpath="${new_path}.exe"
37300    elif test -f "${new_path}.cmd"; then
37301      input_to_shortpath="${new_path}.cmd"
37302    else
37303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37304$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37307      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37308    fi
37309  else
37310    input_to_shortpath="$new_path"
37311  fi
37312
37313  # Call helper function which possibly converts this using DOS-style short mode.
37314  # If so, the updated path is stored in $new_path.
37315  new_path="$input_to_shortpath"
37316
37317  input_path="$input_to_shortpath"
37318  # Check if we need to convert this using DOS-style short mode. If the path
37319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37320  # take no chances and rewrite it.
37321  # Note: m4 eats our [], so we need to use [ and ] instead.
37322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37323  if test "x$has_forbidden_chars" != x; then
37324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37328      # Going to short mode and back again did indeed matter. Since short mode is
37329      # case insensitive, let's make it lowercase to improve readability.
37330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37331      # Now convert it back to Unix-stile (cygpath)
37332      input_path=`$CYGPATH -u "$shortmode_path"`
37333      new_path="$input_path"
37334    fi
37335  fi
37336
37337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37338  if test "x$test_cygdrive_prefix" = x; then
37339    # As a simple fix, exclude /usr/bin since it's not a real path.
37340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37342      # a path prefixed by /cygdrive for fixpath to work.
37343      new_path="$CYGWIN_ROOT_PATH$input_path"
37344    fi
37345  fi
37346
37347  # remove trailing .exe if any
37348  new_path="${new_path/%.exe/}"
37349
37350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37351
37352  # First separate the path from the arguments. This will split at the first
37353  # space.
37354  complete="$STRIP"
37355  path="${complete%% *}"
37356  tmp="$complete EOL"
37357  arguments="${tmp#* }"
37358
37359  # Input might be given as Windows format, start by converting to
37360  # unix format.
37361  new_path="$path"
37362
37363  windows_path="$new_path"
37364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37365    unix_path=`$CYGPATH -u "$windows_path"`
37366    new_path="$unix_path"
37367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37369    new_path="$unix_path"
37370  fi
37371
37372
37373  # Now try to locate executable using which
37374  new_path=`$WHICH "$new_path" 2> /dev/null`
37375
37376  if test "x$new_path" = x; then
37377    # Oops. Which didn't find the executable.
37378    # The splitting of arguments from the executable at a space might have been incorrect,
37379    # since paths with space are more likely in Windows. Give it another try with the whole
37380    # argument.
37381    path="$complete"
37382    arguments="EOL"
37383    new_path="$path"
37384
37385  windows_path="$new_path"
37386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37387    unix_path=`$CYGPATH -u "$windows_path"`
37388    new_path="$unix_path"
37389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37391    new_path="$unix_path"
37392  fi
37393
37394
37395    new_path=`$WHICH "$new_path" 2> /dev/null`
37396    # bat and cmd files are not always considered executable in MSYS causing which
37397    # to not find them
37398    if test "x$new_path" = x \
37399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37401      new_path="$path"
37402
37403  windows_path="$new_path"
37404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37405    unix_path=`$CYGPATH -u "$windows_path"`
37406    new_path="$unix_path"
37407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37409    new_path="$unix_path"
37410  fi
37411
37412    fi
37413
37414    if test "x$new_path" = x; then
37415      # It's still not found. Now this is an unrecoverable error.
37416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37417$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37418      has_space=`$ECHO "$complete" | $GREP " "`
37419      if test "x$has_space" != x; then
37420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37422      fi
37423      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37424    fi
37425  fi
37426
37427  # Now new_path has a complete unix path to the binary
37428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37429    # Keep paths in /bin as-is, but remove trailing .exe if any
37430    new_path="${new_path/%.exe/}"
37431    # Do not save /bin paths to all_fixpath_prefixes!
37432  else
37433    # Not in mixed or Windows style, start by that.
37434    new_path=`cmd //c echo $new_path`
37435
37436  input_path="$new_path"
37437  # Check if we need to convert this using DOS-style short mode. If the path
37438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37439  # take no chances and rewrite it.
37440  # Note: m4 eats our [], so we need to use [ and ] instead.
37441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37442  if test "x$has_forbidden_chars" != x; then
37443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37445  fi
37446
37447    # Output is in $new_path
37448
37449  windows_path="$new_path"
37450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37451    unix_path=`$CYGPATH -u "$windows_path"`
37452    new_path="$unix_path"
37453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37455    new_path="$unix_path"
37456  fi
37457
37458    # remove trailing .exe if any
37459    new_path="${new_path/%.exe/}"
37460
37461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37463  fi
37464
37465    else
37466      # We're on a unix platform. Hooray! :)
37467      # First separate the path from the arguments. This will split at the first
37468      # space.
37469      complete="$STRIP"
37470      path="${complete%% *}"
37471      tmp="$complete EOL"
37472      arguments="${tmp#* }"
37473
37474      # Cannot rely on the command "which" here since it doesn't always work.
37475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37476      if test -z "$is_absolute_path"; then
37477        # Path to executable is not absolute. Find it.
37478        IFS_save="$IFS"
37479        IFS=:
37480        for p in $PATH; do
37481          if test -f "$p/$path" && test -x "$p/$path"; then
37482            new_path="$p/$path"
37483            break
37484          fi
37485        done
37486        IFS="$IFS_save"
37487      else
37488        # This is an absolute path, we can use it without further modifications.
37489        new_path="$path"
37490      fi
37491
37492      if test "x$new_path" = x; then
37493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37494$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37495        has_space=`$ECHO "$complete" | $GREP " "`
37496        if test "x$has_space" != x; then
37497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37499        fi
37500        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37501      fi
37502    fi
37503
37504    # Now join together the path and the arguments once again
37505    if test "x$arguments" != xEOL; then
37506      new_complete="$new_path ${arguments% *}"
37507    else
37508      new_complete="$new_path"
37509    fi
37510
37511    if test "x$complete" != "x$new_complete"; then
37512      STRIP="$new_complete"
37513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37514$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37515    fi
37516  fi
37517
37518
37519
37520  # Publish this variable in the help.
37521
37522
37523  if test "x$NM" = x; then
37524    # The variable is not set by user, try to locate tool using the code snippet
37525    if test -n "$ac_tool_prefix"; then
37526  for ac_prog in nm
37527  do
37528    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37529set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37531$as_echo_n "checking for $ac_word... " >&6; }
37532if ${ac_cv_prog_NM+:} false; then :
37533  $as_echo_n "(cached) " >&6
37534else
37535  if test -n "$NM"; then
37536  ac_cv_prog_NM="$NM" # Let the user override the test.
37537else
37538as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37539for as_dir in $PATH
37540do
37541  IFS=$as_save_IFS
37542  test -z "$as_dir" && as_dir=.
37543    for ac_exec_ext in '' $ac_executable_extensions; do
37544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37545    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37547    break 2
37548  fi
37549done
37550  done
37551IFS=$as_save_IFS
37552
37553fi
37554fi
37555NM=$ac_cv_prog_NM
37556if test -n "$NM"; then
37557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37558$as_echo "$NM" >&6; }
37559else
37560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561$as_echo "no" >&6; }
37562fi
37563
37564
37565    test -n "$NM" && break
37566  done
37567fi
37568if test -z "$NM"; then
37569  ac_ct_NM=$NM
37570  for ac_prog in nm
37571do
37572  # Extract the first word of "$ac_prog", so it can be a program name with args.
37573set dummy $ac_prog; ac_word=$2
37574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37575$as_echo_n "checking for $ac_word... " >&6; }
37576if ${ac_cv_prog_ac_ct_NM+:} false; then :
37577  $as_echo_n "(cached) " >&6
37578else
37579  if test -n "$ac_ct_NM"; then
37580  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37581else
37582as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37583for as_dir in $PATH
37584do
37585  IFS=$as_save_IFS
37586  test -z "$as_dir" && as_dir=.
37587    for ac_exec_ext in '' $ac_executable_extensions; do
37588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37589    ac_cv_prog_ac_ct_NM="$ac_prog"
37590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37591    break 2
37592  fi
37593done
37594  done
37595IFS=$as_save_IFS
37596
37597fi
37598fi
37599ac_ct_NM=$ac_cv_prog_ac_ct_NM
37600if test -n "$ac_ct_NM"; then
37601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37602$as_echo "$ac_ct_NM" >&6; }
37603else
37604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37605$as_echo "no" >&6; }
37606fi
37607
37608
37609  test -n "$ac_ct_NM" && break
37610done
37611
37612  if test "x$ac_ct_NM" = x; then
37613    NM=""
37614  else
37615    case $cross_compiling:$ac_tool_warned in
37616yes:)
37617{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37618$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37619ac_tool_warned=yes ;;
37620esac
37621    NM=$ac_ct_NM
37622  fi
37623fi
37624
37625  else
37626    # The variable is set, but is it from the command line or the environment?
37627
37628    # Try to remove the string !NM! from our list.
37629    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37630    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37631      # If it failed, the variable was not from the command line. Ignore it,
37632      # but warn the user (except for BASH, which is always set by the calling BASH).
37633      if test "xNM" != xBASH; then
37634        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37635$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37636      fi
37637      # Try to locate tool using the code snippet
37638      if test -n "$ac_tool_prefix"; then
37639  for ac_prog in nm
37640  do
37641    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37642set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37644$as_echo_n "checking for $ac_word... " >&6; }
37645if ${ac_cv_prog_NM+:} false; then :
37646  $as_echo_n "(cached) " >&6
37647else
37648  if test -n "$NM"; then
37649  ac_cv_prog_NM="$NM" # Let the user override the test.
37650else
37651as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37652for as_dir in $PATH
37653do
37654  IFS=$as_save_IFS
37655  test -z "$as_dir" && as_dir=.
37656    for ac_exec_ext in '' $ac_executable_extensions; do
37657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37658    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37660    break 2
37661  fi
37662done
37663  done
37664IFS=$as_save_IFS
37665
37666fi
37667fi
37668NM=$ac_cv_prog_NM
37669if test -n "$NM"; then
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37671$as_echo "$NM" >&6; }
37672else
37673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37674$as_echo "no" >&6; }
37675fi
37676
37677
37678    test -n "$NM" && break
37679  done
37680fi
37681if test -z "$NM"; then
37682  ac_ct_NM=$NM
37683  for ac_prog in nm
37684do
37685  # Extract the first word of "$ac_prog", so it can be a program name with args.
37686set dummy $ac_prog; ac_word=$2
37687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37688$as_echo_n "checking for $ac_word... " >&6; }
37689if ${ac_cv_prog_ac_ct_NM+:} false; then :
37690  $as_echo_n "(cached) " >&6
37691else
37692  if test -n "$ac_ct_NM"; then
37693  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37694else
37695as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37696for as_dir in $PATH
37697do
37698  IFS=$as_save_IFS
37699  test -z "$as_dir" && as_dir=.
37700    for ac_exec_ext in '' $ac_executable_extensions; do
37701  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37702    ac_cv_prog_ac_ct_NM="$ac_prog"
37703    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37704    break 2
37705  fi
37706done
37707  done
37708IFS=$as_save_IFS
37709
37710fi
37711fi
37712ac_ct_NM=$ac_cv_prog_ac_ct_NM
37713if test -n "$ac_ct_NM"; then
37714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37715$as_echo "$ac_ct_NM" >&6; }
37716else
37717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37718$as_echo "no" >&6; }
37719fi
37720
37721
37722  test -n "$ac_ct_NM" && break
37723done
37724
37725  if test "x$ac_ct_NM" = x; then
37726    NM=""
37727  else
37728    case $cross_compiling:$ac_tool_warned in
37729yes:)
37730{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37731$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37732ac_tool_warned=yes ;;
37733esac
37734    NM=$ac_ct_NM
37735  fi
37736fi
37737
37738    else
37739      # If it succeeded, then it was overridden by the user. We will use it
37740      # for the tool.
37741
37742      # First remove it from the list of overridden variables, so we can test
37743      # for unknown variables in the end.
37744      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37745
37746      # Check if the provided tool contains a complete path.
37747      tool_specified="$NM"
37748      tool_basename="${tool_specified##*/}"
37749      if test "x$tool_basename" = "x$tool_specified"; then
37750        # A command without a complete path is provided, search $PATH.
37751        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37752$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37753        # Extract the first word of "$tool_basename", so it can be a program name with args.
37754set dummy $tool_basename; ac_word=$2
37755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37756$as_echo_n "checking for $ac_word... " >&6; }
37757if ${ac_cv_path_NM+:} false; then :
37758  $as_echo_n "(cached) " >&6
37759else
37760  case $NM in
37761  [\\/]* | ?:[\\/]*)
37762  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37763  ;;
37764  *)
37765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37766for as_dir in $PATH
37767do
37768  IFS=$as_save_IFS
37769  test -z "$as_dir" && as_dir=.
37770    for ac_exec_ext in '' $ac_executable_extensions; do
37771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37772    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37774    break 2
37775  fi
37776done
37777  done
37778IFS=$as_save_IFS
37779
37780  ;;
37781esac
37782fi
37783NM=$ac_cv_path_NM
37784if test -n "$NM"; then
37785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37786$as_echo "$NM" >&6; }
37787else
37788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37789$as_echo "no" >&6; }
37790fi
37791
37792
37793        if test "x$NM" = x; then
37794          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37795        fi
37796      else
37797        # Otherwise we believe it is a complete path. Use it as it is.
37798        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37799$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37800        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37801$as_echo_n "checking for NM... " >&6; }
37802        if test ! -x "$tool_specified"; then
37803          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37804$as_echo "not found" >&6; }
37805          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37806        fi
37807        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37808$as_echo "$tool_specified" >&6; }
37809      fi
37810    fi
37811  fi
37812
37813
37814
37815  # Only process if variable expands to non-empty
37816
37817  if test "x$NM" != x; then
37818    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37819
37820  # First separate the path from the arguments. This will split at the first
37821  # space.
37822  complete="$NM"
37823  path="${complete%% *}"
37824  tmp="$complete EOL"
37825  arguments="${tmp#* }"
37826
37827  # Input might be given as Windows format, start by converting to
37828  # unix format.
37829  new_path=`$CYGPATH -u "$path"`
37830
37831  # Now try to locate executable using which
37832  new_path=`$WHICH "$new_path" 2> /dev/null`
37833  # bat and cmd files are not always considered executable in cygwin causing which
37834  # to not find them
37835  if test "x$new_path" = x \
37836      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37837      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37838    new_path=`$CYGPATH -u "$path"`
37839  fi
37840  if test "x$new_path" = x; then
37841    # Oops. Which didn't find the executable.
37842    # The splitting of arguments from the executable at a space might have been incorrect,
37843    # since paths with space are more likely in Windows. Give it another try with the whole
37844    # argument.
37845    path="$complete"
37846    arguments="EOL"
37847    new_path=`$CYGPATH -u "$path"`
37848    new_path=`$WHICH "$new_path" 2> /dev/null`
37849    # bat and cmd files are not always considered executable in cygwin causing which
37850    # to not find them
37851    if test "x$new_path" = x \
37852        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37853        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37854      new_path=`$CYGPATH -u "$path"`
37855    fi
37856    if test "x$new_path" = x; then
37857      # It's still not found. Now this is an unrecoverable error.
37858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37859$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37860      has_space=`$ECHO "$complete" | $GREP " "`
37861      if test "x$has_space" != x; then
37862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37864      fi
37865      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37866    fi
37867  fi
37868
37869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37872  # "foo.exe" is OK but "foo" is an error.
37873  #
37874  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37875  # It is also a way to make sure we got the proper file name for the real test later on.
37876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37877  if test "x$test_shortpath" = x; then
37878    # Short path failed, file does not exist as specified.
37879    # Try adding .exe or .cmd
37880    if test -f "${new_path}.exe"; then
37881      input_to_shortpath="${new_path}.exe"
37882    elif test -f "${new_path}.cmd"; then
37883      input_to_shortpath="${new_path}.cmd"
37884    else
37885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37886$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37887      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37888$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37889      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37890    fi
37891  else
37892    input_to_shortpath="$new_path"
37893  fi
37894
37895  # Call helper function which possibly converts this using DOS-style short mode.
37896  # If so, the updated path is stored in $new_path.
37897  new_path="$input_to_shortpath"
37898
37899  input_path="$input_to_shortpath"
37900  # Check if we need to convert this using DOS-style short mode. If the path
37901  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37902  # take no chances and rewrite it.
37903  # Note: m4 eats our [], so we need to use [ and ] instead.
37904  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37905  if test "x$has_forbidden_chars" != x; then
37906    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37907    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37908    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37909    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37910      # Going to short mode and back again did indeed matter. Since short mode is
37911      # case insensitive, let's make it lowercase to improve readability.
37912      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37913      # Now convert it back to Unix-stile (cygpath)
37914      input_path=`$CYGPATH -u "$shortmode_path"`
37915      new_path="$input_path"
37916    fi
37917  fi
37918
37919  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37920  if test "x$test_cygdrive_prefix" = x; then
37921    # As a simple fix, exclude /usr/bin since it's not a real path.
37922    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37923      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37924      # a path prefixed by /cygdrive for fixpath to work.
37925      new_path="$CYGWIN_ROOT_PATH$input_path"
37926    fi
37927  fi
37928
37929  # remove trailing .exe if any
37930  new_path="${new_path/%.exe/}"
37931
37932    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37933
37934  # First separate the path from the arguments. This will split at the first
37935  # space.
37936  complete="$NM"
37937  path="${complete%% *}"
37938  tmp="$complete EOL"
37939  arguments="${tmp#* }"
37940
37941  # Input might be given as Windows format, start by converting to
37942  # unix format.
37943  new_path="$path"
37944
37945  windows_path="$new_path"
37946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37947    unix_path=`$CYGPATH -u "$windows_path"`
37948    new_path="$unix_path"
37949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37950    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37951    new_path="$unix_path"
37952  fi
37953
37954
37955  # Now try to locate executable using which
37956  new_path=`$WHICH "$new_path" 2> /dev/null`
37957
37958  if test "x$new_path" = x; then
37959    # Oops. Which didn't find the executable.
37960    # The splitting of arguments from the executable at a space might have been incorrect,
37961    # since paths with space are more likely in Windows. Give it another try with the whole
37962    # argument.
37963    path="$complete"
37964    arguments="EOL"
37965    new_path="$path"
37966
37967  windows_path="$new_path"
37968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37969    unix_path=`$CYGPATH -u "$windows_path"`
37970    new_path="$unix_path"
37971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37973    new_path="$unix_path"
37974  fi
37975
37976
37977    new_path=`$WHICH "$new_path" 2> /dev/null`
37978    # bat and cmd files are not always considered executable in MSYS causing which
37979    # to not find them
37980    if test "x$new_path" = x \
37981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37983      new_path="$path"
37984
37985  windows_path="$new_path"
37986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37987    unix_path=`$CYGPATH -u "$windows_path"`
37988    new_path="$unix_path"
37989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37991    new_path="$unix_path"
37992  fi
37993
37994    fi
37995
37996    if test "x$new_path" = x; then
37997      # It's still not found. Now this is an unrecoverable error.
37998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37999$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38000      has_space=`$ECHO "$complete" | $GREP " "`
38001      if test "x$has_space" != x; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38004      fi
38005      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38006    fi
38007  fi
38008
38009  # Now new_path has a complete unix path to the binary
38010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38011    # Keep paths in /bin as-is, but remove trailing .exe if any
38012    new_path="${new_path/%.exe/}"
38013    # Do not save /bin paths to all_fixpath_prefixes!
38014  else
38015    # Not in mixed or Windows style, start by that.
38016    new_path=`cmd //c echo $new_path`
38017
38018  input_path="$new_path"
38019  # Check if we need to convert this using DOS-style short mode. If the path
38020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38021  # take no chances and rewrite it.
38022  # Note: m4 eats our [], so we need to use [ and ] instead.
38023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38024  if test "x$has_forbidden_chars" != x; then
38025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38027  fi
38028
38029    # Output is in $new_path
38030
38031  windows_path="$new_path"
38032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38033    unix_path=`$CYGPATH -u "$windows_path"`
38034    new_path="$unix_path"
38035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38037    new_path="$unix_path"
38038  fi
38039
38040    # remove trailing .exe if any
38041    new_path="${new_path/%.exe/}"
38042
38043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38045  fi
38046
38047    else
38048      # We're on a unix platform. Hooray! :)
38049      # First separate the path from the arguments. This will split at the first
38050      # space.
38051      complete="$NM"
38052      path="${complete%% *}"
38053      tmp="$complete EOL"
38054      arguments="${tmp#* }"
38055
38056      # Cannot rely on the command "which" here since it doesn't always work.
38057      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38058      if test -z "$is_absolute_path"; then
38059        # Path to executable is not absolute. Find it.
38060        IFS_save="$IFS"
38061        IFS=:
38062        for p in $PATH; do
38063          if test -f "$p/$path" && test -x "$p/$path"; then
38064            new_path="$p/$path"
38065            break
38066          fi
38067        done
38068        IFS="$IFS_save"
38069      else
38070        # This is an absolute path, we can use it without further modifications.
38071        new_path="$path"
38072      fi
38073
38074      if test "x$new_path" = x; then
38075        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38076$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38077        has_space=`$ECHO "$complete" | $GREP " "`
38078        if test "x$has_space" != x; then
38079          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38081        fi
38082        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38083      fi
38084    fi
38085
38086    # Now join together the path and the arguments once again
38087    if test "x$arguments" != xEOL; then
38088      new_complete="$new_path ${arguments% *}"
38089    else
38090      new_complete="$new_path"
38091    fi
38092
38093    if test "x$complete" != "x$new_complete"; then
38094      NM="$new_complete"
38095      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38096$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38097    fi
38098  fi
38099
38100    GNM="$NM"
38101
38102  fi
38103
38104  # objcopy is used for moving debug symbols to separate files when
38105  # full debug symbols are enabled.
38106  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38107
38108
38109  # Publish this variable in the help.
38110
38111
38112  if test "x$OBJCOPY" = x; then
38113    # The variable is not set by user, try to locate tool using the code snippet
38114    if test -n "$ac_tool_prefix"; then
38115  for ac_prog in gobjcopy objcopy
38116  do
38117    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38118set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38120$as_echo_n "checking for $ac_word... " >&6; }
38121if ${ac_cv_prog_OBJCOPY+:} false; then :
38122  $as_echo_n "(cached) " >&6
38123else
38124  if test -n "$OBJCOPY"; then
38125  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38126else
38127as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38128for as_dir in $PATH
38129do
38130  IFS=$as_save_IFS
38131  test -z "$as_dir" && as_dir=.
38132    for ac_exec_ext in '' $ac_executable_extensions; do
38133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38134    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38136    break 2
38137  fi
38138done
38139  done
38140IFS=$as_save_IFS
38141
38142fi
38143fi
38144OBJCOPY=$ac_cv_prog_OBJCOPY
38145if test -n "$OBJCOPY"; then
38146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38147$as_echo "$OBJCOPY" >&6; }
38148else
38149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38150$as_echo "no" >&6; }
38151fi
38152
38153
38154    test -n "$OBJCOPY" && break
38155  done
38156fi
38157if test -z "$OBJCOPY"; then
38158  ac_ct_OBJCOPY=$OBJCOPY
38159  for ac_prog in gobjcopy objcopy
38160do
38161  # Extract the first word of "$ac_prog", so it can be a program name with args.
38162set dummy $ac_prog; ac_word=$2
38163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38164$as_echo_n "checking for $ac_word... " >&6; }
38165if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38166  $as_echo_n "(cached) " >&6
38167else
38168  if test -n "$ac_ct_OBJCOPY"; then
38169  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38170else
38171as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38172for as_dir in $PATH
38173do
38174  IFS=$as_save_IFS
38175  test -z "$as_dir" && as_dir=.
38176    for ac_exec_ext in '' $ac_executable_extensions; do
38177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38178    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38180    break 2
38181  fi
38182done
38183  done
38184IFS=$as_save_IFS
38185
38186fi
38187fi
38188ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38189if test -n "$ac_ct_OBJCOPY"; then
38190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38191$as_echo "$ac_ct_OBJCOPY" >&6; }
38192else
38193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38194$as_echo "no" >&6; }
38195fi
38196
38197
38198  test -n "$ac_ct_OBJCOPY" && break
38199done
38200
38201  if test "x$ac_ct_OBJCOPY" = x; then
38202    OBJCOPY=""
38203  else
38204    case $cross_compiling:$ac_tool_warned in
38205yes:)
38206{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38207$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38208ac_tool_warned=yes ;;
38209esac
38210    OBJCOPY=$ac_ct_OBJCOPY
38211  fi
38212fi
38213
38214  else
38215    # The variable is set, but is it from the command line or the environment?
38216
38217    # Try to remove the string !OBJCOPY! from our list.
38218    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38219    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38220      # If it failed, the variable was not from the command line. Ignore it,
38221      # but warn the user (except for BASH, which is always set by the calling BASH).
38222      if test "xOBJCOPY" != xBASH; then
38223        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38224$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38225      fi
38226      # Try to locate tool using the code snippet
38227      if test -n "$ac_tool_prefix"; then
38228  for ac_prog in gobjcopy objcopy
38229  do
38230    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38231set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38233$as_echo_n "checking for $ac_word... " >&6; }
38234if ${ac_cv_prog_OBJCOPY+:} false; then :
38235  $as_echo_n "(cached) " >&6
38236else
38237  if test -n "$OBJCOPY"; then
38238  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38239else
38240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38241for as_dir in $PATH
38242do
38243  IFS=$as_save_IFS
38244  test -z "$as_dir" && as_dir=.
38245    for ac_exec_ext in '' $ac_executable_extensions; do
38246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38247    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38249    break 2
38250  fi
38251done
38252  done
38253IFS=$as_save_IFS
38254
38255fi
38256fi
38257OBJCOPY=$ac_cv_prog_OBJCOPY
38258if test -n "$OBJCOPY"; then
38259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38260$as_echo "$OBJCOPY" >&6; }
38261else
38262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38263$as_echo "no" >&6; }
38264fi
38265
38266
38267    test -n "$OBJCOPY" && break
38268  done
38269fi
38270if test -z "$OBJCOPY"; then
38271  ac_ct_OBJCOPY=$OBJCOPY
38272  for ac_prog in gobjcopy objcopy
38273do
38274  # Extract the first word of "$ac_prog", so it can be a program name with args.
38275set dummy $ac_prog; ac_word=$2
38276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38277$as_echo_n "checking for $ac_word... " >&6; }
38278if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38279  $as_echo_n "(cached) " >&6
38280else
38281  if test -n "$ac_ct_OBJCOPY"; then
38282  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38283else
38284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38285for as_dir in $PATH
38286do
38287  IFS=$as_save_IFS
38288  test -z "$as_dir" && as_dir=.
38289    for ac_exec_ext in '' $ac_executable_extensions; do
38290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38291    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38293    break 2
38294  fi
38295done
38296  done
38297IFS=$as_save_IFS
38298
38299fi
38300fi
38301ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38302if test -n "$ac_ct_OBJCOPY"; then
38303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38304$as_echo "$ac_ct_OBJCOPY" >&6; }
38305else
38306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38307$as_echo "no" >&6; }
38308fi
38309
38310
38311  test -n "$ac_ct_OBJCOPY" && break
38312done
38313
38314  if test "x$ac_ct_OBJCOPY" = x; then
38315    OBJCOPY=""
38316  else
38317    case $cross_compiling:$ac_tool_warned in
38318yes:)
38319{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38320$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38321ac_tool_warned=yes ;;
38322esac
38323    OBJCOPY=$ac_ct_OBJCOPY
38324  fi
38325fi
38326
38327    else
38328      # If it succeeded, then it was overridden by the user. We will use it
38329      # for the tool.
38330
38331      # First remove it from the list of overridden variables, so we can test
38332      # for unknown variables in the end.
38333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38334
38335      # Check if the provided tool contains a complete path.
38336      tool_specified="$OBJCOPY"
38337      tool_basename="${tool_specified##*/}"
38338      if test "x$tool_basename" = "x$tool_specified"; then
38339        # A command without a complete path is provided, search $PATH.
38340        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38341$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38342        # Extract the first word of "$tool_basename", so it can be a program name with args.
38343set dummy $tool_basename; ac_word=$2
38344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38345$as_echo_n "checking for $ac_word... " >&6; }
38346if ${ac_cv_path_OBJCOPY+:} false; then :
38347  $as_echo_n "(cached) " >&6
38348else
38349  case $OBJCOPY in
38350  [\\/]* | ?:[\\/]*)
38351  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38352  ;;
38353  *)
38354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38355for as_dir in $PATH
38356do
38357  IFS=$as_save_IFS
38358  test -z "$as_dir" && as_dir=.
38359    for ac_exec_ext in '' $ac_executable_extensions; do
38360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38361    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38363    break 2
38364  fi
38365done
38366  done
38367IFS=$as_save_IFS
38368
38369  ;;
38370esac
38371fi
38372OBJCOPY=$ac_cv_path_OBJCOPY
38373if test -n "$OBJCOPY"; then
38374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38375$as_echo "$OBJCOPY" >&6; }
38376else
38377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38378$as_echo "no" >&6; }
38379fi
38380
38381
38382        if test "x$OBJCOPY" = x; then
38383          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38384        fi
38385      else
38386        # Otherwise we believe it is a complete path. Use it as it is.
38387        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38388$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38389        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38390$as_echo_n "checking for OBJCOPY... " >&6; }
38391        if test ! -x "$tool_specified"; then
38392          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38393$as_echo "not found" >&6; }
38394          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38395        fi
38396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38397$as_echo "$tool_specified" >&6; }
38398      fi
38399    fi
38400  fi
38401
38402
38403    # Only call fixup if objcopy was found.
38404    if test -n "$OBJCOPY"; then
38405
38406  # Only process if variable expands to non-empty
38407
38408  if test "x$OBJCOPY" != x; then
38409    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38410
38411  # First separate the path from the arguments. This will split at the first
38412  # space.
38413  complete="$OBJCOPY"
38414  path="${complete%% *}"
38415  tmp="$complete EOL"
38416  arguments="${tmp#* }"
38417
38418  # Input might be given as Windows format, start by converting to
38419  # unix format.
38420  new_path=`$CYGPATH -u "$path"`
38421
38422  # Now try to locate executable using which
38423  new_path=`$WHICH "$new_path" 2> /dev/null`
38424  # bat and cmd files are not always considered executable in cygwin causing which
38425  # to not find them
38426  if test "x$new_path" = x \
38427      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38428      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38429    new_path=`$CYGPATH -u "$path"`
38430  fi
38431  if test "x$new_path" = x; then
38432    # Oops. Which didn't find the executable.
38433    # The splitting of arguments from the executable at a space might have been incorrect,
38434    # since paths with space are more likely in Windows. Give it another try with the whole
38435    # argument.
38436    path="$complete"
38437    arguments="EOL"
38438    new_path=`$CYGPATH -u "$path"`
38439    new_path=`$WHICH "$new_path" 2> /dev/null`
38440    # bat and cmd files are not always considered executable in cygwin causing which
38441    # to not find them
38442    if test "x$new_path" = x \
38443        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38444        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38445      new_path=`$CYGPATH -u "$path"`
38446    fi
38447    if test "x$new_path" = x; then
38448      # It's still not found. Now this is an unrecoverable error.
38449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38450$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38451      has_space=`$ECHO "$complete" | $GREP " "`
38452      if test "x$has_space" != x; then
38453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38455      fi
38456      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38457    fi
38458  fi
38459
38460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38463  # "foo.exe" is OK but "foo" is an error.
38464  #
38465  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38466  # It is also a way to make sure we got the proper file name for the real test later on.
38467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38468  if test "x$test_shortpath" = x; then
38469    # Short path failed, file does not exist as specified.
38470    # Try adding .exe or .cmd
38471    if test -f "${new_path}.exe"; then
38472      input_to_shortpath="${new_path}.exe"
38473    elif test -f "${new_path}.cmd"; then
38474      input_to_shortpath="${new_path}.cmd"
38475    else
38476      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38477$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38478      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38479$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38480      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38481    fi
38482  else
38483    input_to_shortpath="$new_path"
38484  fi
38485
38486  # Call helper function which possibly converts this using DOS-style short mode.
38487  # If so, the updated path is stored in $new_path.
38488  new_path="$input_to_shortpath"
38489
38490  input_path="$input_to_shortpath"
38491  # Check if we need to convert this using DOS-style short mode. If the path
38492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38493  # take no chances and rewrite it.
38494  # Note: m4 eats our [], so we need to use [ and ] instead.
38495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38496  if test "x$has_forbidden_chars" != x; then
38497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38501      # Going to short mode and back again did indeed matter. Since short mode is
38502      # case insensitive, let's make it lowercase to improve readability.
38503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38504      # Now convert it back to Unix-stile (cygpath)
38505      input_path=`$CYGPATH -u "$shortmode_path"`
38506      new_path="$input_path"
38507    fi
38508  fi
38509
38510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38511  if test "x$test_cygdrive_prefix" = x; then
38512    # As a simple fix, exclude /usr/bin since it's not a real path.
38513    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38515      # a path prefixed by /cygdrive for fixpath to work.
38516      new_path="$CYGWIN_ROOT_PATH$input_path"
38517    fi
38518  fi
38519
38520  # remove trailing .exe if any
38521  new_path="${new_path/%.exe/}"
38522
38523    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38524
38525  # First separate the path from the arguments. This will split at the first
38526  # space.
38527  complete="$OBJCOPY"
38528  path="${complete%% *}"
38529  tmp="$complete EOL"
38530  arguments="${tmp#* }"
38531
38532  # Input might be given as Windows format, start by converting to
38533  # unix format.
38534  new_path="$path"
38535
38536  windows_path="$new_path"
38537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38538    unix_path=`$CYGPATH -u "$windows_path"`
38539    new_path="$unix_path"
38540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38542    new_path="$unix_path"
38543  fi
38544
38545
38546  # Now try to locate executable using which
38547  new_path=`$WHICH "$new_path" 2> /dev/null`
38548
38549  if test "x$new_path" = x; then
38550    # Oops. Which didn't find the executable.
38551    # The splitting of arguments from the executable at a space might have been incorrect,
38552    # since paths with space are more likely in Windows. Give it another try with the whole
38553    # argument.
38554    path="$complete"
38555    arguments="EOL"
38556    new_path="$path"
38557
38558  windows_path="$new_path"
38559  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38560    unix_path=`$CYGPATH -u "$windows_path"`
38561    new_path="$unix_path"
38562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38563    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38564    new_path="$unix_path"
38565  fi
38566
38567
38568    new_path=`$WHICH "$new_path" 2> /dev/null`
38569    # bat and cmd files are not always considered executable in MSYS causing which
38570    # to not find them
38571    if test "x$new_path" = x \
38572        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38573        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38574      new_path="$path"
38575
38576  windows_path="$new_path"
38577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38578    unix_path=`$CYGPATH -u "$windows_path"`
38579    new_path="$unix_path"
38580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38582    new_path="$unix_path"
38583  fi
38584
38585    fi
38586
38587    if test "x$new_path" = x; then
38588      # It's still not found. Now this is an unrecoverable error.
38589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38590$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38591      has_space=`$ECHO "$complete" | $GREP " "`
38592      if test "x$has_space" != x; then
38593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38595      fi
38596      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38597    fi
38598  fi
38599
38600  # Now new_path has a complete unix path to the binary
38601  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38602    # Keep paths in /bin as-is, but remove trailing .exe if any
38603    new_path="${new_path/%.exe/}"
38604    # Do not save /bin paths to all_fixpath_prefixes!
38605  else
38606    # Not in mixed or Windows style, start by that.
38607    new_path=`cmd //c echo $new_path`
38608
38609  input_path="$new_path"
38610  # Check if we need to convert this using DOS-style short mode. If the path
38611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38612  # take no chances and rewrite it.
38613  # Note: m4 eats our [], so we need to use [ and ] instead.
38614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38615  if test "x$has_forbidden_chars" != x; then
38616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38618  fi
38619
38620    # Output is in $new_path
38621
38622  windows_path="$new_path"
38623  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38624    unix_path=`$CYGPATH -u "$windows_path"`
38625    new_path="$unix_path"
38626  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38627    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38628    new_path="$unix_path"
38629  fi
38630
38631    # remove trailing .exe if any
38632    new_path="${new_path/%.exe/}"
38633
38634    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38635    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38636  fi
38637
38638    else
38639      # We're on a unix platform. Hooray! :)
38640      # First separate the path from the arguments. This will split at the first
38641      # space.
38642      complete="$OBJCOPY"
38643      path="${complete%% *}"
38644      tmp="$complete EOL"
38645      arguments="${tmp#* }"
38646
38647      # Cannot rely on the command "which" here since it doesn't always work.
38648      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38649      if test -z "$is_absolute_path"; then
38650        # Path to executable is not absolute. Find it.
38651        IFS_save="$IFS"
38652        IFS=:
38653        for p in $PATH; do
38654          if test -f "$p/$path" && test -x "$p/$path"; then
38655            new_path="$p/$path"
38656            break
38657          fi
38658        done
38659        IFS="$IFS_save"
38660      else
38661        # This is an absolute path, we can use it without further modifications.
38662        new_path="$path"
38663      fi
38664
38665      if test "x$new_path" = x; then
38666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38667$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38668        has_space=`$ECHO "$complete" | $GREP " "`
38669        if test "x$has_space" != x; then
38670          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38671$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38672        fi
38673        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38674      fi
38675    fi
38676
38677    # Now join together the path and the arguments once again
38678    if test "x$arguments" != xEOL; then
38679      new_complete="$new_path ${arguments% *}"
38680    else
38681      new_complete="$new_path"
38682    fi
38683
38684    if test "x$complete" != "x$new_complete"; then
38685      OBJCOPY="$new_complete"
38686      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38687$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38688    fi
38689  fi
38690
38691    fi
38692  fi
38693
38694
38695
38696  # Publish this variable in the help.
38697
38698
38699  if test "x$OBJDUMP" = x; then
38700    # The variable is not set by user, try to locate tool using the code snippet
38701    if test -n "$ac_tool_prefix"; then
38702  for ac_prog in gobjdump objdump
38703  do
38704    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38705set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38707$as_echo_n "checking for $ac_word... " >&6; }
38708if ${ac_cv_prog_OBJDUMP+:} false; then :
38709  $as_echo_n "(cached) " >&6
38710else
38711  if test -n "$OBJDUMP"; then
38712  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38713else
38714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38715for as_dir in $PATH
38716do
38717  IFS=$as_save_IFS
38718  test -z "$as_dir" && as_dir=.
38719    for ac_exec_ext in '' $ac_executable_extensions; do
38720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38721    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38723    break 2
38724  fi
38725done
38726  done
38727IFS=$as_save_IFS
38728
38729fi
38730fi
38731OBJDUMP=$ac_cv_prog_OBJDUMP
38732if test -n "$OBJDUMP"; then
38733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38734$as_echo "$OBJDUMP" >&6; }
38735else
38736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38737$as_echo "no" >&6; }
38738fi
38739
38740
38741    test -n "$OBJDUMP" && break
38742  done
38743fi
38744if test -z "$OBJDUMP"; then
38745  ac_ct_OBJDUMP=$OBJDUMP
38746  for ac_prog in gobjdump objdump
38747do
38748  # Extract the first word of "$ac_prog", so it can be a program name with args.
38749set dummy $ac_prog; ac_word=$2
38750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38751$as_echo_n "checking for $ac_word... " >&6; }
38752if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38753  $as_echo_n "(cached) " >&6
38754else
38755  if test -n "$ac_ct_OBJDUMP"; then
38756  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38757else
38758as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38759for as_dir in $PATH
38760do
38761  IFS=$as_save_IFS
38762  test -z "$as_dir" && as_dir=.
38763    for ac_exec_ext in '' $ac_executable_extensions; do
38764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38765    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38767    break 2
38768  fi
38769done
38770  done
38771IFS=$as_save_IFS
38772
38773fi
38774fi
38775ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38776if test -n "$ac_ct_OBJDUMP"; then
38777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38778$as_echo "$ac_ct_OBJDUMP" >&6; }
38779else
38780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38781$as_echo "no" >&6; }
38782fi
38783
38784
38785  test -n "$ac_ct_OBJDUMP" && break
38786done
38787
38788  if test "x$ac_ct_OBJDUMP" = x; then
38789    OBJDUMP=""
38790  else
38791    case $cross_compiling:$ac_tool_warned in
38792yes:)
38793{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38794$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38795ac_tool_warned=yes ;;
38796esac
38797    OBJDUMP=$ac_ct_OBJDUMP
38798  fi
38799fi
38800
38801  else
38802    # The variable is set, but is it from the command line or the environment?
38803
38804    # Try to remove the string !OBJDUMP! from our list.
38805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38807      # If it failed, the variable was not from the command line. Ignore it,
38808      # but warn the user (except for BASH, which is always set by the calling BASH).
38809      if test "xOBJDUMP" != xBASH; then
38810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38811$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38812      fi
38813      # Try to locate tool using the code snippet
38814      if test -n "$ac_tool_prefix"; then
38815  for ac_prog in gobjdump objdump
38816  do
38817    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38818set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38820$as_echo_n "checking for $ac_word... " >&6; }
38821if ${ac_cv_prog_OBJDUMP+:} false; then :
38822  $as_echo_n "(cached) " >&6
38823else
38824  if test -n "$OBJDUMP"; then
38825  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38826else
38827as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38828for as_dir in $PATH
38829do
38830  IFS=$as_save_IFS
38831  test -z "$as_dir" && as_dir=.
38832    for ac_exec_ext in '' $ac_executable_extensions; do
38833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38834    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38836    break 2
38837  fi
38838done
38839  done
38840IFS=$as_save_IFS
38841
38842fi
38843fi
38844OBJDUMP=$ac_cv_prog_OBJDUMP
38845if test -n "$OBJDUMP"; then
38846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38847$as_echo "$OBJDUMP" >&6; }
38848else
38849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38850$as_echo "no" >&6; }
38851fi
38852
38853
38854    test -n "$OBJDUMP" && break
38855  done
38856fi
38857if test -z "$OBJDUMP"; then
38858  ac_ct_OBJDUMP=$OBJDUMP
38859  for ac_prog in gobjdump objdump
38860do
38861  # Extract the first word of "$ac_prog", so it can be a program name with args.
38862set dummy $ac_prog; ac_word=$2
38863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38864$as_echo_n "checking for $ac_word... " >&6; }
38865if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38866  $as_echo_n "(cached) " >&6
38867else
38868  if test -n "$ac_ct_OBJDUMP"; then
38869  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38870else
38871as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38872for as_dir in $PATH
38873do
38874  IFS=$as_save_IFS
38875  test -z "$as_dir" && as_dir=.
38876    for ac_exec_ext in '' $ac_executable_extensions; do
38877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38878    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38880    break 2
38881  fi
38882done
38883  done
38884IFS=$as_save_IFS
38885
38886fi
38887fi
38888ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38889if test -n "$ac_ct_OBJDUMP"; then
38890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38891$as_echo "$ac_ct_OBJDUMP" >&6; }
38892else
38893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38894$as_echo "no" >&6; }
38895fi
38896
38897
38898  test -n "$ac_ct_OBJDUMP" && break
38899done
38900
38901  if test "x$ac_ct_OBJDUMP" = x; then
38902    OBJDUMP=""
38903  else
38904    case $cross_compiling:$ac_tool_warned in
38905yes:)
38906{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38907$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38908ac_tool_warned=yes ;;
38909esac
38910    OBJDUMP=$ac_ct_OBJDUMP
38911  fi
38912fi
38913
38914    else
38915      # If it succeeded, then it was overridden by the user. We will use it
38916      # for the tool.
38917
38918      # First remove it from the list of overridden variables, so we can test
38919      # for unknown variables in the end.
38920      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38921
38922      # Check if the provided tool contains a complete path.
38923      tool_specified="$OBJDUMP"
38924      tool_basename="${tool_specified##*/}"
38925      if test "x$tool_basename" = "x$tool_specified"; then
38926        # A command without a complete path is provided, search $PATH.
38927        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38928$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38929        # Extract the first word of "$tool_basename", so it can be a program name with args.
38930set dummy $tool_basename; ac_word=$2
38931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38932$as_echo_n "checking for $ac_word... " >&6; }
38933if ${ac_cv_path_OBJDUMP+:} false; then :
38934  $as_echo_n "(cached) " >&6
38935else
38936  case $OBJDUMP in
38937  [\\/]* | ?:[\\/]*)
38938  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38939  ;;
38940  *)
38941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38942for as_dir in $PATH
38943do
38944  IFS=$as_save_IFS
38945  test -z "$as_dir" && as_dir=.
38946    for ac_exec_ext in '' $ac_executable_extensions; do
38947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38948    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38950    break 2
38951  fi
38952done
38953  done
38954IFS=$as_save_IFS
38955
38956  ;;
38957esac
38958fi
38959OBJDUMP=$ac_cv_path_OBJDUMP
38960if test -n "$OBJDUMP"; then
38961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38962$as_echo "$OBJDUMP" >&6; }
38963else
38964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38965$as_echo "no" >&6; }
38966fi
38967
38968
38969        if test "x$OBJDUMP" = x; then
38970          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38971        fi
38972      else
38973        # Otherwise we believe it is a complete path. Use it as it is.
38974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38975$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38976        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38977$as_echo_n "checking for OBJDUMP... " >&6; }
38978        if test ! -x "$tool_specified"; then
38979          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38980$as_echo "not found" >&6; }
38981          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38982        fi
38983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38984$as_echo "$tool_specified" >&6; }
38985      fi
38986    fi
38987  fi
38988
38989
38990  if test "x$OBJDUMP" != x; then
38991    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38992    # bails if argument is missing.
38993
38994  # Only process if variable expands to non-empty
38995
38996  if test "x$OBJDUMP" != x; then
38997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38998
38999  # First separate the path from the arguments. This will split at the first
39000  # space.
39001  complete="$OBJDUMP"
39002  path="${complete%% *}"
39003  tmp="$complete EOL"
39004  arguments="${tmp#* }"
39005
39006  # Input might be given as Windows format, start by converting to
39007  # unix format.
39008  new_path=`$CYGPATH -u "$path"`
39009
39010  # Now try to locate executable using which
39011  new_path=`$WHICH "$new_path" 2> /dev/null`
39012  # bat and cmd files are not always considered executable in cygwin causing which
39013  # to not find them
39014  if test "x$new_path" = x \
39015      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39016      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39017    new_path=`$CYGPATH -u "$path"`
39018  fi
39019  if test "x$new_path" = x; then
39020    # Oops. Which didn't find the executable.
39021    # The splitting of arguments from the executable at a space might have been incorrect,
39022    # since paths with space are more likely in Windows. Give it another try with the whole
39023    # argument.
39024    path="$complete"
39025    arguments="EOL"
39026    new_path=`$CYGPATH -u "$path"`
39027    new_path=`$WHICH "$new_path" 2> /dev/null`
39028    # bat and cmd files are not always considered executable in cygwin causing which
39029    # to not find them
39030    if test "x$new_path" = x \
39031        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39032        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39033      new_path=`$CYGPATH -u "$path"`
39034    fi
39035    if test "x$new_path" = x; then
39036      # It's still not found. Now this is an unrecoverable error.
39037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39038$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39039      has_space=`$ECHO "$complete" | $GREP " "`
39040      if test "x$has_space" != x; then
39041        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39042$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39043      fi
39044      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39045    fi
39046  fi
39047
39048  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39049  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39050  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39051  # "foo.exe" is OK but "foo" is an error.
39052  #
39053  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39054  # It is also a way to make sure we got the proper file name for the real test later on.
39055  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39056  if test "x$test_shortpath" = x; then
39057    # Short path failed, file does not exist as specified.
39058    # Try adding .exe or .cmd
39059    if test -f "${new_path}.exe"; then
39060      input_to_shortpath="${new_path}.exe"
39061    elif test -f "${new_path}.cmd"; then
39062      input_to_shortpath="${new_path}.cmd"
39063    else
39064      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39065$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39066      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39067$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39068      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39069    fi
39070  else
39071    input_to_shortpath="$new_path"
39072  fi
39073
39074  # Call helper function which possibly converts this using DOS-style short mode.
39075  # If so, the updated path is stored in $new_path.
39076  new_path="$input_to_shortpath"
39077
39078  input_path="$input_to_shortpath"
39079  # Check if we need to convert this using DOS-style short mode. If the path
39080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39081  # take no chances and rewrite it.
39082  # Note: m4 eats our [], so we need to use [ and ] instead.
39083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39084  if test "x$has_forbidden_chars" != x; then
39085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39089      # Going to short mode and back again did indeed matter. Since short mode is
39090      # case insensitive, let's make it lowercase to improve readability.
39091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39092      # Now convert it back to Unix-stile (cygpath)
39093      input_path=`$CYGPATH -u "$shortmode_path"`
39094      new_path="$input_path"
39095    fi
39096  fi
39097
39098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39099  if test "x$test_cygdrive_prefix" = x; then
39100    # As a simple fix, exclude /usr/bin since it's not a real path.
39101    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39103      # a path prefixed by /cygdrive for fixpath to work.
39104      new_path="$CYGWIN_ROOT_PATH$input_path"
39105    fi
39106  fi
39107
39108  # remove trailing .exe if any
39109  new_path="${new_path/%.exe/}"
39110
39111    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39112
39113  # First separate the path from the arguments. This will split at the first
39114  # space.
39115  complete="$OBJDUMP"
39116  path="${complete%% *}"
39117  tmp="$complete EOL"
39118  arguments="${tmp#* }"
39119
39120  # Input might be given as Windows format, start by converting to
39121  # unix format.
39122  new_path="$path"
39123
39124  windows_path="$new_path"
39125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39126    unix_path=`$CYGPATH -u "$windows_path"`
39127    new_path="$unix_path"
39128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39130    new_path="$unix_path"
39131  fi
39132
39133
39134  # Now try to locate executable using which
39135  new_path=`$WHICH "$new_path" 2> /dev/null`
39136
39137  if test "x$new_path" = x; then
39138    # Oops. Which didn't find the executable.
39139    # The splitting of arguments from the executable at a space might have been incorrect,
39140    # since paths with space are more likely in Windows. Give it another try with the whole
39141    # argument.
39142    path="$complete"
39143    arguments="EOL"
39144    new_path="$path"
39145
39146  windows_path="$new_path"
39147  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39148    unix_path=`$CYGPATH -u "$windows_path"`
39149    new_path="$unix_path"
39150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39151    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39152    new_path="$unix_path"
39153  fi
39154
39155
39156    new_path=`$WHICH "$new_path" 2> /dev/null`
39157    # bat and cmd files are not always considered executable in MSYS causing which
39158    # to not find them
39159    if test "x$new_path" = x \
39160        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39161        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39162      new_path="$path"
39163
39164  windows_path="$new_path"
39165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39166    unix_path=`$CYGPATH -u "$windows_path"`
39167    new_path="$unix_path"
39168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39169    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39170    new_path="$unix_path"
39171  fi
39172
39173    fi
39174
39175    if test "x$new_path" = x; then
39176      # It's still not found. Now this is an unrecoverable error.
39177      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39178$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39179      has_space=`$ECHO "$complete" | $GREP " "`
39180      if test "x$has_space" != x; then
39181        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39182$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39183      fi
39184      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39185    fi
39186  fi
39187
39188  # Now new_path has a complete unix path to the binary
39189  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39190    # Keep paths in /bin as-is, but remove trailing .exe if any
39191    new_path="${new_path/%.exe/}"
39192    # Do not save /bin paths to all_fixpath_prefixes!
39193  else
39194    # Not in mixed or Windows style, start by that.
39195    new_path=`cmd //c echo $new_path`
39196
39197  input_path="$new_path"
39198  # Check if we need to convert this using DOS-style short mode. If the path
39199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39200  # take no chances and rewrite it.
39201  # Note: m4 eats our [], so we need to use [ and ] instead.
39202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39203  if test "x$has_forbidden_chars" != x; then
39204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39205    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39206  fi
39207
39208    # Output is in $new_path
39209
39210  windows_path="$new_path"
39211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39212    unix_path=`$CYGPATH -u "$windows_path"`
39213    new_path="$unix_path"
39214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39216    new_path="$unix_path"
39217  fi
39218
39219    # remove trailing .exe if any
39220    new_path="${new_path/%.exe/}"
39221
39222    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39223    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39224  fi
39225
39226    else
39227      # We're on a unix platform. Hooray! :)
39228      # First separate the path from the arguments. This will split at the first
39229      # space.
39230      complete="$OBJDUMP"
39231      path="${complete%% *}"
39232      tmp="$complete EOL"
39233      arguments="${tmp#* }"
39234
39235      # Cannot rely on the command "which" here since it doesn't always work.
39236      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39237      if test -z "$is_absolute_path"; then
39238        # Path to executable is not absolute. Find it.
39239        IFS_save="$IFS"
39240        IFS=:
39241        for p in $PATH; do
39242          if test -f "$p/$path" && test -x "$p/$path"; then
39243            new_path="$p/$path"
39244            break
39245          fi
39246        done
39247        IFS="$IFS_save"
39248      else
39249        # This is an absolute path, we can use it without further modifications.
39250        new_path="$path"
39251      fi
39252
39253      if test "x$new_path" = x; then
39254        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39255$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39256        has_space=`$ECHO "$complete" | $GREP " "`
39257        if test "x$has_space" != x; then
39258          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39259$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39260        fi
39261        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39262      fi
39263    fi
39264
39265    # Now join together the path and the arguments once again
39266    if test "x$arguments" != xEOL; then
39267      new_complete="$new_path ${arguments% *}"
39268    else
39269      new_complete="$new_path"
39270    fi
39271
39272    if test "x$complete" != "x$new_complete"; then
39273      OBJDUMP="$new_complete"
39274      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39275$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39276    fi
39277  fi
39278
39279  fi
39280
39281
39282  # Restore old path.
39283  PATH="$OLD_PATH"
39284
39285  # Restore the flags to the user specified values.
39286  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39287  CFLAGS="$ORG_CFLAGS"
39288  CXXFLAGS="$ORG_CXXFLAGS"
39289
39290
39291# Finally do some processing after the detection phase
39292
39293  if test "x$COMPILE_TYPE" = "xcross"; then
39294    # Now we need to find a C/C++ compiler that can build executables for the
39295    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39296    # used once. Also, we need to do this without adding a tools dir to the
39297    # path, otherwise we might pick up cross-compilers which don't use standard
39298    # naming.
39299
39300    # FIXME: we should list the discovered compilers as an exclude pattern!
39301    # If we do that, we can do this detection before POST_DETECTION, and still
39302    # find the build compilers in the tools dir, if needed.
39303
39304
39305  # Publish this variable in the help.
39306
39307
39308  if test "x$BUILD_CC" = x; then
39309    # The variable is not set by user, try to locate tool using the code snippet
39310    for ac_prog in cl cc gcc
39311do
39312  # Extract the first word of "$ac_prog", so it can be a program name with args.
39313set dummy $ac_prog; ac_word=$2
39314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39315$as_echo_n "checking for $ac_word... " >&6; }
39316if ${ac_cv_path_BUILD_CC+:} false; then :
39317  $as_echo_n "(cached) " >&6
39318else
39319  case $BUILD_CC in
39320  [\\/]* | ?:[\\/]*)
39321  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39322  ;;
39323  *)
39324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39325for as_dir in $PATH
39326do
39327  IFS=$as_save_IFS
39328  test -z "$as_dir" && as_dir=.
39329    for ac_exec_ext in '' $ac_executable_extensions; do
39330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39331    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39333    break 2
39334  fi
39335done
39336  done
39337IFS=$as_save_IFS
39338
39339  ;;
39340esac
39341fi
39342BUILD_CC=$ac_cv_path_BUILD_CC
39343if test -n "$BUILD_CC"; then
39344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39345$as_echo "$BUILD_CC" >&6; }
39346else
39347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39348$as_echo "no" >&6; }
39349fi
39350
39351
39352  test -n "$BUILD_CC" && break
39353done
39354
39355  else
39356    # The variable is set, but is it from the command line or the environment?
39357
39358    # Try to remove the string !BUILD_CC! from our list.
39359    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39360    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39361      # If it failed, the variable was not from the command line. Ignore it,
39362      # but warn the user (except for BASH, which is always set by the calling BASH).
39363      if test "xBUILD_CC" != xBASH; then
39364        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39365$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39366      fi
39367      # Try to locate tool using the code snippet
39368      for ac_prog in cl cc gcc
39369do
39370  # Extract the first word of "$ac_prog", so it can be a program name with args.
39371set dummy $ac_prog; ac_word=$2
39372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39373$as_echo_n "checking for $ac_word... " >&6; }
39374if ${ac_cv_path_BUILD_CC+:} false; then :
39375  $as_echo_n "(cached) " >&6
39376else
39377  case $BUILD_CC in
39378  [\\/]* | ?:[\\/]*)
39379  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39380  ;;
39381  *)
39382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39383for as_dir in $PATH
39384do
39385  IFS=$as_save_IFS
39386  test -z "$as_dir" && as_dir=.
39387    for ac_exec_ext in '' $ac_executable_extensions; do
39388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39389    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39391    break 2
39392  fi
39393done
39394  done
39395IFS=$as_save_IFS
39396
39397  ;;
39398esac
39399fi
39400BUILD_CC=$ac_cv_path_BUILD_CC
39401if test -n "$BUILD_CC"; then
39402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39403$as_echo "$BUILD_CC" >&6; }
39404else
39405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39406$as_echo "no" >&6; }
39407fi
39408
39409
39410  test -n "$BUILD_CC" && break
39411done
39412
39413    else
39414      # If it succeeded, then it was overridden by the user. We will use it
39415      # for the tool.
39416
39417      # First remove it from the list of overridden variables, so we can test
39418      # for unknown variables in the end.
39419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39420
39421      # Check if the provided tool contains a complete path.
39422      tool_specified="$BUILD_CC"
39423      tool_basename="${tool_specified##*/}"
39424      if test "x$tool_basename" = "x$tool_specified"; then
39425        # A command without a complete path is provided, search $PATH.
39426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39427$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39428        # Extract the first word of "$tool_basename", so it can be a program name with args.
39429set dummy $tool_basename; ac_word=$2
39430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39431$as_echo_n "checking for $ac_word... " >&6; }
39432if ${ac_cv_path_BUILD_CC+:} false; then :
39433  $as_echo_n "(cached) " >&6
39434else
39435  case $BUILD_CC in
39436  [\\/]* | ?:[\\/]*)
39437  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39438  ;;
39439  *)
39440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39441for as_dir in $PATH
39442do
39443  IFS=$as_save_IFS
39444  test -z "$as_dir" && as_dir=.
39445    for ac_exec_ext in '' $ac_executable_extensions; do
39446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39447    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39449    break 2
39450  fi
39451done
39452  done
39453IFS=$as_save_IFS
39454
39455  ;;
39456esac
39457fi
39458BUILD_CC=$ac_cv_path_BUILD_CC
39459if test -n "$BUILD_CC"; then
39460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39461$as_echo "$BUILD_CC" >&6; }
39462else
39463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39464$as_echo "no" >&6; }
39465fi
39466
39467
39468        if test "x$BUILD_CC" = x; then
39469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39470        fi
39471      else
39472        # Otherwise we believe it is a complete path. Use it as it is.
39473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39474$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39476$as_echo_n "checking for BUILD_CC... " >&6; }
39477        if test ! -x "$tool_specified"; then
39478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39479$as_echo "not found" >&6; }
39480          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39481        fi
39482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39483$as_echo "$tool_specified" >&6; }
39484      fi
39485    fi
39486  fi
39487
39488
39489
39490  # Only process if variable expands to non-empty
39491
39492  if test "x$BUILD_CC" != x; then
39493    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39494
39495  # First separate the path from the arguments. This will split at the first
39496  # space.
39497  complete="$BUILD_CC"
39498  path="${complete%% *}"
39499  tmp="$complete EOL"
39500  arguments="${tmp#* }"
39501
39502  # Input might be given as Windows format, start by converting to
39503  # unix format.
39504  new_path=`$CYGPATH -u "$path"`
39505
39506  # Now try to locate executable using which
39507  new_path=`$WHICH "$new_path" 2> /dev/null`
39508  # bat and cmd files are not always considered executable in cygwin causing which
39509  # to not find them
39510  if test "x$new_path" = x \
39511      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39512      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39513    new_path=`$CYGPATH -u "$path"`
39514  fi
39515  if test "x$new_path" = x; then
39516    # Oops. Which didn't find the executable.
39517    # The splitting of arguments from the executable at a space might have been incorrect,
39518    # since paths with space are more likely in Windows. Give it another try with the whole
39519    # argument.
39520    path="$complete"
39521    arguments="EOL"
39522    new_path=`$CYGPATH -u "$path"`
39523    new_path=`$WHICH "$new_path" 2> /dev/null`
39524    # bat and cmd files are not always considered executable in cygwin causing which
39525    # to not find them
39526    if test "x$new_path" = x \
39527        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39528        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39529      new_path=`$CYGPATH -u "$path"`
39530    fi
39531    if test "x$new_path" = x; then
39532      # It's still not found. Now this is an unrecoverable error.
39533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39534$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39535      has_space=`$ECHO "$complete" | $GREP " "`
39536      if test "x$has_space" != x; then
39537        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39538$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39539      fi
39540      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39541    fi
39542  fi
39543
39544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39547  # "foo.exe" is OK but "foo" is an error.
39548  #
39549  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39550  # It is also a way to make sure we got the proper file name for the real test later on.
39551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39552  if test "x$test_shortpath" = x; then
39553    # Short path failed, file does not exist as specified.
39554    # Try adding .exe or .cmd
39555    if test -f "${new_path}.exe"; then
39556      input_to_shortpath="${new_path}.exe"
39557    elif test -f "${new_path}.cmd"; then
39558      input_to_shortpath="${new_path}.cmd"
39559    else
39560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39561$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39562      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39563$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39564      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39565    fi
39566  else
39567    input_to_shortpath="$new_path"
39568  fi
39569
39570  # Call helper function which possibly converts this using DOS-style short mode.
39571  # If so, the updated path is stored in $new_path.
39572  new_path="$input_to_shortpath"
39573
39574  input_path="$input_to_shortpath"
39575  # Check if we need to convert this using DOS-style short mode. If the path
39576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39577  # take no chances and rewrite it.
39578  # Note: m4 eats our [], so we need to use [ and ] instead.
39579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39580  if test "x$has_forbidden_chars" != x; then
39581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39582    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39583    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39584    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39585      # Going to short mode and back again did indeed matter. Since short mode is
39586      # case insensitive, let's make it lowercase to improve readability.
39587      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39588      # Now convert it back to Unix-stile (cygpath)
39589      input_path=`$CYGPATH -u "$shortmode_path"`
39590      new_path="$input_path"
39591    fi
39592  fi
39593
39594  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39595  if test "x$test_cygdrive_prefix" = x; then
39596    # As a simple fix, exclude /usr/bin since it's not a real path.
39597    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39598      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39599      # a path prefixed by /cygdrive for fixpath to work.
39600      new_path="$CYGWIN_ROOT_PATH$input_path"
39601    fi
39602  fi
39603
39604  # remove trailing .exe if any
39605  new_path="${new_path/%.exe/}"
39606
39607    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39608
39609  # First separate the path from the arguments. This will split at the first
39610  # space.
39611  complete="$BUILD_CC"
39612  path="${complete%% *}"
39613  tmp="$complete EOL"
39614  arguments="${tmp#* }"
39615
39616  # Input might be given as Windows format, start by converting to
39617  # unix format.
39618  new_path="$path"
39619
39620  windows_path="$new_path"
39621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39622    unix_path=`$CYGPATH -u "$windows_path"`
39623    new_path="$unix_path"
39624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39626    new_path="$unix_path"
39627  fi
39628
39629
39630  # Now try to locate executable using which
39631  new_path=`$WHICH "$new_path" 2> /dev/null`
39632
39633  if test "x$new_path" = x; then
39634    # Oops. Which didn't find the executable.
39635    # The splitting of arguments from the executable at a space might have been incorrect,
39636    # since paths with space are more likely in Windows. Give it another try with the whole
39637    # argument.
39638    path="$complete"
39639    arguments="EOL"
39640    new_path="$path"
39641
39642  windows_path="$new_path"
39643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39644    unix_path=`$CYGPATH -u "$windows_path"`
39645    new_path="$unix_path"
39646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39648    new_path="$unix_path"
39649  fi
39650
39651
39652    new_path=`$WHICH "$new_path" 2> /dev/null`
39653    # bat and cmd files are not always considered executable in MSYS causing which
39654    # to not find them
39655    if test "x$new_path" = x \
39656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39658      new_path="$path"
39659
39660  windows_path="$new_path"
39661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39662    unix_path=`$CYGPATH -u "$windows_path"`
39663    new_path="$unix_path"
39664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39666    new_path="$unix_path"
39667  fi
39668
39669    fi
39670
39671    if test "x$new_path" = x; then
39672      # It's still not found. Now this is an unrecoverable error.
39673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39674$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39675      has_space=`$ECHO "$complete" | $GREP " "`
39676      if test "x$has_space" != x; then
39677        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39678$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39679      fi
39680      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39681    fi
39682  fi
39683
39684  # Now new_path has a complete unix path to the binary
39685  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39686    # Keep paths in /bin as-is, but remove trailing .exe if any
39687    new_path="${new_path/%.exe/}"
39688    # Do not save /bin paths to all_fixpath_prefixes!
39689  else
39690    # Not in mixed or Windows style, start by that.
39691    new_path=`cmd //c echo $new_path`
39692
39693  input_path="$new_path"
39694  # Check if we need to convert this using DOS-style short mode. If the path
39695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39696  # take no chances and rewrite it.
39697  # Note: m4 eats our [], so we need to use [ and ] instead.
39698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39699  if test "x$has_forbidden_chars" != x; then
39700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39702  fi
39703
39704    # Output is in $new_path
39705
39706  windows_path="$new_path"
39707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39708    unix_path=`$CYGPATH -u "$windows_path"`
39709    new_path="$unix_path"
39710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39711    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39712    new_path="$unix_path"
39713  fi
39714
39715    # remove trailing .exe if any
39716    new_path="${new_path/%.exe/}"
39717
39718    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39719    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39720  fi
39721
39722    else
39723      # We're on a unix platform. Hooray! :)
39724      # First separate the path from the arguments. This will split at the first
39725      # space.
39726      complete="$BUILD_CC"
39727      path="${complete%% *}"
39728      tmp="$complete EOL"
39729      arguments="${tmp#* }"
39730
39731      # Cannot rely on the command "which" here since it doesn't always work.
39732      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39733      if test -z "$is_absolute_path"; then
39734        # Path to executable is not absolute. Find it.
39735        IFS_save="$IFS"
39736        IFS=:
39737        for p in $PATH; do
39738          if test -f "$p/$path" && test -x "$p/$path"; then
39739            new_path="$p/$path"
39740            break
39741          fi
39742        done
39743        IFS="$IFS_save"
39744      else
39745        # This is an absolute path, we can use it without further modifications.
39746        new_path="$path"
39747      fi
39748
39749      if test "x$new_path" = x; then
39750        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39751$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39752        has_space=`$ECHO "$complete" | $GREP " "`
39753        if test "x$has_space" != x; then
39754          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39755$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39756        fi
39757        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39758      fi
39759    fi
39760
39761    # Now join together the path and the arguments once again
39762    if test "x$arguments" != xEOL; then
39763      new_complete="$new_path ${arguments% *}"
39764    else
39765      new_complete="$new_path"
39766    fi
39767
39768    if test "x$complete" != "x$new_complete"; then
39769      BUILD_CC="$new_complete"
39770      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39771$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39772    fi
39773  fi
39774
39775
39776
39777  # Publish this variable in the help.
39778
39779
39780  if test "x$BUILD_CXX" = x; then
39781    # The variable is not set by user, try to locate tool using the code snippet
39782    for ac_prog in cl CC g++
39783do
39784  # Extract the first word of "$ac_prog", so it can be a program name with args.
39785set dummy $ac_prog; ac_word=$2
39786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39787$as_echo_n "checking for $ac_word... " >&6; }
39788if ${ac_cv_path_BUILD_CXX+:} false; then :
39789  $as_echo_n "(cached) " >&6
39790else
39791  case $BUILD_CXX in
39792  [\\/]* | ?:[\\/]*)
39793  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39794  ;;
39795  *)
39796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39797for as_dir in $PATH
39798do
39799  IFS=$as_save_IFS
39800  test -z "$as_dir" && as_dir=.
39801    for ac_exec_ext in '' $ac_executable_extensions; do
39802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39803    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39805    break 2
39806  fi
39807done
39808  done
39809IFS=$as_save_IFS
39810
39811  ;;
39812esac
39813fi
39814BUILD_CXX=$ac_cv_path_BUILD_CXX
39815if test -n "$BUILD_CXX"; then
39816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39817$as_echo "$BUILD_CXX" >&6; }
39818else
39819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39820$as_echo "no" >&6; }
39821fi
39822
39823
39824  test -n "$BUILD_CXX" && break
39825done
39826
39827  else
39828    # The variable is set, but is it from the command line or the environment?
39829
39830    # Try to remove the string !BUILD_CXX! from our list.
39831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39833      # If it failed, the variable was not from the command line. Ignore it,
39834      # but warn the user (except for BASH, which is always set by the calling BASH).
39835      if test "xBUILD_CXX" != xBASH; then
39836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39837$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39838      fi
39839      # Try to locate tool using the code snippet
39840      for ac_prog in cl CC g++
39841do
39842  # Extract the first word of "$ac_prog", so it can be a program name with args.
39843set dummy $ac_prog; ac_word=$2
39844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39845$as_echo_n "checking for $ac_word... " >&6; }
39846if ${ac_cv_path_BUILD_CXX+:} false; then :
39847  $as_echo_n "(cached) " >&6
39848else
39849  case $BUILD_CXX in
39850  [\\/]* | ?:[\\/]*)
39851  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39852  ;;
39853  *)
39854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39855for as_dir in $PATH
39856do
39857  IFS=$as_save_IFS
39858  test -z "$as_dir" && as_dir=.
39859    for ac_exec_ext in '' $ac_executable_extensions; do
39860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39861    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39863    break 2
39864  fi
39865done
39866  done
39867IFS=$as_save_IFS
39868
39869  ;;
39870esac
39871fi
39872BUILD_CXX=$ac_cv_path_BUILD_CXX
39873if test -n "$BUILD_CXX"; then
39874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39875$as_echo "$BUILD_CXX" >&6; }
39876else
39877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39878$as_echo "no" >&6; }
39879fi
39880
39881
39882  test -n "$BUILD_CXX" && break
39883done
39884
39885    else
39886      # If it succeeded, then it was overridden by the user. We will use it
39887      # for the tool.
39888
39889      # First remove it from the list of overridden variables, so we can test
39890      # for unknown variables in the end.
39891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39892
39893      # Check if the provided tool contains a complete path.
39894      tool_specified="$BUILD_CXX"
39895      tool_basename="${tool_specified##*/}"
39896      if test "x$tool_basename" = "x$tool_specified"; then
39897        # A command without a complete path is provided, search $PATH.
39898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39899$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39900        # Extract the first word of "$tool_basename", so it can be a program name with args.
39901set dummy $tool_basename; ac_word=$2
39902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39903$as_echo_n "checking for $ac_word... " >&6; }
39904if ${ac_cv_path_BUILD_CXX+:} false; then :
39905  $as_echo_n "(cached) " >&6
39906else
39907  case $BUILD_CXX in
39908  [\\/]* | ?:[\\/]*)
39909  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39910  ;;
39911  *)
39912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39913for as_dir in $PATH
39914do
39915  IFS=$as_save_IFS
39916  test -z "$as_dir" && as_dir=.
39917    for ac_exec_ext in '' $ac_executable_extensions; do
39918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39919    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39921    break 2
39922  fi
39923done
39924  done
39925IFS=$as_save_IFS
39926
39927  ;;
39928esac
39929fi
39930BUILD_CXX=$ac_cv_path_BUILD_CXX
39931if test -n "$BUILD_CXX"; then
39932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39933$as_echo "$BUILD_CXX" >&6; }
39934else
39935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39936$as_echo "no" >&6; }
39937fi
39938
39939
39940        if test "x$BUILD_CXX" = x; then
39941          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39942        fi
39943      else
39944        # Otherwise we believe it is a complete path. Use it as it is.
39945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39946$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39948$as_echo_n "checking for BUILD_CXX... " >&6; }
39949        if test ! -x "$tool_specified"; then
39950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39951$as_echo "not found" >&6; }
39952          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39953        fi
39954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39955$as_echo "$tool_specified" >&6; }
39956      fi
39957    fi
39958  fi
39959
39960
39961
39962  # Only process if variable expands to non-empty
39963
39964  if test "x$BUILD_CXX" != x; then
39965    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39966
39967  # First separate the path from the arguments. This will split at the first
39968  # space.
39969  complete="$BUILD_CXX"
39970  path="${complete%% *}"
39971  tmp="$complete EOL"
39972  arguments="${tmp#* }"
39973
39974  # Input might be given as Windows format, start by converting to
39975  # unix format.
39976  new_path=`$CYGPATH -u "$path"`
39977
39978  # Now try to locate executable using which
39979  new_path=`$WHICH "$new_path" 2> /dev/null`
39980  # bat and cmd files are not always considered executable in cygwin causing which
39981  # to not find them
39982  if test "x$new_path" = x \
39983      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39984      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39985    new_path=`$CYGPATH -u "$path"`
39986  fi
39987  if test "x$new_path" = x; then
39988    # Oops. Which didn't find the executable.
39989    # The splitting of arguments from the executable at a space might have been incorrect,
39990    # since paths with space are more likely in Windows. Give it another try with the whole
39991    # argument.
39992    path="$complete"
39993    arguments="EOL"
39994    new_path=`$CYGPATH -u "$path"`
39995    new_path=`$WHICH "$new_path" 2> /dev/null`
39996    # bat and cmd files are not always considered executable in cygwin causing which
39997    # to not find them
39998    if test "x$new_path" = x \
39999        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40000        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40001      new_path=`$CYGPATH -u "$path"`
40002    fi
40003    if test "x$new_path" = x; then
40004      # It's still not found. Now this is an unrecoverable error.
40005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40006$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40007      has_space=`$ECHO "$complete" | $GREP " "`
40008      if test "x$has_space" != x; then
40009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40011      fi
40012      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40013    fi
40014  fi
40015
40016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40019  # "foo.exe" is OK but "foo" is an error.
40020  #
40021  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40022  # It is also a way to make sure we got the proper file name for the real test later on.
40023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40024  if test "x$test_shortpath" = x; then
40025    # Short path failed, file does not exist as specified.
40026    # Try adding .exe or .cmd
40027    if test -f "${new_path}.exe"; then
40028      input_to_shortpath="${new_path}.exe"
40029    elif test -f "${new_path}.cmd"; then
40030      input_to_shortpath="${new_path}.cmd"
40031    else
40032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40033$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40034      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40035$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40036      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40037    fi
40038  else
40039    input_to_shortpath="$new_path"
40040  fi
40041
40042  # Call helper function which possibly converts this using DOS-style short mode.
40043  # If so, the updated path is stored in $new_path.
40044  new_path="$input_to_shortpath"
40045
40046  input_path="$input_to_shortpath"
40047  # Check if we need to convert this using DOS-style short mode. If the path
40048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40049  # take no chances and rewrite it.
40050  # Note: m4 eats our [], so we need to use [ and ] instead.
40051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40052  if test "x$has_forbidden_chars" != x; then
40053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40054    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40055    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40056    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40057      # Going to short mode and back again did indeed matter. Since short mode is
40058      # case insensitive, let's make it lowercase to improve readability.
40059      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40060      # Now convert it back to Unix-stile (cygpath)
40061      input_path=`$CYGPATH -u "$shortmode_path"`
40062      new_path="$input_path"
40063    fi
40064  fi
40065
40066  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40067  if test "x$test_cygdrive_prefix" = x; then
40068    # As a simple fix, exclude /usr/bin since it's not a real path.
40069    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40070      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40071      # a path prefixed by /cygdrive for fixpath to work.
40072      new_path="$CYGWIN_ROOT_PATH$input_path"
40073    fi
40074  fi
40075
40076  # remove trailing .exe if any
40077  new_path="${new_path/%.exe/}"
40078
40079    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40080
40081  # First separate the path from the arguments. This will split at the first
40082  # space.
40083  complete="$BUILD_CXX"
40084  path="${complete%% *}"
40085  tmp="$complete EOL"
40086  arguments="${tmp#* }"
40087
40088  # Input might be given as Windows format, start by converting to
40089  # unix format.
40090  new_path="$path"
40091
40092  windows_path="$new_path"
40093  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40094    unix_path=`$CYGPATH -u "$windows_path"`
40095    new_path="$unix_path"
40096  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40097    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40098    new_path="$unix_path"
40099  fi
40100
40101
40102  # Now try to locate executable using which
40103  new_path=`$WHICH "$new_path" 2> /dev/null`
40104
40105  if test "x$new_path" = x; then
40106    # Oops. Which didn't find the executable.
40107    # The splitting of arguments from the executable at a space might have been incorrect,
40108    # since paths with space are more likely in Windows. Give it another try with the whole
40109    # argument.
40110    path="$complete"
40111    arguments="EOL"
40112    new_path="$path"
40113
40114  windows_path="$new_path"
40115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40116    unix_path=`$CYGPATH -u "$windows_path"`
40117    new_path="$unix_path"
40118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40120    new_path="$unix_path"
40121  fi
40122
40123
40124    new_path=`$WHICH "$new_path" 2> /dev/null`
40125    # bat and cmd files are not always considered executable in MSYS causing which
40126    # to not find them
40127    if test "x$new_path" = x \
40128        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40129        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40130      new_path="$path"
40131
40132  windows_path="$new_path"
40133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40134    unix_path=`$CYGPATH -u "$windows_path"`
40135    new_path="$unix_path"
40136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40138    new_path="$unix_path"
40139  fi
40140
40141    fi
40142
40143    if test "x$new_path" = x; then
40144      # It's still not found. Now this is an unrecoverable error.
40145      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40146$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40147      has_space=`$ECHO "$complete" | $GREP " "`
40148      if test "x$has_space" != x; then
40149        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40150$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40151      fi
40152      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40153    fi
40154  fi
40155
40156  # Now new_path has a complete unix path to the binary
40157  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40158    # Keep paths in /bin as-is, but remove trailing .exe if any
40159    new_path="${new_path/%.exe/}"
40160    # Do not save /bin paths to all_fixpath_prefixes!
40161  else
40162    # Not in mixed or Windows style, start by that.
40163    new_path=`cmd //c echo $new_path`
40164
40165  input_path="$new_path"
40166  # Check if we need to convert this using DOS-style short mode. If the path
40167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40168  # take no chances and rewrite it.
40169  # Note: m4 eats our [], so we need to use [ and ] instead.
40170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40171  if test "x$has_forbidden_chars" != x; then
40172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40174  fi
40175
40176    # Output is in $new_path
40177
40178  windows_path="$new_path"
40179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40180    unix_path=`$CYGPATH -u "$windows_path"`
40181    new_path="$unix_path"
40182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40184    new_path="$unix_path"
40185  fi
40186
40187    # remove trailing .exe if any
40188    new_path="${new_path/%.exe/}"
40189
40190    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40191    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40192  fi
40193
40194    else
40195      # We're on a unix platform. Hooray! :)
40196      # First separate the path from the arguments. This will split at the first
40197      # space.
40198      complete="$BUILD_CXX"
40199      path="${complete%% *}"
40200      tmp="$complete EOL"
40201      arguments="${tmp#* }"
40202
40203      # Cannot rely on the command "which" here since it doesn't always work.
40204      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40205      if test -z "$is_absolute_path"; then
40206        # Path to executable is not absolute. Find it.
40207        IFS_save="$IFS"
40208        IFS=:
40209        for p in $PATH; do
40210          if test -f "$p/$path" && test -x "$p/$path"; then
40211            new_path="$p/$path"
40212            break
40213          fi
40214        done
40215        IFS="$IFS_save"
40216      else
40217        # This is an absolute path, we can use it without further modifications.
40218        new_path="$path"
40219      fi
40220
40221      if test "x$new_path" = x; then
40222        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40223$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40224        has_space=`$ECHO "$complete" | $GREP " "`
40225        if test "x$has_space" != x; then
40226          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40227$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40228        fi
40229        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40230      fi
40231    fi
40232
40233    # Now join together the path and the arguments once again
40234    if test "x$arguments" != xEOL; then
40235      new_complete="$new_path ${arguments% *}"
40236    else
40237      new_complete="$new_path"
40238    fi
40239
40240    if test "x$complete" != "x$new_complete"; then
40241      BUILD_CXX="$new_complete"
40242      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40243$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40244    fi
40245  fi
40246
40247
40248
40249  # Publish this variable in the help.
40250
40251
40252  if test "x$BUILD_LD" = x; then
40253    # The variable is not set by user, try to locate tool using the code snippet
40254    for ac_prog in ld
40255do
40256  # Extract the first word of "$ac_prog", so it can be a program name with args.
40257set dummy $ac_prog; ac_word=$2
40258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40259$as_echo_n "checking for $ac_word... " >&6; }
40260if ${ac_cv_path_BUILD_LD+:} false; then :
40261  $as_echo_n "(cached) " >&6
40262else
40263  case $BUILD_LD in
40264  [\\/]* | ?:[\\/]*)
40265  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40266  ;;
40267  *)
40268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40269for as_dir in $PATH
40270do
40271  IFS=$as_save_IFS
40272  test -z "$as_dir" && as_dir=.
40273    for ac_exec_ext in '' $ac_executable_extensions; do
40274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40275    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40277    break 2
40278  fi
40279done
40280  done
40281IFS=$as_save_IFS
40282
40283  ;;
40284esac
40285fi
40286BUILD_LD=$ac_cv_path_BUILD_LD
40287if test -n "$BUILD_LD"; then
40288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40289$as_echo "$BUILD_LD" >&6; }
40290else
40291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40292$as_echo "no" >&6; }
40293fi
40294
40295
40296  test -n "$BUILD_LD" && break
40297done
40298
40299  else
40300    # The variable is set, but is it from the command line or the environment?
40301
40302    # Try to remove the string !BUILD_LD! from our list.
40303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40305      # If it failed, the variable was not from the command line. Ignore it,
40306      # but warn the user (except for BASH, which is always set by the calling BASH).
40307      if test "xBUILD_LD" != xBASH; then
40308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40309$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40310      fi
40311      # Try to locate tool using the code snippet
40312      for ac_prog in ld
40313do
40314  # Extract the first word of "$ac_prog", so it can be a program name with args.
40315set dummy $ac_prog; ac_word=$2
40316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40317$as_echo_n "checking for $ac_word... " >&6; }
40318if ${ac_cv_path_BUILD_LD+:} false; then :
40319  $as_echo_n "(cached) " >&6
40320else
40321  case $BUILD_LD in
40322  [\\/]* | ?:[\\/]*)
40323  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40324  ;;
40325  *)
40326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40327for as_dir in $PATH
40328do
40329  IFS=$as_save_IFS
40330  test -z "$as_dir" && as_dir=.
40331    for ac_exec_ext in '' $ac_executable_extensions; do
40332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40333    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40335    break 2
40336  fi
40337done
40338  done
40339IFS=$as_save_IFS
40340
40341  ;;
40342esac
40343fi
40344BUILD_LD=$ac_cv_path_BUILD_LD
40345if test -n "$BUILD_LD"; then
40346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40347$as_echo "$BUILD_LD" >&6; }
40348else
40349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40350$as_echo "no" >&6; }
40351fi
40352
40353
40354  test -n "$BUILD_LD" && break
40355done
40356
40357    else
40358      # If it succeeded, then it was overridden by the user. We will use it
40359      # for the tool.
40360
40361      # First remove it from the list of overridden variables, so we can test
40362      # for unknown variables in the end.
40363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40364
40365      # Check if the provided tool contains a complete path.
40366      tool_specified="$BUILD_LD"
40367      tool_basename="${tool_specified##*/}"
40368      if test "x$tool_basename" = "x$tool_specified"; then
40369        # A command without a complete path is provided, search $PATH.
40370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40371$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40372        # Extract the first word of "$tool_basename", so it can be a program name with args.
40373set dummy $tool_basename; ac_word=$2
40374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40375$as_echo_n "checking for $ac_word... " >&6; }
40376if ${ac_cv_path_BUILD_LD+:} false; then :
40377  $as_echo_n "(cached) " >&6
40378else
40379  case $BUILD_LD in
40380  [\\/]* | ?:[\\/]*)
40381  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40382  ;;
40383  *)
40384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40385for as_dir in $PATH
40386do
40387  IFS=$as_save_IFS
40388  test -z "$as_dir" && as_dir=.
40389    for ac_exec_ext in '' $ac_executable_extensions; do
40390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40391    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40393    break 2
40394  fi
40395done
40396  done
40397IFS=$as_save_IFS
40398
40399  ;;
40400esac
40401fi
40402BUILD_LD=$ac_cv_path_BUILD_LD
40403if test -n "$BUILD_LD"; then
40404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40405$as_echo "$BUILD_LD" >&6; }
40406else
40407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40408$as_echo "no" >&6; }
40409fi
40410
40411
40412        if test "x$BUILD_LD" = x; then
40413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40414        fi
40415      else
40416        # Otherwise we believe it is a complete path. Use it as it is.
40417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40418$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40420$as_echo_n "checking for BUILD_LD... " >&6; }
40421        if test ! -x "$tool_specified"; then
40422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40423$as_echo "not found" >&6; }
40424          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40425        fi
40426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40427$as_echo "$tool_specified" >&6; }
40428      fi
40429    fi
40430  fi
40431
40432
40433
40434  # Only process if variable expands to non-empty
40435
40436  if test "x$BUILD_LD" != x; then
40437    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40438
40439  # First separate the path from the arguments. This will split at the first
40440  # space.
40441  complete="$BUILD_LD"
40442  path="${complete%% *}"
40443  tmp="$complete EOL"
40444  arguments="${tmp#* }"
40445
40446  # Input might be given as Windows format, start by converting to
40447  # unix format.
40448  new_path=`$CYGPATH -u "$path"`
40449
40450  # Now try to locate executable using which
40451  new_path=`$WHICH "$new_path" 2> /dev/null`
40452  # bat and cmd files are not always considered executable in cygwin causing which
40453  # to not find them
40454  if test "x$new_path" = x \
40455      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40456      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40457    new_path=`$CYGPATH -u "$path"`
40458  fi
40459  if test "x$new_path" = x; then
40460    # Oops. Which didn't find the executable.
40461    # The splitting of arguments from the executable at a space might have been incorrect,
40462    # since paths with space are more likely in Windows. Give it another try with the whole
40463    # argument.
40464    path="$complete"
40465    arguments="EOL"
40466    new_path=`$CYGPATH -u "$path"`
40467    new_path=`$WHICH "$new_path" 2> /dev/null`
40468    # bat and cmd files are not always considered executable in cygwin causing which
40469    # to not find them
40470    if test "x$new_path" = x \
40471        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40472        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40473      new_path=`$CYGPATH -u "$path"`
40474    fi
40475    if test "x$new_path" = x; then
40476      # It's still not found. Now this is an unrecoverable error.
40477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40478$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40479      has_space=`$ECHO "$complete" | $GREP " "`
40480      if test "x$has_space" != x; then
40481        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40482$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40483      fi
40484      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40485    fi
40486  fi
40487
40488  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40489  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40490  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40491  # "foo.exe" is OK but "foo" is an error.
40492  #
40493  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40494  # It is also a way to make sure we got the proper file name for the real test later on.
40495  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40496  if test "x$test_shortpath" = x; then
40497    # Short path failed, file does not exist as specified.
40498    # Try adding .exe or .cmd
40499    if test -f "${new_path}.exe"; then
40500      input_to_shortpath="${new_path}.exe"
40501    elif test -f "${new_path}.cmd"; then
40502      input_to_shortpath="${new_path}.cmd"
40503    else
40504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40505$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40506      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40507$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40508      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40509    fi
40510  else
40511    input_to_shortpath="$new_path"
40512  fi
40513
40514  # Call helper function which possibly converts this using DOS-style short mode.
40515  # If so, the updated path is stored in $new_path.
40516  new_path="$input_to_shortpath"
40517
40518  input_path="$input_to_shortpath"
40519  # Check if we need to convert this using DOS-style short mode. If the path
40520  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40521  # take no chances and rewrite it.
40522  # Note: m4 eats our [], so we need to use [ and ] instead.
40523  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40524  if test "x$has_forbidden_chars" != x; then
40525    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40526    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40527    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40528    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40529      # Going to short mode and back again did indeed matter. Since short mode is
40530      # case insensitive, let's make it lowercase to improve readability.
40531      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40532      # Now convert it back to Unix-stile (cygpath)
40533      input_path=`$CYGPATH -u "$shortmode_path"`
40534      new_path="$input_path"
40535    fi
40536  fi
40537
40538  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40539  if test "x$test_cygdrive_prefix" = x; then
40540    # As a simple fix, exclude /usr/bin since it's not a real path.
40541    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40542      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40543      # a path prefixed by /cygdrive for fixpath to work.
40544      new_path="$CYGWIN_ROOT_PATH$input_path"
40545    fi
40546  fi
40547
40548  # remove trailing .exe if any
40549  new_path="${new_path/%.exe/}"
40550
40551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40552
40553  # First separate the path from the arguments. This will split at the first
40554  # space.
40555  complete="$BUILD_LD"
40556  path="${complete%% *}"
40557  tmp="$complete EOL"
40558  arguments="${tmp#* }"
40559
40560  # Input might be given as Windows format, start by converting to
40561  # unix format.
40562  new_path="$path"
40563
40564  windows_path="$new_path"
40565  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40566    unix_path=`$CYGPATH -u "$windows_path"`
40567    new_path="$unix_path"
40568  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40569    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40570    new_path="$unix_path"
40571  fi
40572
40573
40574  # Now try to locate executable using which
40575  new_path=`$WHICH "$new_path" 2> /dev/null`
40576
40577  if test "x$new_path" = x; then
40578    # Oops. Which didn't find the executable.
40579    # The splitting of arguments from the executable at a space might have been incorrect,
40580    # since paths with space are more likely in Windows. Give it another try with the whole
40581    # argument.
40582    path="$complete"
40583    arguments="EOL"
40584    new_path="$path"
40585
40586  windows_path="$new_path"
40587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40588    unix_path=`$CYGPATH -u "$windows_path"`
40589    new_path="$unix_path"
40590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40592    new_path="$unix_path"
40593  fi
40594
40595
40596    new_path=`$WHICH "$new_path" 2> /dev/null`
40597    # bat and cmd files are not always considered executable in MSYS causing which
40598    # to not find them
40599    if test "x$new_path" = x \
40600        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40601        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40602      new_path="$path"
40603
40604  windows_path="$new_path"
40605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40606    unix_path=`$CYGPATH -u "$windows_path"`
40607    new_path="$unix_path"
40608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40610    new_path="$unix_path"
40611  fi
40612
40613    fi
40614
40615    if test "x$new_path" = x; then
40616      # It's still not found. Now this is an unrecoverable error.
40617      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40618$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40619      has_space=`$ECHO "$complete" | $GREP " "`
40620      if test "x$has_space" != x; then
40621        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40622$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40623      fi
40624      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40625    fi
40626  fi
40627
40628  # Now new_path has a complete unix path to the binary
40629  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40630    # Keep paths in /bin as-is, but remove trailing .exe if any
40631    new_path="${new_path/%.exe/}"
40632    # Do not save /bin paths to all_fixpath_prefixes!
40633  else
40634    # Not in mixed or Windows style, start by that.
40635    new_path=`cmd //c echo $new_path`
40636
40637  input_path="$new_path"
40638  # Check if we need to convert this using DOS-style short mode. If the path
40639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40640  # take no chances and rewrite it.
40641  # Note: m4 eats our [], so we need to use [ and ] instead.
40642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40643  if test "x$has_forbidden_chars" != x; then
40644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40646  fi
40647
40648    # Output is in $new_path
40649
40650  windows_path="$new_path"
40651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40652    unix_path=`$CYGPATH -u "$windows_path"`
40653    new_path="$unix_path"
40654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40655    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40656    new_path="$unix_path"
40657  fi
40658
40659    # remove trailing .exe if any
40660    new_path="${new_path/%.exe/}"
40661
40662    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40663    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40664  fi
40665
40666    else
40667      # We're on a unix platform. Hooray! :)
40668      # First separate the path from the arguments. This will split at the first
40669      # space.
40670      complete="$BUILD_LD"
40671      path="${complete%% *}"
40672      tmp="$complete EOL"
40673      arguments="${tmp#* }"
40674
40675      # Cannot rely on the command "which" here since it doesn't always work.
40676      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40677      if test -z "$is_absolute_path"; then
40678        # Path to executable is not absolute. Find it.
40679        IFS_save="$IFS"
40680        IFS=:
40681        for p in $PATH; do
40682          if test -f "$p/$path" && test -x "$p/$path"; then
40683            new_path="$p/$path"
40684            break
40685          fi
40686        done
40687        IFS="$IFS_save"
40688      else
40689        # This is an absolute path, we can use it without further modifications.
40690        new_path="$path"
40691      fi
40692
40693      if test "x$new_path" = x; then
40694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40695$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40696        has_space=`$ECHO "$complete" | $GREP " "`
40697        if test "x$has_space" != x; then
40698          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40699$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40700        fi
40701        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40702      fi
40703    fi
40704
40705    # Now join together the path and the arguments once again
40706    if test "x$arguments" != xEOL; then
40707      new_complete="$new_path ${arguments% *}"
40708    else
40709      new_complete="$new_path"
40710    fi
40711
40712    if test "x$complete" != "x$new_complete"; then
40713      BUILD_LD="$new_complete"
40714      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40715$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40716    fi
40717  fi
40718
40719  else
40720    # If we are not cross compiling, use the normal target compilers for
40721    # building the build platform executables.
40722    BUILD_CC="$CC"
40723    BUILD_CXX="$CXX"
40724    BUILD_LD="$LD"
40725  fi
40726
40727
40728
40729
40730
40731
40732  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40733    # For hotspot, we need these in Windows mixed path,
40734    # so rewrite them all. Need added .exe suffix.
40735    HOTSPOT_CXX="$CXX.exe"
40736    HOTSPOT_LD="$LD.exe"
40737    HOTSPOT_MT="$MT.exe"
40738    HOTSPOT_RC="$RC.exe"
40739
40740  unix_path="$HOTSPOT_CXX"
40741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40742    windows_path=`$CYGPATH -m "$unix_path"`
40743    HOTSPOT_CXX="$windows_path"
40744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40745    windows_path=`cmd //c echo $unix_path`
40746    HOTSPOT_CXX="$windows_path"
40747  fi
40748
40749
40750  unix_path="$HOTSPOT_LD"
40751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40752    windows_path=`$CYGPATH -m "$unix_path"`
40753    HOTSPOT_LD="$windows_path"
40754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40755    windows_path=`cmd //c echo $unix_path`
40756    HOTSPOT_LD="$windows_path"
40757  fi
40758
40759
40760  unix_path="$HOTSPOT_MT"
40761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40762    windows_path=`$CYGPATH -m "$unix_path"`
40763    HOTSPOT_MT="$windows_path"
40764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40765    windows_path=`cmd //c echo $unix_path`
40766    HOTSPOT_MT="$windows_path"
40767  fi
40768
40769
40770  unix_path="$HOTSPOT_RC"
40771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40772    windows_path=`$CYGPATH -m "$unix_path"`
40773    HOTSPOT_RC="$windows_path"
40774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40775    windows_path=`cmd //c echo $unix_path`
40776    HOTSPOT_RC="$windows_path"
40777  fi
40778
40779
40780
40781  else
40782    HOTSPOT_CXX="$CXX"
40783    HOTSPOT_LD="$LD"
40784  fi
40785
40786
40787
40788  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40789    USE_CLANG=true
40790  fi
40791
40792
40793  # LDEXE is the linker to use, when creating executables. Not really used.
40794  # FIXME: These should just be removed!
40795  LDEXE="$LD"
40796  LDEXECXX="$LDCXX"
40797
40798
40799
40800
40801
40802
40803  # The package path is used only on macosx?
40804  # FIXME: clean this up, and/or move it elsewhere.
40805  PACKAGE_PATH=/opt/local
40806
40807
40808  # Check for extra potential brokenness.
40809  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40810    # On Windows, double-check that we got the right compiler.
40811    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40812    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40813    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40814      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40815        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
40816      fi
40817    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40818      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40819        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40820      fi
40821    fi
40822  fi
40823
40824  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40825    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40826    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40827    # This is later checked when setting flags.
40828
40829    # "-Og" suppported for GCC 4.8 and later
40830    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40831
40832  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40833$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40834  supports=yes
40835
40836  saved_cflags="$CFLAGS"
40837  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40838  ac_ext=c
40839ac_cpp='$CPP $CPPFLAGS'
40840ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40841ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40842ac_compiler_gnu=$ac_cv_c_compiler_gnu
40843
40844  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40845/* end confdefs.h.  */
40846int i;
40847_ACEOF
40848if ac_fn_c_try_compile "$LINENO"; then :
40849
40850else
40851  supports=no
40852fi
40853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40854  ac_ext=cpp
40855ac_cpp='$CXXCPP $CPPFLAGS'
40856ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40857ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40858ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40859
40860  CFLAGS="$saved_cflags"
40861
40862  saved_cxxflags="$CXXFLAGS"
40863  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40864  ac_ext=cpp
40865ac_cpp='$CXXCPP $CPPFLAGS'
40866ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40867ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40868ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40869
40870  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40871/* end confdefs.h.  */
40872int i;
40873_ACEOF
40874if ac_fn_cxx_try_compile "$LINENO"; then :
40875
40876else
40877  supports=no
40878fi
40879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40880  ac_ext=cpp
40881ac_cpp='$CXXCPP $CPPFLAGS'
40882ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40883ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40884ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40885
40886  CXXFLAGS="$saved_cxxflags"
40887
40888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40889$as_echo "$supports" >&6; }
40890  if test "x$supports" = "xyes" ; then
40891    HAS_CFLAG_OPTIMIZE_DEBUG=true
40892  else
40893    HAS_CFLAG_OPTIMIZE_DEBUG=false
40894  fi
40895
40896
40897    # "-z relro" supported in GNU binutils 2.17 and later
40898    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40899
40900  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40901$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40902  supports=yes
40903
40904  saved_ldflags="$LDFLAGS"
40905  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40906  ac_ext=c
40907ac_cpp='$CPP $CPPFLAGS'
40908ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40909ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40910ac_compiler_gnu=$ac_cv_c_compiler_gnu
40911
40912  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40913/* end confdefs.h.  */
40914
40915int
40916main ()
40917{
40918
40919  ;
40920  return 0;
40921}
40922_ACEOF
40923if ac_fn_c_try_link "$LINENO"; then :
40924
40925else
40926  supports=no
40927fi
40928rm -f core conftest.err conftest.$ac_objext \
40929    conftest$ac_exeext conftest.$ac_ext
40930  ac_ext=cpp
40931ac_cpp='$CXXCPP $CPPFLAGS'
40932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40935
40936  LDFLAGS="$saved_ldflags"
40937
40938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40939$as_echo "$supports" >&6; }
40940  if test "x$supports" = "xyes" ; then
40941    HAS_LINKER_RELRO=true
40942  else
40943    HAS_LINKER_RELRO=false
40944  fi
40945
40946
40947    # "-z now" supported in GNU binutils 2.11 and later
40948    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40949
40950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40951$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40952  supports=yes
40953
40954  saved_ldflags="$LDFLAGS"
40955  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40956  ac_ext=c
40957ac_cpp='$CPP $CPPFLAGS'
40958ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40959ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40960ac_compiler_gnu=$ac_cv_c_compiler_gnu
40961
40962  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40963/* end confdefs.h.  */
40964
40965int
40966main ()
40967{
40968
40969  ;
40970  return 0;
40971}
40972_ACEOF
40973if ac_fn_c_try_link "$LINENO"; then :
40974
40975else
40976  supports=no
40977fi
40978rm -f core conftest.err conftest.$ac_objext \
40979    conftest$ac_exeext conftest.$ac_ext
40980  ac_ext=cpp
40981ac_cpp='$CXXCPP $CPPFLAGS'
40982ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40983ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40984ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40985
40986  LDFLAGS="$saved_ldflags"
40987
40988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40989$as_echo "$supports" >&6; }
40990  if test "x$supports" = "xyes" ; then
40991    HAS_LINKER_NOW=true
40992  else
40993    HAS_LINKER_NOW=false
40994  fi
40995
40996  fi
40997
40998  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40999  # in executable.'
41000  USING_BROKEN_SUSE_LD=no
41001  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41002    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41003$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41004    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41005    $ECHO "int main() { }" > main.c
41006    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41007      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41008$as_echo "no" >&6; }
41009      USING_BROKEN_SUSE_LD=no
41010    else
41011      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41012$as_echo "yes" >&6; }
41013      USING_BROKEN_SUSE_LD=yes
41014    fi
41015    rm -rf version-script.map main.c a.out
41016  fi
41017
41018
41019
41020# Setup the JTReg Regression Test Harness.
41021
41022
41023# Check whether --with-jtreg was given.
41024if test "${with_jtreg+set}" = set; then :
41025  withval=$with_jtreg;
41026else
41027  with_jtreg=no
41028fi
41029
41030
41031  if test "x$with_jtreg" = xno; then
41032    # jtreg disabled
41033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41034$as_echo_n "checking for jtreg... " >&6; }
41035    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41036$as_echo "no" >&6; }
41037  else
41038    if test "x$with_jtreg" != xyes; then
41039      # with path specified.
41040      JT_HOME="$with_jtreg"
41041    fi
41042
41043    if test "x$JT_HOME" != x; then
41044      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41045$as_echo_n "checking for jtreg... " >&6; }
41046
41047      # use JT_HOME enviroment var.
41048
41049  # Only process if variable expands to non-empty
41050
41051  if test "x$JT_HOME" != x; then
41052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41053
41054  # Input might be given as Windows format, start by converting to
41055  # unix format.
41056  path="$JT_HOME"
41057  new_path=`$CYGPATH -u "$path"`
41058
41059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41062  # "foo.exe" is OK but "foo" is an error.
41063  #
41064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41065  # It is also a way to make sure we got the proper file name for the real test later on.
41066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41067  if test "x$test_shortpath" = x; then
41068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41069$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41070    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41071  fi
41072
41073  # Call helper function which possibly converts this using DOS-style short mode.
41074  # If so, the updated path is stored in $new_path.
41075
41076  input_path="$new_path"
41077  # Check if we need to convert this using DOS-style short mode. If the path
41078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41079  # take no chances and rewrite it.
41080  # Note: m4 eats our [], so we need to use [ and ] instead.
41081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41082  if test "x$has_forbidden_chars" != x; then
41083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41087      # Going to short mode and back again did indeed matter. Since short mode is
41088      # case insensitive, let's make it lowercase to improve readability.
41089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41090      # Now convert it back to Unix-stile (cygpath)
41091      input_path=`$CYGPATH -u "$shortmode_path"`
41092      new_path="$input_path"
41093    fi
41094  fi
41095
41096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41097  if test "x$test_cygdrive_prefix" = x; then
41098    # As a simple fix, exclude /usr/bin since it's not a real path.
41099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41101      # a path prefixed by /cygdrive for fixpath to work.
41102      new_path="$CYGWIN_ROOT_PATH$input_path"
41103    fi
41104  fi
41105
41106
41107  if test "x$path" != "x$new_path"; then
41108    JT_HOME="$new_path"
41109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41110$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41111  fi
41112
41113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41114
41115  path="$JT_HOME"
41116  has_colon=`$ECHO $path | $GREP ^.:`
41117  new_path="$path"
41118  if test "x$has_colon" = x; then
41119    # Not in mixed or Windows style, start by that.
41120    new_path=`cmd //c echo $path`
41121  fi
41122
41123
41124  input_path="$new_path"
41125  # Check if we need to convert this using DOS-style short mode. If the path
41126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41127  # take no chances and rewrite it.
41128  # Note: m4 eats our [], so we need to use [ and ] instead.
41129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41130  if test "x$has_forbidden_chars" != x; then
41131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41133  fi
41134
41135
41136  windows_path="$new_path"
41137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41138    unix_path=`$CYGPATH -u "$windows_path"`
41139    new_path="$unix_path"
41140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41142    new_path="$unix_path"
41143  fi
41144
41145  if test "x$path" != "x$new_path"; then
41146    JT_HOME="$new_path"
41147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41148$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41149  fi
41150
41151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41153
41154    else
41155      # We're on a unix platform. Hooray! :)
41156      path="$JT_HOME"
41157      has_space=`$ECHO "$path" | $GREP " "`
41158      if test "x$has_space" != x; then
41159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41160$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41162      fi
41163
41164      # Use eval to expand a potential ~
41165      eval path="$path"
41166      if test ! -f "$path" && test ! -d "$path"; then
41167        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41168      fi
41169
41170      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41171    fi
41172  fi
41173
41174
41175      # jtreg win32 script works for everybody
41176      JTREGEXE="$JT_HOME/win32/bin/jtreg"
41177
41178      if test ! -f "$JTREGEXE"; then
41179        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41180      fi
41181
41182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41183$as_echo "$JTREGEXE" >&6; }
41184    else
41185      # try to find jtreg on path
41186
41187
41188
41189  # Publish this variable in the help.
41190
41191
41192  if test "x$JTREGEXE" = x; then
41193    # The variable is not set by user, try to locate tool using the code snippet
41194    for ac_prog in jtreg
41195do
41196  # Extract the first word of "$ac_prog", so it can be a program name with args.
41197set dummy $ac_prog; ac_word=$2
41198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41199$as_echo_n "checking for $ac_word... " >&6; }
41200if ${ac_cv_path_JTREGEXE+:} false; then :
41201  $as_echo_n "(cached) " >&6
41202else
41203  case $JTREGEXE in
41204  [\\/]* | ?:[\\/]*)
41205  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41206  ;;
41207  *)
41208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41209for as_dir in $PATH
41210do
41211  IFS=$as_save_IFS
41212  test -z "$as_dir" && as_dir=.
41213    for ac_exec_ext in '' $ac_executable_extensions; do
41214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41215    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41217    break 2
41218  fi
41219done
41220  done
41221IFS=$as_save_IFS
41222
41223  ;;
41224esac
41225fi
41226JTREGEXE=$ac_cv_path_JTREGEXE
41227if test -n "$JTREGEXE"; then
41228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41229$as_echo "$JTREGEXE" >&6; }
41230else
41231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41232$as_echo "no" >&6; }
41233fi
41234
41235
41236  test -n "$JTREGEXE" && break
41237done
41238
41239  else
41240    # The variable is set, but is it from the command line or the environment?
41241
41242    # Try to remove the string !JTREGEXE! from our list.
41243    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41244    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41245      # If it failed, the variable was not from the command line. Ignore it,
41246      # but warn the user (except for BASH, which is always set by the calling BASH).
41247      if test "xJTREGEXE" != xBASH; then
41248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41249$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41250      fi
41251      # Try to locate tool using the code snippet
41252      for ac_prog in jtreg
41253do
41254  # Extract the first word of "$ac_prog", so it can be a program name with args.
41255set dummy $ac_prog; ac_word=$2
41256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41257$as_echo_n "checking for $ac_word... " >&6; }
41258if ${ac_cv_path_JTREGEXE+:} false; then :
41259  $as_echo_n "(cached) " >&6
41260else
41261  case $JTREGEXE in
41262  [\\/]* | ?:[\\/]*)
41263  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41264  ;;
41265  *)
41266  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41267for as_dir in $PATH
41268do
41269  IFS=$as_save_IFS
41270  test -z "$as_dir" && as_dir=.
41271    for ac_exec_ext in '' $ac_executable_extensions; do
41272  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41273    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41274    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41275    break 2
41276  fi
41277done
41278  done
41279IFS=$as_save_IFS
41280
41281  ;;
41282esac
41283fi
41284JTREGEXE=$ac_cv_path_JTREGEXE
41285if test -n "$JTREGEXE"; then
41286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41287$as_echo "$JTREGEXE" >&6; }
41288else
41289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41290$as_echo "no" >&6; }
41291fi
41292
41293
41294  test -n "$JTREGEXE" && break
41295done
41296
41297    else
41298      # If it succeeded, then it was overridden by the user. We will use it
41299      # for the tool.
41300
41301      # First remove it from the list of overridden variables, so we can test
41302      # for unknown variables in the end.
41303      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41304
41305      # Check if the provided tool contains a complete path.
41306      tool_specified="$JTREGEXE"
41307      tool_basename="${tool_specified##*/}"
41308      if test "x$tool_basename" = "x$tool_specified"; then
41309        # A command without a complete path is provided, search $PATH.
41310        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41311$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41312        # Extract the first word of "$tool_basename", so it can be a program name with args.
41313set dummy $tool_basename; ac_word=$2
41314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41315$as_echo_n "checking for $ac_word... " >&6; }
41316if ${ac_cv_path_JTREGEXE+:} false; then :
41317  $as_echo_n "(cached) " >&6
41318else
41319  case $JTREGEXE in
41320  [\\/]* | ?:[\\/]*)
41321  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41322  ;;
41323  *)
41324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41325for as_dir in $PATH
41326do
41327  IFS=$as_save_IFS
41328  test -z "$as_dir" && as_dir=.
41329    for ac_exec_ext in '' $ac_executable_extensions; do
41330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41331    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41333    break 2
41334  fi
41335done
41336  done
41337IFS=$as_save_IFS
41338
41339  ;;
41340esac
41341fi
41342JTREGEXE=$ac_cv_path_JTREGEXE
41343if test -n "$JTREGEXE"; then
41344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41345$as_echo "$JTREGEXE" >&6; }
41346else
41347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41348$as_echo "no" >&6; }
41349fi
41350
41351
41352        if test "x$JTREGEXE" = x; then
41353          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41354        fi
41355      else
41356        # Otherwise we believe it is a complete path. Use it as it is.
41357        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41358$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41360$as_echo_n "checking for JTREGEXE... " >&6; }
41361        if test ! -x "$tool_specified"; then
41362          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41363$as_echo "not found" >&6; }
41364          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41365        fi
41366        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41367$as_echo "$tool_specified" >&6; }
41368      fi
41369    fi
41370  fi
41371
41372
41373
41374  if test "x$JTREGEXE" = x; then
41375    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41376  fi
41377
41378
41379      JT_HOME="`$DIRNAME $JTREGEXE`"
41380    fi
41381  fi
41382
41383
41384
41385
41386
41387
41388  # Option used to tell the compiler whether to create 32- or 64-bit executables
41389  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41390    COMPILER_TARGET_BITS_FLAG="-q"
41391  else
41392    COMPILER_TARGET_BITS_FLAG="-m"
41393  fi
41394
41395
41396  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41397  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41398    ARFLAGS="-r"
41399  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41400    ARFLAGS="-X64"
41401  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41402    # lib.exe is used as AR to create static libraries.
41403    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41404  else
41405    ARFLAGS=""
41406  fi
41407
41408
41409  ## Setup strip.
41410  # FIXME: should this really be per platform, or should it be per toolchain type?
41411  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41412  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41413  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41414    STRIPFLAGS="-g"
41415  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41416    STRIPFLAGS="-x"
41417  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41418    STRIPFLAGS="-S"
41419  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41420    STRIPFLAGS="-X32_64"
41421  fi
41422
41423  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41424    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41425  fi
41426
41427
41428  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41429    # FIXME: break out into MCSFLAGS
41430    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41431  fi
41432
41433
41434  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41435    CC_OUT_OPTION=-Fo
41436    EXE_OUT_OPTION=-out:
41437    LD_OUT_OPTION=-out:
41438    AR_OUT_OPTION=-out:
41439  else
41440    # The option used to specify the target .o,.a or .so file.
41441    # When compiling, how to specify the to be created object file.
41442    CC_OUT_OPTION='-o$(SPACE)'
41443    # When linking, how to specify the to be created executable.
41444    EXE_OUT_OPTION='-o$(SPACE)'
41445    # When linking, how to specify the to be created dynamically linkable library.
41446    LD_OUT_OPTION='-o$(SPACE)'
41447    # When archiving, how to specify the to be create static archive for object files.
41448    AR_OUT_OPTION='rcs$(SPACE)'
41449  fi
41450
41451
41452
41453
41454
41455  # On Windows, we need to set RC flags.
41456  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41457    RC_FLAGS="-nologo -l0x409"
41458    if test "x$VARIANT" = xOPT; then
41459      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41460    fi
41461
41462    # The version variables used to create RC_FLAGS may be overridden
41463    # in a custom configure script, or possibly the command line.
41464    # Let those variables be expanded at make time in spec.gmk.
41465    # The \$ are escaped to the shell, and the $(...) variables
41466    # are evaluated by make.
41467    RC_FLAGS="$RC_FLAGS \
41468        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41469        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41470        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41471        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41472        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41473        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41474        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41475  fi
41476
41477
41478  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41479    # silence copyright notice and other headers.
41480    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41481  fi
41482
41483  if test "x$SYSROOT" != "x"; then
41484    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41485      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41486        # Solaris Studio does not have a concept of sysroot. Instead we must
41487        # make sure the default include and lib dirs are appended to each
41488        # compile and link command line.
41489        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41490        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41491            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41492            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41493      fi
41494    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41495      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41496      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41497      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41498    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41499      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41500      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41501    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41502      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41503      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41504    fi
41505    # Propagate the sysroot args to hotspot
41506    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41507    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41508    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41509  fi
41510
41511  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41512  # set this here so it doesn't have to be peppered throughout the forest
41513  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41514    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41515    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41516  fi
41517
41518
41519
41520
41521
41522# FIXME: Currently we must test this after toolchain but before flags. Fix!
41523
41524# Now we can test some aspects on the target using configure macros.
41525
41526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41527$as_echo_n "checking for ANSI C header files... " >&6; }
41528if ${ac_cv_header_stdc+:} false; then :
41529  $as_echo_n "(cached) " >&6
41530else
41531  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41532/* end confdefs.h.  */
41533#include <stdlib.h>
41534#include <stdarg.h>
41535#include <string.h>
41536#include <float.h>
41537
41538int
41539main ()
41540{
41541
41542  ;
41543  return 0;
41544}
41545_ACEOF
41546if ac_fn_cxx_try_compile "$LINENO"; then :
41547  ac_cv_header_stdc=yes
41548else
41549  ac_cv_header_stdc=no
41550fi
41551rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41552
41553if test $ac_cv_header_stdc = yes; then
41554  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41555  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41556/* end confdefs.h.  */
41557#include <string.h>
41558
41559_ACEOF
41560if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41561  $EGREP "memchr" >/dev/null 2>&1; then :
41562
41563else
41564  ac_cv_header_stdc=no
41565fi
41566rm -f conftest*
41567
41568fi
41569
41570if test $ac_cv_header_stdc = yes; then
41571  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41573/* end confdefs.h.  */
41574#include <stdlib.h>
41575
41576_ACEOF
41577if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41578  $EGREP "free" >/dev/null 2>&1; then :
41579
41580else
41581  ac_cv_header_stdc=no
41582fi
41583rm -f conftest*
41584
41585fi
41586
41587if test $ac_cv_header_stdc = yes; then
41588  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41589  if test "$cross_compiling" = yes; then :
41590  :
41591else
41592  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41593/* end confdefs.h.  */
41594#include <ctype.h>
41595#include <stdlib.h>
41596#if ((' ' & 0x0FF) == 0x020)
41597# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41598# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41599#else
41600# define ISLOWER(c) \
41601		   (('a' <= (c) && (c) <= 'i') \
41602		     || ('j' <= (c) && (c) <= 'r') \
41603		     || ('s' <= (c) && (c) <= 'z'))
41604# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41605#endif
41606
41607#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41608int
41609main ()
41610{
41611  int i;
41612  for (i = 0; i < 256; i++)
41613    if (XOR (islower (i), ISLOWER (i))
41614	|| toupper (i) != TOUPPER (i))
41615      return 2;
41616  return 0;
41617}
41618_ACEOF
41619if ac_fn_cxx_try_run "$LINENO"; then :
41620
41621else
41622  ac_cv_header_stdc=no
41623fi
41624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41625  conftest.$ac_objext conftest.beam conftest.$ac_ext
41626fi
41627
41628fi
41629fi
41630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41631$as_echo "$ac_cv_header_stdc" >&6; }
41632if test $ac_cv_header_stdc = yes; then
41633
41634$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41635
41636fi
41637
41638# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41639for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41640		  inttypes.h stdint.h unistd.h
41641do :
41642  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41643ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41644"
41645if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41646  cat >>confdefs.h <<_ACEOF
41647#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41648_ACEOF
41649
41650fi
41651
41652done
41653
41654
41655
41656  ###############################################################################
41657  #
41658  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41659  # (The JVM can use 32 or 64 bit Java pointers but that decision
41660  # is made at runtime.)
41661  #
41662
41663  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41664    # Always specify -m flag on Solaris
41665    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41666
41667  # When we add flags to the "official" CFLAGS etc, we need to
41668  # keep track of these additions in ADDED_CFLAGS etc. These
41669  # will later be checked to make sure only controlled additions
41670  # have been made to CFLAGS etc.
41671  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41672  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41673  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41674
41675  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41676  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41677  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41678
41679  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41680  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41681  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41682
41683  elif test "x$COMPILE_TYPE" = xreduced; then
41684    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41685      # Specify -m if running reduced on unix platforms
41686
41687  # When we add flags to the "official" CFLAGS etc, we need to
41688  # keep track of these additions in ADDED_CFLAGS etc. These
41689  # will later be checked to make sure only controlled additions
41690  # have been made to CFLAGS etc.
41691  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41692  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41693  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41694
41695  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41696  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41697  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41698
41699  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41700  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41701  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41702
41703    fi
41704  fi
41705
41706  # Make compilation sanity check
41707  for ac_header in stdio.h
41708do :
41709  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41710if test "x$ac_cv_header_stdio_h" = xyes; then :
41711  cat >>confdefs.h <<_ACEOF
41712#define HAVE_STDIO_H 1
41713_ACEOF
41714
41715else
41716
41717    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41718$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41719    if test "x$COMPILE_TYPE" = xreduced; then
41720      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41721$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41722    elif test "x$COMPILE_TYPE" = xcross; then
41723      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41724$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41725    fi
41726    as_fn_error $? "Cannot continue." "$LINENO" 5
41727
41728fi
41729
41730done
41731
41732
41733  # The cast to long int works around a bug in the HP C Compiler
41734# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41735# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41736# This bug is HP SR number 8606223364.
41737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41738$as_echo_n "checking size of int *... " >&6; }
41739if ${ac_cv_sizeof_int_p+:} false; then :
41740  $as_echo_n "(cached) " >&6
41741else
41742  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41743
41744else
41745  if test "$ac_cv_type_int_p" = yes; then
41746     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41747$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41748as_fn_error 77 "cannot compute sizeof (int *)
41749See \`config.log' for more details" "$LINENO" 5; }
41750   else
41751     ac_cv_sizeof_int_p=0
41752   fi
41753fi
41754
41755fi
41756{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41757$as_echo "$ac_cv_sizeof_int_p" >&6; }
41758
41759
41760
41761cat >>confdefs.h <<_ACEOF
41762#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41763_ACEOF
41764
41765
41766
41767  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41768  if test "x$ac_cv_sizeof_int_p" = x; then
41769    # The test failed, lets stick to the assumed value.
41770    { $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
41771$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41772  else
41773    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41774
41775    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41776      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41777      # Let's try to implicitely set the compilers target architecture and retry the test
41778      { $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
41779$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;}
41780      { $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
41781$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;}
41782
41783  # When we add flags to the "official" CFLAGS etc, we need to
41784  # keep track of these additions in ADDED_CFLAGS etc. These
41785  # will later be checked to make sure only controlled additions
41786  # have been made to CFLAGS etc.
41787  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41788  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41789  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41790
41791  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41792  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41793  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41794
41795  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41796  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41797  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41798
41799
41800      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41801      unset ac_cv_sizeof_int_p
41802      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41803      cat >>confdefs.h <<_ACEOF
41804#undef SIZEOF_INT_P
41805_ACEOF
41806
41807      # The cast to long int works around a bug in the HP C Compiler
41808# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41809# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41810# This bug is HP SR number 8606223364.
41811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41812$as_echo_n "checking size of int *... " >&6; }
41813if ${ac_cv_sizeof_int_p+:} false; then :
41814  $as_echo_n "(cached) " >&6
41815else
41816  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41817
41818else
41819  if test "$ac_cv_type_int_p" = yes; then
41820     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41822as_fn_error 77 "cannot compute sizeof (int *)
41823See \`config.log' for more details" "$LINENO" 5; }
41824   else
41825     ac_cv_sizeof_int_p=0
41826   fi
41827fi
41828
41829fi
41830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41831$as_echo "$ac_cv_sizeof_int_p" >&6; }
41832
41833
41834
41835cat >>confdefs.h <<_ACEOF
41836#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41837_ACEOF
41838
41839
41840
41841      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41842
41843      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41844        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
41845      fi
41846    fi
41847  fi
41848
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41850$as_echo_n "checking for target address size... " >&6; }
41851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41852$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41853
41854
41855  ###############################################################################
41856  #
41857  # Is the target little of big endian?
41858  #
41859   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41860$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41861if ${ac_cv_c_bigendian+:} false; then :
41862  $as_echo_n "(cached) " >&6
41863else
41864  ac_cv_c_bigendian=unknown
41865    # See if we're dealing with a universal compiler.
41866    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41867/* end confdefs.h.  */
41868#ifndef __APPLE_CC__
41869	       not a universal capable compiler
41870	     #endif
41871	     typedef int dummy;
41872
41873_ACEOF
41874if ac_fn_cxx_try_compile "$LINENO"; then :
41875
41876	# Check for potential -arch flags.  It is not universal unless
41877	# there are at least two -arch flags with different values.
41878	ac_arch=
41879	ac_prev=
41880	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41881	 if test -n "$ac_prev"; then
41882	   case $ac_word in
41883	     i?86 | x86_64 | ppc | ppc64)
41884	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41885		 ac_arch=$ac_word
41886	       else
41887		 ac_cv_c_bigendian=universal
41888		 break
41889	       fi
41890	       ;;
41891	   esac
41892	   ac_prev=
41893	 elif test "x$ac_word" = "x-arch"; then
41894	   ac_prev=arch
41895	 fi
41896       done
41897fi
41898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41899    if test $ac_cv_c_bigendian = unknown; then
41900      # See if sys/param.h defines the BYTE_ORDER macro.
41901      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41902/* end confdefs.h.  */
41903#include <sys/types.h>
41904	     #include <sys/param.h>
41905
41906int
41907main ()
41908{
41909#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41910		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41911		     && LITTLE_ENDIAN)
41912	      bogus endian macros
41913	     #endif
41914
41915  ;
41916  return 0;
41917}
41918_ACEOF
41919if ac_fn_cxx_try_compile "$LINENO"; then :
41920  # It does; now see whether it defined to BIG_ENDIAN or not.
41921	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41922/* end confdefs.h.  */
41923#include <sys/types.h>
41924		#include <sys/param.h>
41925
41926int
41927main ()
41928{
41929#if BYTE_ORDER != BIG_ENDIAN
41930		 not big endian
41931		#endif
41932
41933  ;
41934  return 0;
41935}
41936_ACEOF
41937if ac_fn_cxx_try_compile "$LINENO"; then :
41938  ac_cv_c_bigendian=yes
41939else
41940  ac_cv_c_bigendian=no
41941fi
41942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41943fi
41944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41945    fi
41946    if test $ac_cv_c_bigendian = unknown; then
41947      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41948      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41949/* end confdefs.h.  */
41950#include <limits.h>
41951
41952int
41953main ()
41954{
41955#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41956	      bogus endian macros
41957	     #endif
41958
41959  ;
41960  return 0;
41961}
41962_ACEOF
41963if ac_fn_cxx_try_compile "$LINENO"; then :
41964  # It does; now see whether it defined to _BIG_ENDIAN or not.
41965	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41966/* end confdefs.h.  */
41967#include <limits.h>
41968
41969int
41970main ()
41971{
41972#ifndef _BIG_ENDIAN
41973		 not big endian
41974		#endif
41975
41976  ;
41977  return 0;
41978}
41979_ACEOF
41980if ac_fn_cxx_try_compile "$LINENO"; then :
41981  ac_cv_c_bigendian=yes
41982else
41983  ac_cv_c_bigendian=no
41984fi
41985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41986fi
41987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41988    fi
41989    if test $ac_cv_c_bigendian = unknown; then
41990      # Compile a test program.
41991      if test "$cross_compiling" = yes; then :
41992  # Try to guess by grepping values from an object file.
41993	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41994/* end confdefs.h.  */
41995short int ascii_mm[] =
41996		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41997		short int ascii_ii[] =
41998		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41999		int use_ascii (int i) {
42000		  return ascii_mm[i] + ascii_ii[i];
42001		}
42002		short int ebcdic_ii[] =
42003		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42004		short int ebcdic_mm[] =
42005		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42006		int use_ebcdic (int i) {
42007		  return ebcdic_mm[i] + ebcdic_ii[i];
42008		}
42009		extern int foo;
42010
42011int
42012main ()
42013{
42014return use_ascii (foo) == use_ebcdic (foo);
42015  ;
42016  return 0;
42017}
42018_ACEOF
42019if ac_fn_cxx_try_compile "$LINENO"; then :
42020  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42021	      ac_cv_c_bigendian=yes
42022	    fi
42023	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42024	      if test "$ac_cv_c_bigendian" = unknown; then
42025		ac_cv_c_bigendian=no
42026	      else
42027		# finding both strings is unlikely to happen, but who knows?
42028		ac_cv_c_bigendian=unknown
42029	      fi
42030	    fi
42031fi
42032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42033else
42034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42035/* end confdefs.h.  */
42036$ac_includes_default
42037int
42038main ()
42039{
42040
42041	     /* Are we little or big endian?  From Harbison&Steele.  */
42042	     union
42043	     {
42044	       long int l;
42045	       char c[sizeof (long int)];
42046	     } u;
42047	     u.l = 1;
42048	     return u.c[sizeof (long int) - 1] == 1;
42049
42050  ;
42051  return 0;
42052}
42053_ACEOF
42054if ac_fn_cxx_try_run "$LINENO"; then :
42055  ac_cv_c_bigendian=no
42056else
42057  ac_cv_c_bigendian=yes
42058fi
42059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42060  conftest.$ac_objext conftest.beam conftest.$ac_ext
42061fi
42062
42063    fi
42064fi
42065{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42066$as_echo "$ac_cv_c_bigendian" >&6; }
42067 case $ac_cv_c_bigendian in #(
42068   yes)
42069     ENDIAN="big";; #(
42070   no)
42071     ENDIAN="little" ;; #(
42072   universal)
42073     ENDIAN="universal_endianness"
42074     ;; #(
42075   *)
42076     ENDIAN="unknown" ;;
42077 esac
42078
42079
42080  if test "x$ENDIAN" = xuniversal_endianness; then
42081    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42082  fi
42083  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42084    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
42085  fi
42086
42087
42088# Configure flags for the tools
42089
42090  ###############################################################################
42091  #
42092  # How to compile shared libraries.
42093  #
42094
42095  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42096    PICFLAG="-fPIC"
42097    C_FLAG_REORDER=''
42098    CXX_FLAG_REORDER=''
42099
42100    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42101      # Linking is different on MacOSX
42102      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42103      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42104      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42105      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42106      SET_SHARED_LIBRARY_MAPFILE=''
42107    else
42108      # Default works for linux, might work on other platforms as well.
42109      SHARED_LIBRARY_FLAGS='-shared'
42110      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42111      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42112      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42113      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42114    fi
42115  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42116    PICFLAG=''
42117    C_FLAG_REORDER=''
42118    CXX_FLAG_REORDER=''
42119
42120    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42121      # Linking is different on MacOSX
42122      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42123      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42124      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42125      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42126      SET_SHARED_LIBRARY_MAPFILE=''
42127    else
42128      # Default works for linux, might work on other platforms as well.
42129      SHARED_LIBRARY_FLAGS='-shared'
42130      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42131      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42132      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42133      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42134    fi
42135  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42136    PICFLAG="-KPIC"
42137    C_FLAG_REORDER='-xF'
42138    CXX_FLAG_REORDER='-xF'
42139    SHARED_LIBRARY_FLAGS="-G"
42140    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42141    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42142    SET_SHARED_LIBRARY_NAME=''
42143    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42144  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42145    PICFLAG="-qpic=large"
42146    C_FLAG_REORDER=''
42147    CXX_FLAG_REORDER=''
42148    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42149    SET_EXECUTABLE_ORIGIN=""
42150    SET_SHARED_LIBRARY_ORIGIN=''
42151    SET_SHARED_LIBRARY_NAME=''
42152    SET_SHARED_LIBRARY_MAPFILE=''
42153  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42154    PICFLAG=""
42155    C_FLAG_REORDER=''
42156    CXX_FLAG_REORDER=''
42157    SHARED_LIBRARY_FLAGS="-LD"
42158    SET_EXECUTABLE_ORIGIN=''
42159    SET_SHARED_LIBRARY_ORIGIN=''
42160    SET_SHARED_LIBRARY_NAME=''
42161    SET_SHARED_LIBRARY_MAPFILE=''
42162  fi
42163
42164
42165
42166
42167
42168
42169
42170
42171
42172  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42173    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42174    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42175    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42176  fi
42177  # The (cross) compiler is now configured, we can now test capabilities
42178  # of the target platform.
42179
42180
42181
42182  ###############################################################################
42183  #
42184  # Setup the opt flags for different compilers
42185  # and different operating systems.
42186  #
42187
42188  # FIXME: this was indirectly the old default, but just inherited.
42189  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42190  #   C_FLAG_DEPS="-MMD -MF"
42191  # fi
42192
42193  # Generate make dependency files
42194  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42195    C_FLAG_DEPS="-MMD -MF"
42196  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42197    C_FLAG_DEPS="-MMD -MF"
42198  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42199    C_FLAG_DEPS="-xMMD -xMF"
42200  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42201    C_FLAG_DEPS="-qmakedep=gcc -MF"
42202  fi
42203  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42204
42205
42206
42207  # Debug symbols
42208  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42209    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42210      # reduce from default "-g2" option to save space
42211      CFLAGS_DEBUG_SYMBOLS="-g1"
42212      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42213    else
42214      CFLAGS_DEBUG_SYMBOLS="-g"
42215      CXXFLAGS_DEBUG_SYMBOLS="-g"
42216    fi
42217  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42218    CFLAGS_DEBUG_SYMBOLS="-g"
42219    CXXFLAGS_DEBUG_SYMBOLS="-g"
42220  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42221    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42222    # FIXME: likely a bug, this disables debug symbols rather than enables them
42223    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42224  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42225    CFLAGS_DEBUG_SYMBOLS="-g"
42226    CXXFLAGS_DEBUG_SYMBOLS="-g"
42227  fi
42228
42229
42230
42231  # bounds, memory and behavior checking options
42232  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42233    case $DEBUG_LEVEL in
42234    release )
42235      # no adjustment
42236      ;;
42237    fastdebug )
42238      # no adjustment
42239      ;;
42240    slowdebug )
42241      # Add runtime stack smashing and undefined behavior checks
42242      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42243      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42244      ;;
42245    esac
42246  fi
42247
42248
42249
42250  # Optimization levels
42251  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42252    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42253
42254    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42255      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42256      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42257      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42258      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42259      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42260      C_O_FLAG_NONE="-xregs=no%frameptr"
42261      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42262      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42263      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42264      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42265      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42266      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42267        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42268        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42269      fi
42270    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42271      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42272      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42273      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42274      C_O_FLAG_DEBUG=""
42275      C_O_FLAG_NONE=""
42276      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42277      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42278      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42279      C_O_FLAG_DEBUG=""
42280      CXX_O_FLAG_NONE=""
42281    fi
42282  else
42283    # The remaining toolchains share opt flags between CC and CXX;
42284    # setup for C and duplicate afterwards.
42285    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42286      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42287        # On MacOSX we optimize for size, something
42288        # we should do for all platforms?
42289        C_O_FLAG_HIGHEST="-Os"
42290        C_O_FLAG_HI="-Os"
42291        C_O_FLAG_NORM="-Os"
42292      else
42293        C_O_FLAG_HIGHEST="-O3"
42294        C_O_FLAG_HI="-O3"
42295        C_O_FLAG_NORM="-O2"
42296      fi
42297      C_O_FLAG_DEBUG="-O0"
42298      C_O_FLAG_NONE="-O0"
42299    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42300      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42301        # On MacOSX we optimize for size, something
42302        # we should do for all platforms?
42303        C_O_FLAG_HIGHEST="-Os"
42304        C_O_FLAG_HI="-Os"
42305        C_O_FLAG_NORM="-Os"
42306      else
42307        C_O_FLAG_HIGHEST="-O3"
42308        C_O_FLAG_HI="-O3"
42309        C_O_FLAG_NORM="-O2"
42310      fi
42311      C_O_FLAG_DEBUG="-O0"
42312      C_O_FLAG_NONE="-O0"
42313    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42314      C_O_FLAG_HIGHEST="-O3"
42315      C_O_FLAG_HI="-O3 -qstrict"
42316      C_O_FLAG_NORM="-O2"
42317      C_O_FLAG_DEBUG="-qnoopt"
42318      C_O_FLAG_NONE="-qnoop"
42319    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42320      C_O_FLAG_HIGHEST="-O2"
42321      C_O_FLAG_HI="-O1"
42322      C_O_FLAG_NORM="-O1"
42323      C_O_FLAG_DEBUG="-Od"
42324      C_O_FLAG_NONE="-Od"
42325    fi
42326    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42327    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42328    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42329    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42330    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42331  fi
42332
42333  # Adjust optimization flags according to debug level.
42334  case $DEBUG_LEVEL in
42335    release )
42336      # no adjustment
42337      ;;
42338    fastdebug )
42339      # Not quite so much optimization
42340      C_O_FLAG_HI="$C_O_FLAG_NORM"
42341      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42342      ;;
42343    slowdebug )
42344      # Disable optimization
42345      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42346      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42347      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42348      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42349      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42350      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42351      ;;
42352  esac
42353
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366  # Special extras...
42367  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42368    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42369      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42370      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42371    fi
42372    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42373    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42374  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42375    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42376    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42377    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42378  fi
42379
42380  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42381    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42382$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42383  fi
42384
42385  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42386    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42387$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42388  fi
42389
42390  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42391    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42392$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42393  fi
42394
42395
42396# Check whether --with-extra-cflags was given.
42397if test "${with_extra_cflags+set}" = set; then :
42398  withval=$with_extra_cflags;
42399fi
42400
42401
42402
42403# Check whether --with-extra-cxxflags was given.
42404if test "${with_extra_cxxflags+set}" = set; then :
42405  withval=$with_extra_cxxflags;
42406fi
42407
42408
42409
42410# Check whether --with-extra-ldflags was given.
42411if test "${with_extra_ldflags+set}" = set; then :
42412  withval=$with_extra_ldflags;
42413fi
42414
42415
42416  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42417  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42418  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42419
42420  # Hotspot needs these set in their legacy form
42421  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42422  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42423  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42424
42425
42426
42427
42428
42429  ###############################################################################
42430  #
42431  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42432  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42433  #
42434
42435  # Setup compiler/platform specific flags into
42436  #    CFLAGS_JDK    - C Compiler flags
42437  #    CXXFLAGS_JDK  - C++ Compiler flags
42438  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42439  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42440    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42441        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42442    case $OPENJDK_TARGET_CPU_ARCH in
42443      arm )
42444        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42445        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42446        ;;
42447      ppc )
42448        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42449        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42450        ;;
42451      * )
42452        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42453        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42454        ;;
42455    esac
42456  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42457    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42458    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42459      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42460    fi
42461
42462    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42463    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42464  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42465    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42466    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42467  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42468    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42469        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42470        -DWIN32_LEAN_AND_MEAN \
42471        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42472        -DWIN32 -DIAL"
42473    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42474      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42475    else
42476      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42477    fi
42478    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42479    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42480    # studio.
42481    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42482      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42483          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42484    fi
42485  fi
42486
42487  ###############################################################################
42488
42489  # Adjust flags according to debug level.
42490  case $DEBUG_LEVEL in
42491    fastdebug | slowdebug )
42492      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42493      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42494      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42495      ;;
42496    release )
42497      ;;
42498    * )
42499      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42500      ;;
42501  esac
42502
42503  # Setup LP64
42504  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42505
42506  # Set some common defines. These works for all compilers, but assume
42507  # -D is universally accepted.
42508
42509  # Setup endianness
42510  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42511    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42512    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42513    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42514    #   Note: -Dmacro         is the same as    #define macro 1
42515    #         -Dmacro=        is the same as    #define macro
42516    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42517      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42518    else
42519      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42520    fi
42521  else
42522    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42523    # are defined in the system?
42524    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42525      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42526    else
42527      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42528    fi
42529  fi
42530
42531  # Setup target OS define. Use OS target name but in upper case.
42532  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42533  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42534
42535  # Setup target CPU
42536  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42537
42538  # Setup debug/release defines
42539  if test "x$DEBUG_LEVEL" = xrelease; then
42540    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42541    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42542      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42543    fi
42544  else
42545    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42546  fi
42547
42548  # Setup release name
42549  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42550
42551
42552  # Set some additional per-OS defines.
42553  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42554    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42555  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42556    # FIXME: PPC64 should not be here.
42557    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42558  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42559    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42560  fi
42561
42562  # Additional macosx handling
42563  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42564    # Setting these parameters makes it an error to link to macosx APIs that are
42565    # newer than the given OS version and makes the linked binaries compatible
42566    # even if built on a newer version of the OS.
42567    # The expected format is X.Y.Z
42568    MACOSX_VERSION_MIN=10.7.0
42569
42570
42571    # The macro takes the version with no dots, ex: 1070
42572    # Let the flags variables get resolved in make for easier override on make
42573    # command line.
42574    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42575    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42576  fi
42577
42578  # Setup some hard coded includes
42579  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42580      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42581      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42582      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42583
42584  # The shared libraries are compiled using the picflag.
42585  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42586  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42587
42588  # Executable flags
42589  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42590  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42591
42592
42593
42594
42595
42596
42597  # Flags for compiling test libraries
42598  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42599  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42600
42601  # Flags for compiling test executables
42602  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42603  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42604
42605
42606
42607
42608
42609
42610  # Setup LDFLAGS et al.
42611  #
42612
42613  # Now this is odd. The JDK native libraries have to link against libjvm.so
42614  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42615  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42616  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42617  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42618  # libraries will link to whatever is in memory. Yuck.
42619  #
42620  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42621  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42622    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42623    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42624      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42625    fi
42626    # TODO: make -debug optional "--disable-full-debug-symbols"
42627    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42628  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42629    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42630    # We have previously set HAS_GNU_HASH if this is the case
42631    if test -n "$HAS_GNU_HASH"; then
42632      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42633    fi
42634    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42635      # And since we now know that the linker is gnu, then add -z defs, to forbid
42636      # undefined symbols in object files.
42637      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42638      case $DEBUG_LEVEL in
42639        release )
42640          # tell linker to optimize libraries.
42641          # Should this be supplied to the OSS linker as well?
42642          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42643          ;;
42644        slowdebug )
42645          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42646            # do relocations at load
42647            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42648            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42649          fi
42650          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42651            # mark relocations read only
42652            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42653            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42654          fi
42655          ;;
42656        fastdebug )
42657          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42658            # mark relocations read only
42659            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42660            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42661          fi
42662          ;;
42663        * )
42664          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42665          ;;
42666        esac
42667    fi
42668  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42669    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42670    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42671  fi
42672
42673  # Customize LDFLAGS for executables
42674
42675  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42676
42677  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42678    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42679      LDFLAGS_STACK_SIZE=1048576
42680    else
42681      LDFLAGS_STACK_SIZE=327680
42682    fi
42683    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42684  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42685    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42686  fi
42687
42688  # Customize LDFLAGS for libs
42689  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42690
42691  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42692    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42693    LDFLAGS_JDKLIB_SUFFIX=""
42694  else
42695    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42696        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42697
42698    # On some platforms (mac) the linker warns about non existing -L dirs.
42699    # Add server first if available. Linking aginst client does not always produce the same results.
42700    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42701    # Default to server for other variants.
42702    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42703      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42704    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42705      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42706    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42707      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42708    else
42709      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42710    fi
42711
42712    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42713    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42714      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42715    fi
42716  fi
42717
42718
42719
42720
42721
42722
42723
42724  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42725  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42726  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42727  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42728
42729
42730
42731
42732
42733
42734
42735  # Some Zero and Shark settings.
42736  # ZERO_ARCHFLAG tells the compiler which mode to build for
42737  case "${OPENJDK_TARGET_CPU}" in
42738    s390)
42739      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42740      ;;
42741    *)
42742      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42743  esac
42744
42745  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42746$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42747  supports=yes
42748
42749  saved_cflags="$CFLAGS"
42750  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42751  ac_ext=c
42752ac_cpp='$CPP $CPPFLAGS'
42753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42755ac_compiler_gnu=$ac_cv_c_compiler_gnu
42756
42757  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42758/* end confdefs.h.  */
42759int i;
42760_ACEOF
42761if ac_fn_c_try_compile "$LINENO"; then :
42762
42763else
42764  supports=no
42765fi
42766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42767  ac_ext=cpp
42768ac_cpp='$CXXCPP $CPPFLAGS'
42769ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42770ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42771ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42772
42773  CFLAGS="$saved_cflags"
42774
42775  saved_cxxflags="$CXXFLAGS"
42776  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42777  ac_ext=cpp
42778ac_cpp='$CXXCPP $CPPFLAGS'
42779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42782
42783  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42784/* end confdefs.h.  */
42785int i;
42786_ACEOF
42787if ac_fn_cxx_try_compile "$LINENO"; then :
42788
42789else
42790  supports=no
42791fi
42792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42793  ac_ext=cpp
42794ac_cpp='$CXXCPP $CPPFLAGS'
42795ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42796ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42797ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42798
42799  CXXFLAGS="$saved_cxxflags"
42800
42801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42802$as_echo "$supports" >&6; }
42803  if test "x$supports" = "xyes" ; then
42804    :
42805  else
42806    ZERO_ARCHFLAG=""
42807  fi
42808
42809
42810
42811  # Check that the compiler supports -mX (or -qX on AIX) flags
42812  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42813
42814  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42815$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42816  supports=yes
42817
42818  saved_cflags="$CFLAGS"
42819  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42820  ac_ext=c
42821ac_cpp='$CPP $CPPFLAGS'
42822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42824ac_compiler_gnu=$ac_cv_c_compiler_gnu
42825
42826  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42827/* end confdefs.h.  */
42828int i;
42829_ACEOF
42830if ac_fn_c_try_compile "$LINENO"; then :
42831
42832else
42833  supports=no
42834fi
42835rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42836  ac_ext=cpp
42837ac_cpp='$CXXCPP $CPPFLAGS'
42838ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42839ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42840ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42841
42842  CFLAGS="$saved_cflags"
42843
42844  saved_cxxflags="$CXXFLAGS"
42845  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42846  ac_ext=cpp
42847ac_cpp='$CXXCPP $CPPFLAGS'
42848ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42849ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42850ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42851
42852  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42853/* end confdefs.h.  */
42854int i;
42855_ACEOF
42856if ac_fn_cxx_try_compile "$LINENO"; then :
42857
42858else
42859  supports=no
42860fi
42861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42862  ac_ext=cpp
42863ac_cpp='$CXXCPP $CPPFLAGS'
42864ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42865ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42866ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42867
42868  CXXFLAGS="$saved_cxxflags"
42869
42870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42871$as_echo "$supports" >&6; }
42872  if test "x$supports" = "xyes" ; then
42873    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42874  else
42875    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42876  fi
42877
42878
42879
42880  case "${TOOLCHAIN_TYPE}" in
42881    microsoft)
42882      DISABLE_WARNING_PREFIX="-wd"
42883      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42884      ;;
42885    solstudio)
42886      DISABLE_WARNING_PREFIX="-erroff="
42887      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42888      ;;
42889    gcc)
42890      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42891
42892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42893$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42894  supports=yes
42895
42896  saved_cflags="$CFLAGS"
42897  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42898  ac_ext=c
42899ac_cpp='$CPP $CPPFLAGS'
42900ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42901ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42902ac_compiler_gnu=$ac_cv_c_compiler_gnu
42903
42904  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42905/* end confdefs.h.  */
42906int i;
42907_ACEOF
42908if ac_fn_c_try_compile "$LINENO"; then :
42909
42910else
42911  supports=no
42912fi
42913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42914  ac_ext=cpp
42915ac_cpp='$CXXCPP $CPPFLAGS'
42916ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42917ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42918ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42919
42920  CFLAGS="$saved_cflags"
42921
42922  saved_cxxflags="$CXXFLAGS"
42923  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42924  ac_ext=cpp
42925ac_cpp='$CXXCPP $CPPFLAGS'
42926ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42927ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42928ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42929
42930  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42931/* end confdefs.h.  */
42932int i;
42933_ACEOF
42934if ac_fn_cxx_try_compile "$LINENO"; then :
42935
42936else
42937  supports=no
42938fi
42939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42940  ac_ext=cpp
42941ac_cpp='$CXXCPP $CPPFLAGS'
42942ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42943ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42944ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42945
42946  CXXFLAGS="$saved_cxxflags"
42947
42948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42949$as_echo "$supports" >&6; }
42950  if test "x$supports" = "xyes" ; then
42951    GCC_CAN_DISABLE_WARNINGS=true
42952  else
42953    GCC_CAN_DISABLE_WARNINGS=false
42954
42955  fi
42956
42957      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42958        DISABLE_WARNING_PREFIX="-Wno-"
42959      else
42960        DISABLE_WARNING_PREFIX=
42961      fi
42962      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42963      ;;
42964    clang)
42965      DISABLE_WARNING_PREFIX="-Wno-"
42966      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42967      ;;
42968  esac
42969
42970
42971
42972
42973# Setup debug symbols (need objcopy from the toolchain for that)
42974
42975  #
42976  # ENABLE_DEBUG_SYMBOLS
42977  # This must be done after the toolchain is setup, since we're looking at objcopy.
42978  #
42979  # Check whether --enable-debug-symbols was given.
42980if test "${enable_debug_symbols+set}" = set; then :
42981  enableval=$enable_debug_symbols;
42982fi
42983
42984
42985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42986$as_echo_n "checking if we should generate debug symbols... " >&6; }
42987
42988  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42989    # explicit enabling of enable-debug-symbols and can't find objcopy
42990    #   this is an error
42991    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42992  fi
42993
42994  if test "x$enable_debug_symbols" = "xyes"; then
42995    ENABLE_DEBUG_SYMBOLS=true
42996  elif test "x$enable_debug_symbols" = "xno"; then
42997    ENABLE_DEBUG_SYMBOLS=false
42998  else
42999    # Default is on if objcopy is found
43000    if test "x$OBJCOPY" != x; then
43001      ENABLE_DEBUG_SYMBOLS=true
43002    # MacOS X and Windows don't use objcopy but default is on for those OSes
43003    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43004      ENABLE_DEBUG_SYMBOLS=true
43005    else
43006      ENABLE_DEBUG_SYMBOLS=false
43007    fi
43008  fi
43009
43010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43011$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43012
43013  #
43014  # ZIP_DEBUGINFO_FILES
43015  #
43016  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43017$as_echo_n "checking if we should zip debug-info files... " >&6; }
43018  # Check whether --enable-zip-debug-info was given.
43019if test "${enable_zip_debug_info+set}" = set; then :
43020  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43021else
43022  enable_zip_debug_info="yes"
43023fi
43024
43025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43026$as_echo "${enable_zip_debug_info}" >&6; }
43027
43028  if test "x${enable_zip_debug_info}" = "xno"; then
43029    ZIP_DEBUGINFO_FILES=false
43030  else
43031    ZIP_DEBUGINFO_FILES=true
43032  fi
43033
43034
43035
43036
43037
43038  # Check whether --enable-native-coverage was given.
43039if test "${enable_native_coverage+set}" = set; then :
43040  enableval=$enable_native_coverage;
43041fi
43042
43043  GCOV_ENABLED="false"
43044  if test "x$enable_native_coverage" = "xyes"; then
43045    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43046      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43047$as_echo_n "checking if native coverage is enabled... " >&6; }
43048      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43049$as_echo "yes" >&6; }
43050      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43051      GCOV_LDFLAGS="-fprofile-arcs"
43052      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43053      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43054      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43055      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43056      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43057      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43058      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43059      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43060      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43061      GCOV_ENABLED="true"
43062    else
43063      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43064    fi
43065  elif test "x$enable_native_coverage" = "xno"; then
43066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43067$as_echo_n "checking if native coverage is enabled... " >&6; }
43068    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43069$as_echo "no" >&6; }
43070  elif test "x$enable_native_coverage" != "x"; then
43071    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43072  fi
43073
43074
43075
43076
43077###############################################################################
43078#
43079# Check dependencies for external and internal libraries.
43080#
43081###############################################################################
43082
43083# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43084
43085  # When using cygwin or msys, we need a wrapper binary that renames
43086  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43087  # @files and rewrites these too! This wrapper binary is
43088  # called fixpath.
43089  FIXPATH=
43090  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43092$as_echo_n "checking if fixpath can be created... " >&6; }
43093    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43094    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43095    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43096      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43097      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43098      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43099      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43100    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43101      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43102      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43103
43104      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43105      # @ was chosen as separator to minimize risk of other tools messing around with it
43106      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43107      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43108
43109      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43110    fi
43111    rm -f $OUTPUT_ROOT/fixpath*
43112    cd $OUTPUT_ROOT
43113    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43114    cd $CURDIR
43115
43116    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43117      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43118$as_echo "no" >&6; }
43119      cat $OUTPUT_ROOT/fixpath1.log
43120      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43121    fi
43122    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43123$as_echo "yes" >&6; }
43124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43125$as_echo_n "checking if fixpath.exe works... " >&6; }
43126    cd $OUTPUT_ROOT
43127    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43128    cd $CURDIR
43129    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43131$as_echo "no" >&6; }
43132      cat $OUTPUT_ROOT/fixpath2.log
43133      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43134    fi
43135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43136$as_echo "yes" >&6; }
43137    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43138  fi
43139
43140
43141
43142
43143
43144
43145  ###############################################################################
43146  #
43147  # OS specific settings that we never will need to probe.
43148  #
43149  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43150    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43151$as_echo_n "checking what is not needed on Linux?... " >&6; }
43152    PULSE_NOT_NEEDED=yes
43153    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43154$as_echo "pulse" >&6; }
43155  fi
43156
43157  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43159$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43160    ALSA_NOT_NEEDED=yes
43161    PULSE_NOT_NEEDED=yes
43162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43163$as_echo "alsa pulse" >&6; }
43164  fi
43165
43166  if test "x$OPENJDK_TARGET_OS" = xaix; then
43167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43168$as_echo_n "checking what is not needed on AIX?... " >&6; }
43169    ALSA_NOT_NEEDED=yes
43170    PULSE_NOT_NEEDED=yes
43171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43172$as_echo "alsa pulse" >&6; }
43173  fi
43174
43175
43176  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43178$as_echo_n "checking what is not needed on Windows?... " >&6; }
43179    CUPS_NOT_NEEDED=yes
43180    ALSA_NOT_NEEDED=yes
43181    PULSE_NOT_NEEDED=yes
43182    X11_NOT_NEEDED=yes
43183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43184$as_echo "alsa cups pulse x11" >&6; }
43185  fi
43186
43187  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43189$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43190    ALSA_NOT_NEEDED=yes
43191    PULSE_NOT_NEEDED=yes
43192    X11_NOT_NEEDED=yes
43193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43194$as_echo "alsa pulse x11" >&6; }
43195  fi
43196
43197  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43199$as_echo_n "checking what is not needed on bsd?... " >&6; }
43200    ALSA_NOT_NEEDED=yes
43201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43202$as_echo "alsa" >&6; }
43203  fi
43204
43205  if test "x$OPENJDK" = "xfalse"; then
43206    FREETYPE_NOT_NEEDED=yes
43207  fi
43208
43209  if test "x$SUPPORT_HEADFUL" = xno; then
43210    X11_NOT_NEEDED=yes
43211  fi
43212
43213
43214
43215  ###############################################################################
43216  #
43217  # Check for X Windows
43218  #
43219
43220  if test "x$X11_NOT_NEEDED" = xyes; then
43221    if test "x${with_x}" != x; then
43222      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43223$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43224    fi
43225    X_CFLAGS=
43226    X_LIBS=
43227  else
43228    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43229    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43230    # --x-libraries for the sysroot, if that seems to be correct.
43231    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43232      if test "x$SYSROOT" != "x"; then
43233        if test "x$x_includes" = xNONE; then
43234          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43235            x_includes="$SYSROOT/usr/X11R6/include"
43236          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43237            x_includes="$SYSROOT/usr/include"
43238          fi
43239        fi
43240        if test "x$x_libraries" = xNONE; then
43241          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43242            x_libraries="$SYSROOT/usr/X11R6/lib"
43243          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43244            x_libraries="$SYSROOT/usr/lib64"
43245          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43246            x_libraries="$SYSROOT/usr/lib"
43247          fi
43248        fi
43249      fi
43250    fi
43251
43252    # Now let autoconf do it's magic
43253    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43254$as_echo_n "checking for X... " >&6; }
43255
43256
43257# Check whether --with-x was given.
43258if test "${with_x+set}" = set; then :
43259  withval=$with_x;
43260fi
43261
43262# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43263if test "x$with_x" = xno; then
43264  # The user explicitly disabled X.
43265  have_x=disabled
43266else
43267  case $x_includes,$x_libraries in #(
43268    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43269    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43270  $as_echo_n "(cached) " >&6
43271else
43272  # One or both of the vars are not set, and there is no cached value.
43273ac_x_includes=no ac_x_libraries=no
43274rm -f -r conftest.dir
43275if mkdir conftest.dir; then
43276  cd conftest.dir
43277  cat >Imakefile <<'_ACEOF'
43278incroot:
43279	@echo incroot='${INCROOT}'
43280usrlibdir:
43281	@echo usrlibdir='${USRLIBDIR}'
43282libdir:
43283	@echo libdir='${LIBDIR}'
43284_ACEOF
43285  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43286    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43287    for ac_var in incroot usrlibdir libdir; do
43288      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43289    done
43290    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43291    for ac_extension in a so sl dylib la dll; do
43292      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43293	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43294	ac_im_usrlibdir=$ac_im_libdir; break
43295      fi
43296    done
43297    # Screen out bogus values from the imake configuration.  They are
43298    # bogus both because they are the default anyway, and because
43299    # using them would break gcc on systems where it needs fixed includes.
43300    case $ac_im_incroot in
43301	/usr/include) ac_x_includes= ;;
43302	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43303    esac
43304    case $ac_im_usrlibdir in
43305	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43306	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43307    esac
43308  fi
43309  cd ..
43310  rm -f -r conftest.dir
43311fi
43312
43313# Standard set of common directories for X headers.
43314# Check X11 before X11Rn because it is often a symlink to the current release.
43315ac_x_header_dirs='
43316/usr/X11/include
43317/usr/X11R7/include
43318/usr/X11R6/include
43319/usr/X11R5/include
43320/usr/X11R4/include
43321
43322/usr/include/X11
43323/usr/include/X11R7
43324/usr/include/X11R6
43325/usr/include/X11R5
43326/usr/include/X11R4
43327
43328/usr/local/X11/include
43329/usr/local/X11R7/include
43330/usr/local/X11R6/include
43331/usr/local/X11R5/include
43332/usr/local/X11R4/include
43333
43334/usr/local/include/X11
43335/usr/local/include/X11R7
43336/usr/local/include/X11R6
43337/usr/local/include/X11R5
43338/usr/local/include/X11R4
43339
43340/usr/X386/include
43341/usr/x386/include
43342/usr/XFree86/include/X11
43343
43344/usr/include
43345/usr/local/include
43346/usr/unsupported/include
43347/usr/athena/include
43348/usr/local/x11r5/include
43349/usr/lpp/Xamples/include
43350
43351/usr/openwin/include
43352/usr/openwin/share/include'
43353
43354if test "$ac_x_includes" = no; then
43355  # Guess where to find include files, by looking for Xlib.h.
43356  # First, try using that file with no special directory specified.
43357  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43358/* end confdefs.h.  */
43359#include <X11/Xlib.h>
43360_ACEOF
43361if ac_fn_cxx_try_cpp "$LINENO"; then :
43362  # We can compile using X headers with no special include directory.
43363ac_x_includes=
43364else
43365  for ac_dir in $ac_x_header_dirs; do
43366  if test -r "$ac_dir/X11/Xlib.h"; then
43367    ac_x_includes=$ac_dir
43368    break
43369  fi
43370done
43371fi
43372rm -f conftest.err conftest.i conftest.$ac_ext
43373fi # $ac_x_includes = no
43374
43375if test "$ac_x_libraries" = no; then
43376  # Check for the libraries.
43377  # See if we find them without any special options.
43378  # Don't add to $LIBS permanently.
43379  ac_save_LIBS=$LIBS
43380  LIBS="-lX11 $LIBS"
43381  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43382/* end confdefs.h.  */
43383#include <X11/Xlib.h>
43384int
43385main ()
43386{
43387XrmInitialize ()
43388  ;
43389  return 0;
43390}
43391_ACEOF
43392if ac_fn_cxx_try_link "$LINENO"; then :
43393  LIBS=$ac_save_LIBS
43394# We can link X programs with no special library path.
43395ac_x_libraries=
43396else
43397  LIBS=$ac_save_LIBS
43398for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43399do
43400  # Don't even attempt the hair of trying to link an X program!
43401  for ac_extension in a so sl dylib la dll; do
43402    if test -r "$ac_dir/libX11.$ac_extension"; then
43403      ac_x_libraries=$ac_dir
43404      break 2
43405    fi
43406  done
43407done
43408fi
43409rm -f core conftest.err conftest.$ac_objext \
43410    conftest$ac_exeext conftest.$ac_ext
43411fi # $ac_x_libraries = no
43412
43413case $ac_x_includes,$ac_x_libraries in #(
43414  no,* | *,no | *\'*)
43415    # Didn't find X, or a directory has "'" in its name.
43416    ac_cv_have_x="have_x=no";; #(
43417  *)
43418    # Record where we found X for the cache.
43419    ac_cv_have_x="have_x=yes\
43420	ac_x_includes='$ac_x_includes'\
43421	ac_x_libraries='$ac_x_libraries'"
43422esac
43423fi
43424;; #(
43425    *) have_x=yes;;
43426  esac
43427  eval "$ac_cv_have_x"
43428fi # $with_x != no
43429
43430if test "$have_x" != yes; then
43431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43432$as_echo "$have_x" >&6; }
43433  no_x=yes
43434else
43435  # If each of the values was on the command line, it overrides each guess.
43436  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43437  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43438  # Update the cache value to reflect the command line values.
43439  ac_cv_have_x="have_x=yes\
43440	ac_x_includes='$x_includes'\
43441	ac_x_libraries='$x_libraries'"
43442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43443$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43444fi
43445
43446    if test "$no_x" = yes; then
43447  # Not all programs may use this symbol, but it does not hurt to define it.
43448
43449$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43450
43451  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43452else
43453  if test -n "$x_includes"; then
43454    X_CFLAGS="$X_CFLAGS -I$x_includes"
43455  fi
43456
43457  # It would also be nice to do this for all -L options, not just this one.
43458  if test -n "$x_libraries"; then
43459    X_LIBS="$X_LIBS -L$x_libraries"
43460    # For Solaris; some versions of Sun CC require a space after -R and
43461    # others require no space.  Words are not sufficient . . . .
43462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43463$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43464    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43465    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43466    ac_cxx_werror_flag=yes
43467    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43468/* end confdefs.h.  */
43469
43470int
43471main ()
43472{
43473
43474  ;
43475  return 0;
43476}
43477_ACEOF
43478if ac_fn_cxx_try_link "$LINENO"; then :
43479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43480$as_echo "no" >&6; }
43481       X_LIBS="$X_LIBS -R$x_libraries"
43482else
43483  LIBS="$ac_xsave_LIBS -R $x_libraries"
43484       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43485/* end confdefs.h.  */
43486
43487int
43488main ()
43489{
43490
43491  ;
43492  return 0;
43493}
43494_ACEOF
43495if ac_fn_cxx_try_link "$LINENO"; then :
43496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43497$as_echo "yes" >&6; }
43498	  X_LIBS="$X_LIBS -R $x_libraries"
43499else
43500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43501$as_echo "neither works" >&6; }
43502fi
43503rm -f core conftest.err conftest.$ac_objext \
43504    conftest$ac_exeext conftest.$ac_ext
43505fi
43506rm -f core conftest.err conftest.$ac_objext \
43507    conftest$ac_exeext conftest.$ac_ext
43508    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43509    LIBS=$ac_xsave_LIBS
43510  fi
43511
43512  # Check for system-dependent libraries X programs must link with.
43513  # Do this before checking for the system-independent R6 libraries
43514  # (-lICE), since we may need -lsocket or whatever for X linking.
43515
43516  if test "$ISC" = yes; then
43517    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43518  else
43519    # Martyn Johnson says this is needed for Ultrix, if the X
43520    # libraries were built with DECnet support.  And Karl Berry says
43521    # the Alpha needs dnet_stub (dnet does not exist).
43522    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43523    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43524/* end confdefs.h.  */
43525
43526/* Override any GCC internal prototype to avoid an error.
43527   Use char because int might match the return type of a GCC
43528   builtin and then its argument prototype would still apply.  */
43529#ifdef __cplusplus
43530extern "C"
43531#endif
43532char XOpenDisplay ();
43533int
43534main ()
43535{
43536return XOpenDisplay ();
43537  ;
43538  return 0;
43539}
43540_ACEOF
43541if ac_fn_cxx_try_link "$LINENO"; then :
43542
43543else
43544  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43545$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43546if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43547  $as_echo_n "(cached) " >&6
43548else
43549  ac_check_lib_save_LIBS=$LIBS
43550LIBS="-ldnet  $LIBS"
43551cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43552/* end confdefs.h.  */
43553
43554/* Override any GCC internal prototype to avoid an error.
43555   Use char because int might match the return type of a GCC
43556   builtin and then its argument prototype would still apply.  */
43557#ifdef __cplusplus
43558extern "C"
43559#endif
43560char dnet_ntoa ();
43561int
43562main ()
43563{
43564return dnet_ntoa ();
43565  ;
43566  return 0;
43567}
43568_ACEOF
43569if ac_fn_cxx_try_link "$LINENO"; then :
43570  ac_cv_lib_dnet_dnet_ntoa=yes
43571else
43572  ac_cv_lib_dnet_dnet_ntoa=no
43573fi
43574rm -f core conftest.err conftest.$ac_objext \
43575    conftest$ac_exeext conftest.$ac_ext
43576LIBS=$ac_check_lib_save_LIBS
43577fi
43578{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43579$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43580if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43581  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43582fi
43583
43584    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43585      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43586$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43587if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43588  $as_echo_n "(cached) " >&6
43589else
43590  ac_check_lib_save_LIBS=$LIBS
43591LIBS="-ldnet_stub  $LIBS"
43592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43593/* end confdefs.h.  */
43594
43595/* Override any GCC internal prototype to avoid an error.
43596   Use char because int might match the return type of a GCC
43597   builtin and then its argument prototype would still apply.  */
43598#ifdef __cplusplus
43599extern "C"
43600#endif
43601char dnet_ntoa ();
43602int
43603main ()
43604{
43605return dnet_ntoa ();
43606  ;
43607  return 0;
43608}
43609_ACEOF
43610if ac_fn_cxx_try_link "$LINENO"; then :
43611  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43612else
43613  ac_cv_lib_dnet_stub_dnet_ntoa=no
43614fi
43615rm -f core conftest.err conftest.$ac_objext \
43616    conftest$ac_exeext conftest.$ac_ext
43617LIBS=$ac_check_lib_save_LIBS
43618fi
43619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43620$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43621if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43622  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43623fi
43624
43625    fi
43626fi
43627rm -f core conftest.err conftest.$ac_objext \
43628    conftest$ac_exeext conftest.$ac_ext
43629    LIBS="$ac_xsave_LIBS"
43630
43631    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43632    # to get the SysV transport functions.
43633    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43634    # needs -lnsl.
43635    # The nsl library prevents programs from opening the X display
43636    # on Irix 5.2, according to T.E. Dickey.
43637    # The functions gethostbyname, getservbyname, and inet_addr are
43638    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43639    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43640if test "x$ac_cv_func_gethostbyname" = xyes; then :
43641
43642fi
43643
43644    if test $ac_cv_func_gethostbyname = no; then
43645      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43646$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43647if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43648  $as_echo_n "(cached) " >&6
43649else
43650  ac_check_lib_save_LIBS=$LIBS
43651LIBS="-lnsl  $LIBS"
43652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43653/* end confdefs.h.  */
43654
43655/* Override any GCC internal prototype to avoid an error.
43656   Use char because int might match the return type of a GCC
43657   builtin and then its argument prototype would still apply.  */
43658#ifdef __cplusplus
43659extern "C"
43660#endif
43661char gethostbyname ();
43662int
43663main ()
43664{
43665return gethostbyname ();
43666  ;
43667  return 0;
43668}
43669_ACEOF
43670if ac_fn_cxx_try_link "$LINENO"; then :
43671  ac_cv_lib_nsl_gethostbyname=yes
43672else
43673  ac_cv_lib_nsl_gethostbyname=no
43674fi
43675rm -f core conftest.err conftest.$ac_objext \
43676    conftest$ac_exeext conftest.$ac_ext
43677LIBS=$ac_check_lib_save_LIBS
43678fi
43679{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43680$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43681if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43682  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43683fi
43684
43685      if test $ac_cv_lib_nsl_gethostbyname = no; then
43686	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43687$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43688if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43689  $as_echo_n "(cached) " >&6
43690else
43691  ac_check_lib_save_LIBS=$LIBS
43692LIBS="-lbsd  $LIBS"
43693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43694/* end confdefs.h.  */
43695
43696/* Override any GCC internal prototype to avoid an error.
43697   Use char because int might match the return type of a GCC
43698   builtin and then its argument prototype would still apply.  */
43699#ifdef __cplusplus
43700extern "C"
43701#endif
43702char gethostbyname ();
43703int
43704main ()
43705{
43706return gethostbyname ();
43707  ;
43708  return 0;
43709}
43710_ACEOF
43711if ac_fn_cxx_try_link "$LINENO"; then :
43712  ac_cv_lib_bsd_gethostbyname=yes
43713else
43714  ac_cv_lib_bsd_gethostbyname=no
43715fi
43716rm -f core conftest.err conftest.$ac_objext \
43717    conftest$ac_exeext conftest.$ac_ext
43718LIBS=$ac_check_lib_save_LIBS
43719fi
43720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43721$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43722if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43723  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43724fi
43725
43726      fi
43727    fi
43728
43729    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43730    # socket/setsockopt and other routines are undefined under SCO ODT
43731    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43732    # on later versions), says Simon Leinen: it contains gethostby*
43733    # variants that don't use the name server (or something).  -lsocket
43734    # must be given before -lnsl if both are needed.  We assume that
43735    # if connect needs -lnsl, so does gethostbyname.
43736    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43737if test "x$ac_cv_func_connect" = xyes; then :
43738
43739fi
43740
43741    if test $ac_cv_func_connect = no; then
43742      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43743$as_echo_n "checking for connect in -lsocket... " >&6; }
43744if ${ac_cv_lib_socket_connect+:} false; then :
43745  $as_echo_n "(cached) " >&6
43746else
43747  ac_check_lib_save_LIBS=$LIBS
43748LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43749cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43750/* end confdefs.h.  */
43751
43752/* Override any GCC internal prototype to avoid an error.
43753   Use char because int might match the return type of a GCC
43754   builtin and then its argument prototype would still apply.  */
43755#ifdef __cplusplus
43756extern "C"
43757#endif
43758char connect ();
43759int
43760main ()
43761{
43762return connect ();
43763  ;
43764  return 0;
43765}
43766_ACEOF
43767if ac_fn_cxx_try_link "$LINENO"; then :
43768  ac_cv_lib_socket_connect=yes
43769else
43770  ac_cv_lib_socket_connect=no
43771fi
43772rm -f core conftest.err conftest.$ac_objext \
43773    conftest$ac_exeext conftest.$ac_ext
43774LIBS=$ac_check_lib_save_LIBS
43775fi
43776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43777$as_echo "$ac_cv_lib_socket_connect" >&6; }
43778if test "x$ac_cv_lib_socket_connect" = xyes; then :
43779  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43780fi
43781
43782    fi
43783
43784    # Guillermo Gomez says -lposix is necessary on A/UX.
43785    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43786if test "x$ac_cv_func_remove" = xyes; then :
43787
43788fi
43789
43790    if test $ac_cv_func_remove = no; then
43791      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43792$as_echo_n "checking for remove in -lposix... " >&6; }
43793if ${ac_cv_lib_posix_remove+:} false; then :
43794  $as_echo_n "(cached) " >&6
43795else
43796  ac_check_lib_save_LIBS=$LIBS
43797LIBS="-lposix  $LIBS"
43798cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43799/* end confdefs.h.  */
43800
43801/* Override any GCC internal prototype to avoid an error.
43802   Use char because int might match the return type of a GCC
43803   builtin and then its argument prototype would still apply.  */
43804#ifdef __cplusplus
43805extern "C"
43806#endif
43807char remove ();
43808int
43809main ()
43810{
43811return remove ();
43812  ;
43813  return 0;
43814}
43815_ACEOF
43816if ac_fn_cxx_try_link "$LINENO"; then :
43817  ac_cv_lib_posix_remove=yes
43818else
43819  ac_cv_lib_posix_remove=no
43820fi
43821rm -f core conftest.err conftest.$ac_objext \
43822    conftest$ac_exeext conftest.$ac_ext
43823LIBS=$ac_check_lib_save_LIBS
43824fi
43825{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43826$as_echo "$ac_cv_lib_posix_remove" >&6; }
43827if test "x$ac_cv_lib_posix_remove" = xyes; then :
43828  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43829fi
43830
43831    fi
43832
43833    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43834    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43835if test "x$ac_cv_func_shmat" = xyes; then :
43836
43837fi
43838
43839    if test $ac_cv_func_shmat = no; then
43840      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43841$as_echo_n "checking for shmat in -lipc... " >&6; }
43842if ${ac_cv_lib_ipc_shmat+:} false; then :
43843  $as_echo_n "(cached) " >&6
43844else
43845  ac_check_lib_save_LIBS=$LIBS
43846LIBS="-lipc  $LIBS"
43847cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43848/* end confdefs.h.  */
43849
43850/* Override any GCC internal prototype to avoid an error.
43851   Use char because int might match the return type of a GCC
43852   builtin and then its argument prototype would still apply.  */
43853#ifdef __cplusplus
43854extern "C"
43855#endif
43856char shmat ();
43857int
43858main ()
43859{
43860return shmat ();
43861  ;
43862  return 0;
43863}
43864_ACEOF
43865if ac_fn_cxx_try_link "$LINENO"; then :
43866  ac_cv_lib_ipc_shmat=yes
43867else
43868  ac_cv_lib_ipc_shmat=no
43869fi
43870rm -f core conftest.err conftest.$ac_objext \
43871    conftest$ac_exeext conftest.$ac_ext
43872LIBS=$ac_check_lib_save_LIBS
43873fi
43874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43875$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43876if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43877  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43878fi
43879
43880    fi
43881  fi
43882
43883  # Check for libraries that X11R6 Xt/Xaw programs need.
43884  ac_save_LDFLAGS=$LDFLAGS
43885  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43886  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43887  # check for ICE first), but we must link in the order -lSM -lICE or
43888  # we get undefined symbols.  So assume we have SM if we have ICE.
43889  # These have to be linked with before -lX11, unlike the other
43890  # libraries we check for below, so use a different variable.
43891  # John Interrante, Karl Berry
43892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43893$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43894if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43895  $as_echo_n "(cached) " >&6
43896else
43897  ac_check_lib_save_LIBS=$LIBS
43898LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43900/* end confdefs.h.  */
43901
43902/* Override any GCC internal prototype to avoid an error.
43903   Use char because int might match the return type of a GCC
43904   builtin and then its argument prototype would still apply.  */
43905#ifdef __cplusplus
43906extern "C"
43907#endif
43908char IceConnectionNumber ();
43909int
43910main ()
43911{
43912return IceConnectionNumber ();
43913  ;
43914  return 0;
43915}
43916_ACEOF
43917if ac_fn_cxx_try_link "$LINENO"; then :
43918  ac_cv_lib_ICE_IceConnectionNumber=yes
43919else
43920  ac_cv_lib_ICE_IceConnectionNumber=no
43921fi
43922rm -f core conftest.err conftest.$ac_objext \
43923    conftest$ac_exeext conftest.$ac_ext
43924LIBS=$ac_check_lib_save_LIBS
43925fi
43926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43927$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43928if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43929  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43930fi
43931
43932  LDFLAGS=$ac_save_LDFLAGS
43933
43934fi
43935
43936
43937    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43938    # this doesn't make sense so we remove it.
43939    if test "x$COMPILE_TYPE" = xcross; then
43940      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43941    fi
43942
43943    if test "x$no_x" = xyes; then
43944
43945  # Print a helpful message on how to acquire the necessary build dependency.
43946  # x11 is the help tag: freetype, cups, pulse, alsa etc
43947  MISSING_DEPENDENCY=x11
43948
43949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43950    cygwin_help $MISSING_DEPENDENCY
43951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43952    msys_help $MISSING_DEPENDENCY
43953  else
43954    PKGHANDLER_COMMAND=
43955
43956    case $PKGHANDLER in
43957      apt-get)
43958        apt_help     $MISSING_DEPENDENCY ;;
43959      yum)
43960        yum_help     $MISSING_DEPENDENCY ;;
43961      port)
43962        port_help    $MISSING_DEPENDENCY ;;
43963      pkgutil)
43964        pkgutil_help $MISSING_DEPENDENCY ;;
43965      pkgadd)
43966        pkgadd_help  $MISSING_DEPENDENCY ;;
43967    esac
43968
43969    if test "x$PKGHANDLER_COMMAND" != x; then
43970      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43971    fi
43972  fi
43973
43974      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43975    fi
43976
43977    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43978      OPENWIN_HOME="/usr/openwin"
43979      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43980      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43981          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43982          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43983          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43984    fi
43985
43986    ac_ext=c
43987ac_cpp='$CPP $CPPFLAGS'
43988ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43989ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43990ac_compiler_gnu=$ac_cv_c_compiler_gnu
43991
43992    OLD_CFLAGS="$CFLAGS"
43993    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43994
43995    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43996    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43997do :
43998  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43999ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44000          # include <X11/Xlib.h>
44001          # include <X11/Xutil.h>
44002
44003
44004"
44005if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44006  cat >>confdefs.h <<_ACEOF
44007#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44008_ACEOF
44009 X11_HEADERS_OK=yes
44010else
44011  X11_HEADERS_OK=no; break
44012fi
44013
44014done
44015
44016
44017    if test "x$X11_HEADERS_OK" = xno; then
44018
44019  # Print a helpful message on how to acquire the necessary build dependency.
44020  # x11 is the help tag: freetype, cups, pulse, alsa etc
44021  MISSING_DEPENDENCY=x11
44022
44023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44024    cygwin_help $MISSING_DEPENDENCY
44025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44026    msys_help $MISSING_DEPENDENCY
44027  else
44028    PKGHANDLER_COMMAND=
44029
44030    case $PKGHANDLER in
44031      apt-get)
44032        apt_help     $MISSING_DEPENDENCY ;;
44033      yum)
44034        yum_help     $MISSING_DEPENDENCY ;;
44035      port)
44036        port_help    $MISSING_DEPENDENCY ;;
44037      pkgutil)
44038        pkgutil_help $MISSING_DEPENDENCY ;;
44039      pkgadd)
44040        pkgadd_help  $MISSING_DEPENDENCY ;;
44041    esac
44042
44043    if test "x$PKGHANDLER_COMMAND" != x; then
44044      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44045    fi
44046  fi
44047
44048      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44049    fi
44050
44051    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44052    # defined in libawt_xawt.
44053    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44054$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44055    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44056/* end confdefs.h.  */
44057#include <X11/extensions/Xrender.h>
44058int
44059main ()
44060{
44061XLinearGradient x;
44062  ;
44063  return 0;
44064}
44065_ACEOF
44066if ac_fn_c_try_compile "$LINENO"; then :
44067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44068$as_echo "yes" >&6; }
44069else
44070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44071$as_echo "no" >&6; }
44072         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44073fi
44074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44075
44076    CFLAGS="$OLD_CFLAGS"
44077    ac_ext=cpp
44078ac_cpp='$CXXCPP $CPPFLAGS'
44079ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44080ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44081ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44082
44083  fi # X11_NOT_NEEDED
44084
44085
44086
44087
44088
44089
44090  ###############################################################################
44091  #
44092  # The common unix printing system cups is used to print from java.
44093  #
44094
44095# Check whether --with-cups was given.
44096if test "${with_cups+set}" = set; then :
44097  withval=$with_cups;
44098fi
44099
44100
44101# Check whether --with-cups-include was given.
44102if test "${with_cups_include+set}" = set; then :
44103  withval=$with_cups_include;
44104fi
44105
44106
44107  if test "x$CUPS_NOT_NEEDED" = xyes; then
44108    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44109      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44110$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44111    fi
44112    CUPS_CFLAGS=
44113  else
44114    CUPS_FOUND=no
44115
44116    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44117      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44118    fi
44119
44120    if test "x${with_cups}" != x; then
44121      CUPS_CFLAGS="-I${with_cups}/include"
44122      CUPS_FOUND=yes
44123    fi
44124    if test "x${with_cups_include}" != x; then
44125      CUPS_CFLAGS="-I${with_cups_include}"
44126      CUPS_FOUND=yes
44127    fi
44128    if test "x$CUPS_FOUND" = xno; then
44129
44130
44131  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44132    # Source the builddeps file again, to make sure it uses the latest variables!
44133    . $builddepsfile
44134    # Look for a target and build machine specific resource!
44135    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44136    if test "x$resource" = x; then
44137      # Ok, lets instead look for a target specific resource
44138      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44139    fi
44140    if test "x$resource" = x; then
44141      # Ok, lets instead look for a build specific resource
44142      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44143    fi
44144    if test "x$resource" = x; then
44145      # Ok, lets instead look for a generic resource
44146      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44147      resource=${builddep_cups}
44148    fi
44149    if test "x$resource" != x; then
44150      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44151$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44152      # If the resource in the builddeps.conf file is an existing directory,
44153      # for example /java/linux/cups
44154      if test -d ${resource}; then
44155        depdir=${resource}
44156      else
44157
44158  # cups is for example mymodule
44159  # $resource is for example libs/general/libmymod_1_2_3.zip
44160  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44161  # $with_builddeps_dir is for example /localhome/builddeps
44162  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44163  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44164  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44165  filename=`basename $resource`
44166  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44167  filebase=${filename%%.*}
44168  extension=${filename#*.}
44169  installdir=$with_builddeps_dir/$filebase
44170  if test ! -f $installdir/$filename.unpacked; then
44171    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44172$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44173    if test ! -d $installdir; then
44174      mkdir -p $installdir
44175    fi
44176    if test ! -d $installdir; then
44177      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44178    fi
44179    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44180    touch $tmpfile
44181    if test ! -f $tmpfile; then
44182      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44183    fi
44184
44185  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44186  # $tmpfile is the local file name for the downloaded file.
44187  VALID_TOOL=no
44188  if test "x$BDEPS_FTP" = xwget; then
44189    VALID_TOOL=yes
44190    wget -O $tmpfile $with_builddeps_server/$resource
44191  fi
44192  if test "x$BDEPS_FTP" = xlftp; then
44193    VALID_TOOL=yes
44194    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44195  fi
44196  if test "x$BDEPS_FTP" = xftp; then
44197    VALID_TOOL=yes
44198    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44199    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44200    FTPUSERPWD=${FTPSERVER%%@*}
44201    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44202      FTPUSER=${userpwd%%:*}
44203      FTPPWD=${userpwd#*@}
44204      FTPSERVER=${FTPSERVER#*@}
44205    else
44206      FTPUSER=ftp
44207      FTPPWD=ftp
44208    fi
44209    # the "pass" command does not work on some
44210    # ftp clients (read ftp.exe) but if it works,
44211    # passive mode is better!
44212    ( \
44213        echo "user $FTPUSER $FTPPWD"        ; \
44214        echo "pass"                         ; \
44215        echo "bin"                          ; \
44216        echo "get $FTPPATH $tmpfile"              ; \
44217    ) | ftp -in $FTPSERVER
44218  fi
44219  if test "x$VALID_TOOL" != xyes; then
44220    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44221  fi
44222
44223    mv $tmpfile $installdir/$filename
44224    if test ! -s $installdir/$filename; then
44225      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44226    fi
44227    case "$extension" in
44228      zip)  echo "Unzipping $installdir/$filename..."
44229        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44230        ;;
44231      tar.gz) echo "Untaring $installdir/$filename..."
44232        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44233        ;;
44234      tgz) echo "Untaring $installdir/$filename..."
44235        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44236        ;;
44237      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44238        ;;
44239    esac
44240  fi
44241  if test -f $installdir/$filename.unpacked; then
44242    depdir=$installdir
44243  fi
44244
44245      fi
44246      # Source the builddeps file again, because in the previous command, the depdir
44247      # was updated to point at the current build dependency install directory.
44248      . $builddepsfile
44249      # Now extract variables from the builddeps.conf files.
44250      theroot=${builddep_cups_ROOT}
44251      thecflags=${builddep_cups_CFLAGS}
44252      thelibs=${builddep_cups_LIBS}
44253      if test "x$depdir" = x; then
44254        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44255      fi
44256      CUPS=$depdir
44257      if test "x$theroot" != x; then
44258        CUPS="$theroot"
44259      fi
44260      if test "x$thecflags" != x; then
44261        CUPS_CFLAGS="$thecflags"
44262      fi
44263      if test "x$thelibs" != x; then
44264        CUPS_LIBS="$thelibs"
44265      fi
44266      CUPS_FOUND=yes
44267
44268    fi
44269
44270  fi
44271
44272    fi
44273    if test "x$CUPS_FOUND" = xno; then
44274      # Are the cups headers installed in the default /usr/include location?
44275      for ac_header in cups/cups.h cups/ppd.h
44276do :
44277  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44278ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44279if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44280  cat >>confdefs.h <<_ACEOF
44281#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44282_ACEOF
44283
44284            CUPS_FOUND=yes
44285            CUPS_CFLAGS=
44286            DEFAULT_CUPS=yes
44287
44288
44289fi
44290
44291done
44292
44293    fi
44294    if test "x$CUPS_FOUND" = xno; then
44295      # Getting nervous now? Lets poke around for standard Solaris third-party
44296      # package installation locations.
44297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44298$as_echo_n "checking for cups headers... " >&6; }
44299      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44300        # An SFW package seems to be installed!
44301        CUPS_FOUND=yes
44302        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44303      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44304        # A CSW package seems to be installed!
44305        CUPS_FOUND=yes
44306        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44307      fi
44308      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44309$as_echo "$CUPS_FOUND" >&6; }
44310    fi
44311    if test "x$CUPS_FOUND" = xno; then
44312
44313  # Print a helpful message on how to acquire the necessary build dependency.
44314  # cups is the help tag: freetype, cups, pulse, alsa etc
44315  MISSING_DEPENDENCY=cups
44316
44317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44318    cygwin_help $MISSING_DEPENDENCY
44319  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44320    msys_help $MISSING_DEPENDENCY
44321  else
44322    PKGHANDLER_COMMAND=
44323
44324    case $PKGHANDLER in
44325      apt-get)
44326        apt_help     $MISSING_DEPENDENCY ;;
44327      yum)
44328        yum_help     $MISSING_DEPENDENCY ;;
44329      port)
44330        port_help    $MISSING_DEPENDENCY ;;
44331      pkgutil)
44332        pkgutil_help $MISSING_DEPENDENCY ;;
44333      pkgadd)
44334        pkgadd_help  $MISSING_DEPENDENCY ;;
44335    esac
44336
44337    if test "x$PKGHANDLER_COMMAND" != x; then
44338      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44339    fi
44340  fi
44341
44342      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44343    fi
44344  fi
44345
44346
44347
44348
44349
44350
44351  ###############################################################################
44352  #
44353  # The ubiquitous freetype library is used to render fonts.
44354  #
44355
44356# Check whether --with-freetype was given.
44357if test "${with_freetype+set}" = set; then :
44358  withval=$with_freetype;
44359fi
44360
44361
44362# Check whether --with-freetype-include was given.
44363if test "${with_freetype_include+set}" = set; then :
44364  withval=$with_freetype_include;
44365fi
44366
44367
44368# Check whether --with-freetype-lib was given.
44369if test "${with_freetype_lib+set}" = set; then :
44370  withval=$with_freetype_lib;
44371fi
44372
44373
44374# Check whether --with-freetype-src was given.
44375if test "${with_freetype_src+set}" = set; then :
44376  withval=$with_freetype_src;
44377fi
44378
44379  # Check whether --enable-freetype-bundling was given.
44380if test "${enable_freetype_bundling+set}" = set; then :
44381  enableval=$enable_freetype_bundling;
44382fi
44383
44384
44385  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44386  FREETYPE_BASE_NAME=freetype
44387  FREETYPE_CFLAGS=
44388  FREETYPE_LIBS=
44389  FREETYPE_BUNDLE_LIB_PATH=
44390
44391  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44392    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
44393      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44394$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44395    fi
44396    if test "x$enable_freetype_bundling" != x; then
44397      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44398$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44399    fi
44400  else
44401    # freetype is needed to build; go get it!
44402
44403    BUNDLE_FREETYPE="$enable_freetype_bundling"
44404
44405    if  test "x$with_freetype_src" != x; then
44406      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44407        # Try to build freetype if --with-freetype-src was given on Windows
44408
44409  FREETYPE_SRC_PATH="$with_freetype_src"
44410  BUILD_FREETYPE=yes
44411
44412  # Check if the freetype sources are acessible..
44413  if ! test -d $FREETYPE_SRC_PATH; then
44414    { $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
44415$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44416    BUILD_FREETYPE=no
44417  fi
44418  # ..and contain a vc2010 project file
44419  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44420  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44421    { $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
44422$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44423    BUILD_FREETYPE=no
44424  fi
44425  # Now check if configure found a version of 'msbuild.exe'
44426  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44427    { $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
44428$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;}
44429    BUILD_FREETYPE=no
44430  fi
44431
44432  # Ready to go..
44433  if test "x$BUILD_FREETYPE" = xyes; then
44434
44435    # msbuild requires trailing slashes for output directories
44436    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44437    freetype_lib_path_unix="$freetype_lib_path"
44438    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44439
44440  unix_path="$vcxproj_path"
44441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44442    windows_path=`$CYGPATH -m "$unix_path"`
44443    vcxproj_path="$windows_path"
44444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44445    windows_path=`cmd //c echo $unix_path`
44446    vcxproj_path="$windows_path"
44447  fi
44448
44449
44450  unix_path="$freetype_lib_path"
44451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44452    windows_path=`$CYGPATH -m "$unix_path"`
44453    freetype_lib_path="$windows_path"
44454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44455    windows_path=`cmd //c echo $unix_path`
44456    freetype_lib_path="$windows_path"
44457  fi
44458
44459
44460  unix_path="$freetype_obj_path"
44461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44462    windows_path=`$CYGPATH -m "$unix_path"`
44463    freetype_obj_path="$windows_path"
44464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44465    windows_path=`cmd //c echo $unix_path`
44466    freetype_obj_path="$windows_path"
44467  fi
44468
44469    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44470      freetype_platform=x64
44471    else
44472      freetype_platform=win32
44473    fi
44474
44475    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44476    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44477    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44478    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44479    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44480$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44481
44482    # First we try to build the freetype.dll
44483    $ECHO -e "@echo off\n"\
44484	     "$MSBUILD $vcxproj_path "\
44485		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44486		       "/p:Configuration=\"Release Multithreaded\" "\
44487		       "/p:Platform=$freetype_platform "\
44488		       "/p:ConfigurationType=DynamicLibrary "\
44489		       "/p:TargetName=freetype "\
44490		       "/p:OutDir=\"$freetype_lib_path\" "\
44491		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44492    cmd /c freetype.bat
44493
44494    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44495      # If that succeeds we also build freetype.lib
44496      $ECHO -e "@echo off\n"\
44497	       "$MSBUILD $vcxproj_path "\
44498			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44499			 "/p:Configuration=\"Release Multithreaded\" "\
44500			 "/p:Platform=$freetype_platform "\
44501			 "/p:ConfigurationType=StaticLibrary "\
44502			 "/p:TargetName=freetype "\
44503			 "/p:OutDir=\"$freetype_lib_path\" "\
44504			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44505      cmd /c freetype.bat
44506
44507      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44508	# Once we build both, lib and dll, set freetype lib and include path appropriately
44509	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44510	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44511	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44512$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44513      else
44514	BUILD_FREETYPE=no
44515      fi
44516    else
44517      BUILD_FREETYPE=no
44518    fi
44519  fi
44520
44521        if test "x$BUILD_FREETYPE" = xyes; then
44522          # Okay, we built it. Check that it works.
44523
44524  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44525  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44526  METHOD="--with-freetype-src"
44527
44528  # Let's start with an optimistic view of the world :-)
44529  FOUND_FREETYPE=yes
44530
44531  # First look for the canonical freetype main include file ft2build.h.
44532  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44533    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44534    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44535    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44536      # Fail.
44537      FOUND_FREETYPE=no
44538    fi
44539  fi
44540
44541  if test "x$FOUND_FREETYPE" = xyes; then
44542    # Include file found, let's continue the sanity check.
44543    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44544$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44545
44546    # Reset to default value
44547    FREETYPE_BASE_NAME=freetype
44548    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44549    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44550      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44551          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44552        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44553        # for the .6 version explicitly.
44554        FREETYPE_BASE_NAME=freetype.6
44555        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44556        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44557$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44558      else
44559        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44560$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44561        FOUND_FREETYPE=no
44562      fi
44563    else
44564      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44565        # On Windows, we will need both .lib and .dll file.
44566        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44567          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44568$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44569          FOUND_FREETYPE=no
44570        fi
44571      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44572          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44573        # Found lib in isa dir, use that instead.
44574        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44575        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44576$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44577      fi
44578    fi
44579  fi
44580
44581  if test "x$FOUND_FREETYPE" = xyes; then
44582
44583  # Only process if variable expands to non-empty
44584
44585  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44586    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44587
44588  # Input might be given as Windows format, start by converting to
44589  # unix format.
44590  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44591  new_path=`$CYGPATH -u "$path"`
44592
44593  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44594  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44595  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44596  # "foo.exe" is OK but "foo" is an error.
44597  #
44598  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44599  # It is also a way to make sure we got the proper file name for the real test later on.
44600  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44601  if test "x$test_shortpath" = x; then
44602    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44603$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44604    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44605  fi
44606
44607  # Call helper function which possibly converts this using DOS-style short mode.
44608  # If so, the updated path is stored in $new_path.
44609
44610  input_path="$new_path"
44611  # Check if we need to convert this using DOS-style short mode. If the path
44612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44613  # take no chances and rewrite it.
44614  # Note: m4 eats our [], so we need to use [ and ] instead.
44615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44616  if test "x$has_forbidden_chars" != x; then
44617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44621      # Going to short mode and back again did indeed matter. Since short mode is
44622      # case insensitive, let's make it lowercase to improve readability.
44623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44624      # Now convert it back to Unix-stile (cygpath)
44625      input_path=`$CYGPATH -u "$shortmode_path"`
44626      new_path="$input_path"
44627    fi
44628  fi
44629
44630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44631  if test "x$test_cygdrive_prefix" = x; then
44632    # As a simple fix, exclude /usr/bin since it's not a real path.
44633    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44635      # a path prefixed by /cygdrive for fixpath to work.
44636      new_path="$CYGWIN_ROOT_PATH$input_path"
44637    fi
44638  fi
44639
44640
44641  if test "x$path" != "x$new_path"; then
44642    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44643    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44644$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44645  fi
44646
44647    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44648
44649  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44650  has_colon=`$ECHO $path | $GREP ^.:`
44651  new_path="$path"
44652  if test "x$has_colon" = x; then
44653    # Not in mixed or Windows style, start by that.
44654    new_path=`cmd //c echo $path`
44655  fi
44656
44657
44658  input_path="$new_path"
44659  # Check if we need to convert this using DOS-style short mode. If the path
44660  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44661  # take no chances and rewrite it.
44662  # Note: m4 eats our [], so we need to use [ and ] instead.
44663  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44664  if test "x$has_forbidden_chars" != x; then
44665    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44666    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44667  fi
44668
44669
44670  windows_path="$new_path"
44671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44672    unix_path=`$CYGPATH -u "$windows_path"`
44673    new_path="$unix_path"
44674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44676    new_path="$unix_path"
44677  fi
44678
44679  if test "x$path" != "x$new_path"; then
44680    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44681    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44682$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44683  fi
44684
44685  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44686  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44687
44688    else
44689      # We're on a unix platform. Hooray! :)
44690      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44691      has_space=`$ECHO "$path" | $GREP " "`
44692      if test "x$has_space" != x; then
44693        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44694$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44695        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44696      fi
44697
44698      # Use eval to expand a potential ~
44699      eval path="$path"
44700      if test ! -f "$path" && test ! -d "$path"; then
44701        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44702      fi
44703
44704      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44705    fi
44706  fi
44707
44708
44709  # Only process if variable expands to non-empty
44710
44711  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44713
44714  # Input might be given as Windows format, start by converting to
44715  # unix format.
44716  path="$POTENTIAL_FREETYPE_LIB_PATH"
44717  new_path=`$CYGPATH -u "$path"`
44718
44719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44722  # "foo.exe" is OK but "foo" is an error.
44723  #
44724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44725  # It is also a way to make sure we got the proper file name for the real test later on.
44726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44727  if test "x$test_shortpath" = x; then
44728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44730    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44731  fi
44732
44733  # Call helper function which possibly converts this using DOS-style short mode.
44734  # If so, the updated path is stored in $new_path.
44735
44736  input_path="$new_path"
44737  # Check if we need to convert this using DOS-style short mode. If the path
44738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44739  # take no chances and rewrite it.
44740  # Note: m4 eats our [], so we need to use [ and ] instead.
44741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44742  if test "x$has_forbidden_chars" != x; then
44743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44747      # Going to short mode and back again did indeed matter. Since short mode is
44748      # case insensitive, let's make it lowercase to improve readability.
44749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44750      # Now convert it back to Unix-stile (cygpath)
44751      input_path=`$CYGPATH -u "$shortmode_path"`
44752      new_path="$input_path"
44753    fi
44754  fi
44755
44756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44757  if test "x$test_cygdrive_prefix" = x; then
44758    # As a simple fix, exclude /usr/bin since it's not a real path.
44759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44761      # a path prefixed by /cygdrive for fixpath to work.
44762      new_path="$CYGWIN_ROOT_PATH$input_path"
44763    fi
44764  fi
44765
44766
44767  if test "x$path" != "x$new_path"; then
44768    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44770$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44771  fi
44772
44773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44774
44775  path="$POTENTIAL_FREETYPE_LIB_PATH"
44776  has_colon=`$ECHO $path | $GREP ^.:`
44777  new_path="$path"
44778  if test "x$has_colon" = x; then
44779    # Not in mixed or Windows style, start by that.
44780    new_path=`cmd //c echo $path`
44781  fi
44782
44783
44784  input_path="$new_path"
44785  # Check if we need to convert this using DOS-style short mode. If the path
44786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44787  # take no chances and rewrite it.
44788  # Note: m4 eats our [], so we need to use [ and ] instead.
44789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44790  if test "x$has_forbidden_chars" != x; then
44791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44793  fi
44794
44795
44796  windows_path="$new_path"
44797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44798    unix_path=`$CYGPATH -u "$windows_path"`
44799    new_path="$unix_path"
44800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44802    new_path="$unix_path"
44803  fi
44804
44805  if test "x$path" != "x$new_path"; then
44806    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44808$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44809  fi
44810
44811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44813
44814    else
44815      # We're on a unix platform. Hooray! :)
44816      path="$POTENTIAL_FREETYPE_LIB_PATH"
44817      has_space=`$ECHO "$path" | $GREP " "`
44818      if test "x$has_space" != x; then
44819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44820$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44822      fi
44823
44824      # Use eval to expand a potential ~
44825      eval path="$path"
44826      if test ! -f "$path" && test ! -d "$path"; then
44827        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44828      fi
44829
44830      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44831    fi
44832  fi
44833
44834
44835    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44836    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44837$as_echo_n "checking for freetype includes... " >&6; }
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44839$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44840    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44842$as_echo_n "checking for freetype libraries... " >&6; }
44843    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44844$as_echo "$FREETYPE_LIB_PATH" >&6; }
44845  fi
44846
44847          if test "x$FOUND_FREETYPE" != xyes; then
44848            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44849          fi
44850        else
44851          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44852$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44853          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44854        fi
44855      else
44856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44857$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44858      fi
44859    fi
44860
44861    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44862      # User has specified settings
44863
44864      if test "x$BUNDLE_FREETYPE" = x; then
44865        # If not specified, default is to bundle freetype
44866        BUNDLE_FREETYPE=yes
44867      fi
44868
44869      if test "x$with_freetype" != x; then
44870        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44871        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44872      fi
44873
44874      # Allow --with-freetype-lib and --with-freetype-include to override
44875      if test "x$with_freetype_include" != x; then
44876        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44877      fi
44878      if test "x$with_freetype_lib" != x; then
44879        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44880      fi
44881
44882      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44883        # Okay, we got it. Check that it works.
44884
44885  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44886  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44887  METHOD="--with-freetype"
44888
44889  # Let's start with an optimistic view of the world :-)
44890  FOUND_FREETYPE=yes
44891
44892  # First look for the canonical freetype main include file ft2build.h.
44893  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44894    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44895    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44896    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44897      # Fail.
44898      FOUND_FREETYPE=no
44899    fi
44900  fi
44901
44902  if test "x$FOUND_FREETYPE" = xyes; then
44903    # Include file found, let's continue the sanity check.
44904    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44905$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44906
44907    # Reset to default value
44908    FREETYPE_BASE_NAME=freetype
44909    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44910    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44911      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44912          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44913        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44914        # for the .6 version explicitly.
44915        FREETYPE_BASE_NAME=freetype.6
44916        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44917        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44918$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44919      else
44920        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44921$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44922        FOUND_FREETYPE=no
44923      fi
44924    else
44925      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44926        # On Windows, we will need both .lib and .dll file.
44927        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44928          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44929$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44930          FOUND_FREETYPE=no
44931        fi
44932      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44933          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44934        # Found lib in isa dir, use that instead.
44935        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44936        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44937$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44938      fi
44939    fi
44940  fi
44941
44942  if test "x$FOUND_FREETYPE" = xyes; then
44943
44944  # Only process if variable expands to non-empty
44945
44946  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44948
44949  # Input might be given as Windows format, start by converting to
44950  # unix format.
44951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44952  new_path=`$CYGPATH -u "$path"`
44953
44954  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44955  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44956  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44957  # "foo.exe" is OK but "foo" is an error.
44958  #
44959  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44960  # It is also a way to make sure we got the proper file name for the real test later on.
44961  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44962  if test "x$test_shortpath" = x; then
44963    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44964$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44965    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44966  fi
44967
44968  # Call helper function which possibly converts this using DOS-style short mode.
44969  # If so, the updated path is stored in $new_path.
44970
44971  input_path="$new_path"
44972  # Check if we need to convert this using DOS-style short mode. If the path
44973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44974  # take no chances and rewrite it.
44975  # Note: m4 eats our [], so we need to use [ and ] instead.
44976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44977  if test "x$has_forbidden_chars" != x; then
44978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44979    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44980    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44981    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44982      # Going to short mode and back again did indeed matter. Since short mode is
44983      # case insensitive, let's make it lowercase to improve readability.
44984      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44985      # Now convert it back to Unix-stile (cygpath)
44986      input_path=`$CYGPATH -u "$shortmode_path"`
44987      new_path="$input_path"
44988    fi
44989  fi
44990
44991  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44992  if test "x$test_cygdrive_prefix" = x; then
44993    # As a simple fix, exclude /usr/bin since it's not a real path.
44994    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44995      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44996      # a path prefixed by /cygdrive for fixpath to work.
44997      new_path="$CYGWIN_ROOT_PATH$input_path"
44998    fi
44999  fi
45000
45001
45002  if test "x$path" != "x$new_path"; then
45003    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45004    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45005$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45006  fi
45007
45008    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45009
45010  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45011  has_colon=`$ECHO $path | $GREP ^.:`
45012  new_path="$path"
45013  if test "x$has_colon" = x; then
45014    # Not in mixed or Windows style, start by that.
45015    new_path=`cmd //c echo $path`
45016  fi
45017
45018
45019  input_path="$new_path"
45020  # Check if we need to convert this using DOS-style short mode. If the path
45021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45022  # take no chances and rewrite it.
45023  # Note: m4 eats our [], so we need to use [ and ] instead.
45024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45025  if test "x$has_forbidden_chars" != x; then
45026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45028  fi
45029
45030
45031  windows_path="$new_path"
45032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45033    unix_path=`$CYGPATH -u "$windows_path"`
45034    new_path="$unix_path"
45035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45037    new_path="$unix_path"
45038  fi
45039
45040  if test "x$path" != "x$new_path"; then
45041    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45042    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45043$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45044  fi
45045
45046  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45047  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45048
45049    else
45050      # We're on a unix platform. Hooray! :)
45051      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45052      has_space=`$ECHO "$path" | $GREP " "`
45053      if test "x$has_space" != x; then
45054        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45055$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45056        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45057      fi
45058
45059      # Use eval to expand a potential ~
45060      eval path="$path"
45061      if test ! -f "$path" && test ! -d "$path"; then
45062        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45063      fi
45064
45065      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45066    fi
45067  fi
45068
45069
45070  # Only process if variable expands to non-empty
45071
45072  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45074
45075  # Input might be given as Windows format, start by converting to
45076  # unix format.
45077  path="$POTENTIAL_FREETYPE_LIB_PATH"
45078  new_path=`$CYGPATH -u "$path"`
45079
45080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45083  # "foo.exe" is OK but "foo" is an error.
45084  #
45085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45086  # It is also a way to make sure we got the proper file name for the real test later on.
45087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45088  if test "x$test_shortpath" = x; then
45089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45091    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45092  fi
45093
45094  # Call helper function which possibly converts this using DOS-style short mode.
45095  # If so, the updated path is stored in $new_path.
45096
45097  input_path="$new_path"
45098  # Check if we need to convert this using DOS-style short mode. If the path
45099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45100  # take no chances and rewrite it.
45101  # Note: m4 eats our [], so we need to use [ and ] instead.
45102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45103  if test "x$has_forbidden_chars" != x; then
45104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45108      # Going to short mode and back again did indeed matter. Since short mode is
45109      # case insensitive, let's make it lowercase to improve readability.
45110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45111      # Now convert it back to Unix-stile (cygpath)
45112      input_path=`$CYGPATH -u "$shortmode_path"`
45113      new_path="$input_path"
45114    fi
45115  fi
45116
45117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45118  if test "x$test_cygdrive_prefix" = x; then
45119    # As a simple fix, exclude /usr/bin since it's not a real path.
45120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45122      # a path prefixed by /cygdrive for fixpath to work.
45123      new_path="$CYGWIN_ROOT_PATH$input_path"
45124    fi
45125  fi
45126
45127
45128  if test "x$path" != "x$new_path"; then
45129    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45131$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45132  fi
45133
45134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45135
45136  path="$POTENTIAL_FREETYPE_LIB_PATH"
45137  has_colon=`$ECHO $path | $GREP ^.:`
45138  new_path="$path"
45139  if test "x$has_colon" = x; then
45140    # Not in mixed or Windows style, start by that.
45141    new_path=`cmd //c echo $path`
45142  fi
45143
45144
45145  input_path="$new_path"
45146  # Check if we need to convert this using DOS-style short mode. If the path
45147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45148  # take no chances and rewrite it.
45149  # Note: m4 eats our [], so we need to use [ and ] instead.
45150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45151  if test "x$has_forbidden_chars" != x; then
45152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45154  fi
45155
45156
45157  windows_path="$new_path"
45158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45159    unix_path=`$CYGPATH -u "$windows_path"`
45160    new_path="$unix_path"
45161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45163    new_path="$unix_path"
45164  fi
45165
45166  if test "x$path" != "x$new_path"; then
45167    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45170  fi
45171
45172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45174
45175    else
45176      # We're on a unix platform. Hooray! :)
45177      path="$POTENTIAL_FREETYPE_LIB_PATH"
45178      has_space=`$ECHO "$path" | $GREP " "`
45179      if test "x$has_space" != x; then
45180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45183      fi
45184
45185      # Use eval to expand a potential ~
45186      eval path="$path"
45187      if test ! -f "$path" && test ! -d "$path"; then
45188        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45189      fi
45190
45191      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45192    fi
45193  fi
45194
45195
45196    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45197    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45198$as_echo_n "checking for freetype includes... " >&6; }
45199    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45200$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45201    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45202    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45203$as_echo_n "checking for freetype libraries... " >&6; }
45204    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45205$as_echo "$FREETYPE_LIB_PATH" >&6; }
45206  fi
45207
45208        if test "x$FOUND_FREETYPE" != xyes; then
45209          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45210        fi
45211      else
45212        # User specified only one of lib or include. This is an error.
45213        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45214          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45215$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45216          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45217        else
45218          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45219$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45220          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45221        fi
45222      fi
45223    else
45224      # User did not specify settings, but we need freetype. Try to locate it.
45225
45226      if test "x$BUNDLE_FREETYPE" = x; then
45227        # If not specified, default is to bundle freetype only on windows
45228        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45229          BUNDLE_FREETYPE=yes
45230        else
45231          BUNDLE_FREETYPE=no
45232        fi
45233      fi
45234
45235      if test "x$FOUND_FREETYPE" != xyes; then
45236        # Check builddeps
45237
45238
45239  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45240    # Source the builddeps file again, to make sure it uses the latest variables!
45241    . $builddepsfile
45242    # Look for a target and build machine specific resource!
45243    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45244    if test "x$resource" = x; then
45245      # Ok, lets instead look for a target specific resource
45246      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45247    fi
45248    if test "x$resource" = x; then
45249      # Ok, lets instead look for a build specific resource
45250      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45251    fi
45252    if test "x$resource" = x; then
45253      # Ok, lets instead look for a generic resource
45254      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45255      resource=${builddep_freetype2}
45256    fi
45257    if test "x$resource" != x; then
45258      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45259$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45260      # If the resource in the builddeps.conf file is an existing directory,
45261      # for example /java/linux/cups
45262      if test -d ${resource}; then
45263        depdir=${resource}
45264      else
45265
45266  # freetype2 is for example mymodule
45267  # $resource is for example libs/general/libmymod_1_2_3.zip
45268  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45269  # $with_builddeps_dir is for example /localhome/builddeps
45270  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45271  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45272  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45273  filename=`basename $resource`
45274  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45275  filebase=${filename%%.*}
45276  extension=${filename#*.}
45277  installdir=$with_builddeps_dir/$filebase
45278  if test ! -f $installdir/$filename.unpacked; then
45279    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45280$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45281    if test ! -d $installdir; then
45282      mkdir -p $installdir
45283    fi
45284    if test ! -d $installdir; then
45285      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45286    fi
45287    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45288    touch $tmpfile
45289    if test ! -f $tmpfile; then
45290      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45291    fi
45292
45293  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45294  # $tmpfile is the local file name for the downloaded file.
45295  VALID_TOOL=no
45296  if test "x$BDEPS_FTP" = xwget; then
45297    VALID_TOOL=yes
45298    wget -O $tmpfile $with_builddeps_server/$resource
45299  fi
45300  if test "x$BDEPS_FTP" = xlftp; then
45301    VALID_TOOL=yes
45302    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45303  fi
45304  if test "x$BDEPS_FTP" = xftp; then
45305    VALID_TOOL=yes
45306    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45307    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45308    FTPUSERPWD=${FTPSERVER%%@*}
45309    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45310      FTPUSER=${userpwd%%:*}
45311      FTPPWD=${userpwd#*@}
45312      FTPSERVER=${FTPSERVER#*@}
45313    else
45314      FTPUSER=ftp
45315      FTPPWD=ftp
45316    fi
45317    # the "pass" command does not work on some
45318    # ftp clients (read ftp.exe) but if it works,
45319    # passive mode is better!
45320    ( \
45321        echo "user $FTPUSER $FTPPWD"        ; \
45322        echo "pass"                         ; \
45323        echo "bin"                          ; \
45324        echo "get $FTPPATH $tmpfile"              ; \
45325    ) | ftp -in $FTPSERVER
45326  fi
45327  if test "x$VALID_TOOL" != xyes; then
45328    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45329  fi
45330
45331    mv $tmpfile $installdir/$filename
45332    if test ! -s $installdir/$filename; then
45333      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45334    fi
45335    case "$extension" in
45336      zip)  echo "Unzipping $installdir/$filename..."
45337        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45338        ;;
45339      tar.gz) echo "Untaring $installdir/$filename..."
45340        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45341        ;;
45342      tgz) echo "Untaring $installdir/$filename..."
45343        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45344        ;;
45345      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45346        ;;
45347    esac
45348  fi
45349  if test -f $installdir/$filename.unpacked; then
45350    depdir=$installdir
45351  fi
45352
45353      fi
45354      # Source the builddeps file again, because in the previous command, the depdir
45355      # was updated to point at the current build dependency install directory.
45356      . $builddepsfile
45357      # Now extract variables from the builddeps.conf files.
45358      theroot=${builddep_freetype2_ROOT}
45359      thecflags=${builddep_freetype2_CFLAGS}
45360      thelibs=${builddep_freetype2_LIBS}
45361      if test "x$depdir" = x; then
45362        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45363      fi
45364      FREETYPE=$depdir
45365      if test "x$theroot" != x; then
45366        FREETYPE="$theroot"
45367      fi
45368      if test "x$thecflags" != x; then
45369        FREETYPE_CFLAGS="$thecflags"
45370      fi
45371      if test "x$thelibs" != x; then
45372        FREETYPE_LIBS="$thelibs"
45373      fi
45374      FOUND_FREETYPE=yes
45375      else FOUND_FREETYPE=no
45376
45377    fi
45378    else FOUND_FREETYPE=no
45379
45380  fi
45381
45382        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45383        if test "x$FOUND_FREETYPE" = xyes; then
45384          if test "x$BUNDLE_FREETYPE" = xyes; then
45385            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45386$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45387            FOUND_FREETYPE=no
45388          else
45389            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45390$as_echo_n "checking for freetype... " >&6; }
45391            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45392$as_echo "yes (using builddeps)" >&6; }
45393          fi
45394        fi
45395      fi
45396
45397      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45398      if test "x$SYSROOT" = x; then
45399        if test "x$FOUND_FREETYPE" != xyes; then
45400          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45401          if test "x$PKG_CONFIG" != x; then
45402
45403pkg_failed=no
45404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45405$as_echo_n "checking for FREETYPE... " >&6; }
45406
45407if test -n "$FREETYPE_CFLAGS"; then
45408    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45409 elif test -n "$PKG_CONFIG"; then
45410    if test -n "$PKG_CONFIG" && \
45411    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45412  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45413  ac_status=$?
45414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45415  test $ac_status = 0; }; then
45416  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45417else
45418  pkg_failed=yes
45419fi
45420 else
45421    pkg_failed=untried
45422fi
45423if test -n "$FREETYPE_LIBS"; then
45424    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45425 elif test -n "$PKG_CONFIG"; then
45426    if test -n "$PKG_CONFIG" && \
45427    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45428  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45429  ac_status=$?
45430  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45431  test $ac_status = 0; }; then
45432  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45433else
45434  pkg_failed=yes
45435fi
45436 else
45437    pkg_failed=untried
45438fi
45439
45440
45441
45442if test $pkg_failed = yes; then
45443
45444if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45445        _pkg_short_errors_supported=yes
45446else
45447        _pkg_short_errors_supported=no
45448fi
45449        if test $_pkg_short_errors_supported = yes; then
45450	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45451        else
45452	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45453        fi
45454	# Put the nasty error message in config.log where it belongs
45455	echo "$FREETYPE_PKG_ERRORS" >&5
45456
45457	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45458$as_echo "no" >&6; }
45459                FOUND_FREETYPE=no
45460elif test $pkg_failed = untried; then
45461	FOUND_FREETYPE=no
45462else
45463	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45464	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45466$as_echo "yes" >&6; }
45467	FOUND_FREETYPE=yes
45468fi
45469            if test "x$FOUND_FREETYPE" = xyes; then
45470              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45471              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45472              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45473              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45474                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45475              fi
45476              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45477              if test "x$BUNDLE_FREETYPE" = xyes; then
45478                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45479$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45480                FOUND_FREETYPE=no
45481              else
45482                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45483$as_echo_n "checking for freetype... " >&6; }
45484                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45485$as_echo "yes (using pkg-config)" >&6; }
45486              fi
45487            fi
45488          fi
45489        fi
45490      fi
45491
45492      if test "x$FOUND_FREETYPE" != xyes; then
45493        # Check in well-known locations
45494        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45495          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45496
45497  windows_path="$FREETYPE_BASE_DIR"
45498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45499    unix_path=`$CYGPATH -u "$windows_path"`
45500    FREETYPE_BASE_DIR="$unix_path"
45501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45503    FREETYPE_BASE_DIR="$unix_path"
45504  fi
45505
45506
45507  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45508  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45509  METHOD="well-known location"
45510
45511  # Let's start with an optimistic view of the world :-)
45512  FOUND_FREETYPE=yes
45513
45514  # First look for the canonical freetype main include file ft2build.h.
45515  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45516    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45517    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45518    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45519      # Fail.
45520      FOUND_FREETYPE=no
45521    fi
45522  fi
45523
45524  if test "x$FOUND_FREETYPE" = xyes; then
45525    # Include file found, let's continue the sanity check.
45526    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45527$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45528
45529    # Reset to default value
45530    FREETYPE_BASE_NAME=freetype
45531    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45532    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45533      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45534          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45535        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45536        # for the .6 version explicitly.
45537        FREETYPE_BASE_NAME=freetype.6
45538        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45539        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45540$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45541      else
45542        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45543$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45544        FOUND_FREETYPE=no
45545      fi
45546    else
45547      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45548        # On Windows, we will need both .lib and .dll file.
45549        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45550          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45551$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45552          FOUND_FREETYPE=no
45553        fi
45554      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45555          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45556        # Found lib in isa dir, use that instead.
45557        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45558        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45559$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45560      fi
45561    fi
45562  fi
45563
45564  if test "x$FOUND_FREETYPE" = xyes; then
45565
45566  # Only process if variable expands to non-empty
45567
45568  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45569    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45570
45571  # Input might be given as Windows format, start by converting to
45572  # unix format.
45573  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45574  new_path=`$CYGPATH -u "$path"`
45575
45576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45579  # "foo.exe" is OK but "foo" is an error.
45580  #
45581  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45582  # It is also a way to make sure we got the proper file name for the real test later on.
45583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45584  if test "x$test_shortpath" = x; then
45585    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45587    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45588  fi
45589
45590  # Call helper function which possibly converts this using DOS-style short mode.
45591  # If so, the updated path is stored in $new_path.
45592
45593  input_path="$new_path"
45594  # Check if we need to convert this using DOS-style short mode. If the path
45595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45596  # take no chances and rewrite it.
45597  # Note: m4 eats our [], so we need to use [ and ] instead.
45598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45599  if test "x$has_forbidden_chars" != x; then
45600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45601    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45602    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45603    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45604      # Going to short mode and back again did indeed matter. Since short mode is
45605      # case insensitive, let's make it lowercase to improve readability.
45606      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45607      # Now convert it back to Unix-stile (cygpath)
45608      input_path=`$CYGPATH -u "$shortmode_path"`
45609      new_path="$input_path"
45610    fi
45611  fi
45612
45613  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45614  if test "x$test_cygdrive_prefix" = x; then
45615    # As a simple fix, exclude /usr/bin since it's not a real path.
45616    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45617      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45618      # a path prefixed by /cygdrive for fixpath to work.
45619      new_path="$CYGWIN_ROOT_PATH$input_path"
45620    fi
45621  fi
45622
45623
45624  if test "x$path" != "x$new_path"; then
45625    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45626    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45627$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45628  fi
45629
45630    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45631
45632  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45633  has_colon=`$ECHO $path | $GREP ^.:`
45634  new_path="$path"
45635  if test "x$has_colon" = x; then
45636    # Not in mixed or Windows style, start by that.
45637    new_path=`cmd //c echo $path`
45638  fi
45639
45640
45641  input_path="$new_path"
45642  # Check if we need to convert this using DOS-style short mode. If the path
45643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45644  # take no chances and rewrite it.
45645  # Note: m4 eats our [], so we need to use [ and ] instead.
45646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45647  if test "x$has_forbidden_chars" != x; then
45648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45650  fi
45651
45652
45653  windows_path="$new_path"
45654  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45655    unix_path=`$CYGPATH -u "$windows_path"`
45656    new_path="$unix_path"
45657  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45658    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45659    new_path="$unix_path"
45660  fi
45661
45662  if test "x$path" != "x$new_path"; then
45663    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45664    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45665$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45666  fi
45667
45668  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45669  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45670
45671    else
45672      # We're on a unix platform. Hooray! :)
45673      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45674      has_space=`$ECHO "$path" | $GREP " "`
45675      if test "x$has_space" != x; then
45676        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45677$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45678        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45679      fi
45680
45681      # Use eval to expand a potential ~
45682      eval path="$path"
45683      if test ! -f "$path" && test ! -d "$path"; then
45684        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45685      fi
45686
45687      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45688    fi
45689  fi
45690
45691
45692  # Only process if variable expands to non-empty
45693
45694  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45696
45697  # Input might be given as Windows format, start by converting to
45698  # unix format.
45699  path="$POTENTIAL_FREETYPE_LIB_PATH"
45700  new_path=`$CYGPATH -u "$path"`
45701
45702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45705  # "foo.exe" is OK but "foo" is an error.
45706  #
45707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45708  # It is also a way to make sure we got the proper file name for the real test later on.
45709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45710  if test "x$test_shortpath" = x; then
45711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45713    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45714  fi
45715
45716  # Call helper function which possibly converts this using DOS-style short mode.
45717  # If so, the updated path is stored in $new_path.
45718
45719  input_path="$new_path"
45720  # Check if we need to convert this using DOS-style short mode. If the path
45721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45722  # take no chances and rewrite it.
45723  # Note: m4 eats our [], so we need to use [ and ] instead.
45724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45725  if test "x$has_forbidden_chars" != x; then
45726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45730      # Going to short mode and back again did indeed matter. Since short mode is
45731      # case insensitive, let's make it lowercase to improve readability.
45732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45733      # Now convert it back to Unix-stile (cygpath)
45734      input_path=`$CYGPATH -u "$shortmode_path"`
45735      new_path="$input_path"
45736    fi
45737  fi
45738
45739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45740  if test "x$test_cygdrive_prefix" = x; then
45741    # As a simple fix, exclude /usr/bin since it's not a real path.
45742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45744      # a path prefixed by /cygdrive for fixpath to work.
45745      new_path="$CYGWIN_ROOT_PATH$input_path"
45746    fi
45747  fi
45748
45749
45750  if test "x$path" != "x$new_path"; then
45751    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45753$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45754  fi
45755
45756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45757
45758  path="$POTENTIAL_FREETYPE_LIB_PATH"
45759  has_colon=`$ECHO $path | $GREP ^.:`
45760  new_path="$path"
45761  if test "x$has_colon" = x; then
45762    # Not in mixed or Windows style, start by that.
45763    new_path=`cmd //c echo $path`
45764  fi
45765
45766
45767  input_path="$new_path"
45768  # Check if we need to convert this using DOS-style short mode. If the path
45769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45770  # take no chances and rewrite it.
45771  # Note: m4 eats our [], so we need to use [ and ] instead.
45772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45773  if test "x$has_forbidden_chars" != x; then
45774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45776  fi
45777
45778
45779  windows_path="$new_path"
45780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45781    unix_path=`$CYGPATH -u "$windows_path"`
45782    new_path="$unix_path"
45783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45785    new_path="$unix_path"
45786  fi
45787
45788  if test "x$path" != "x$new_path"; then
45789    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45791$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45792  fi
45793
45794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45796
45797    else
45798      # We're on a unix platform. Hooray! :)
45799      path="$POTENTIAL_FREETYPE_LIB_PATH"
45800      has_space=`$ECHO "$path" | $GREP " "`
45801      if test "x$has_space" != x; then
45802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45803$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45805      fi
45806
45807      # Use eval to expand a potential ~
45808      eval path="$path"
45809      if test ! -f "$path" && test ! -d "$path"; then
45810        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45811      fi
45812
45813      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45814    fi
45815  fi
45816
45817
45818    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45819    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45820$as_echo_n "checking for freetype includes... " >&6; }
45821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45822$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45823    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45824    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45825$as_echo_n "checking for freetype libraries... " >&6; }
45826    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45827$as_echo "$FREETYPE_LIB_PATH" >&6; }
45828  fi
45829
45830          if test "x$FOUND_FREETYPE" != xyes; then
45831            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45832
45833  windows_path="$FREETYPE_BASE_DIR"
45834  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45835    unix_path=`$CYGPATH -u "$windows_path"`
45836    FREETYPE_BASE_DIR="$unix_path"
45837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45838    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45839    FREETYPE_BASE_DIR="$unix_path"
45840  fi
45841
45842
45843  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45844  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45845  METHOD="well-known location"
45846
45847  # Let's start with an optimistic view of the world :-)
45848  FOUND_FREETYPE=yes
45849
45850  # First look for the canonical freetype main include file ft2build.h.
45851  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45852    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45853    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45854    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45855      # Fail.
45856      FOUND_FREETYPE=no
45857    fi
45858  fi
45859
45860  if test "x$FOUND_FREETYPE" = xyes; then
45861    # Include file found, let's continue the sanity check.
45862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45863$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45864
45865    # Reset to default value
45866    FREETYPE_BASE_NAME=freetype
45867    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45868    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45869      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45870          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45871        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45872        # for the .6 version explicitly.
45873        FREETYPE_BASE_NAME=freetype.6
45874        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45875        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45876$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45877      else
45878        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45879$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45880        FOUND_FREETYPE=no
45881      fi
45882    else
45883      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45884        # On Windows, we will need both .lib and .dll file.
45885        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45886          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45887$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45888          FOUND_FREETYPE=no
45889        fi
45890      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45891          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45892        # Found lib in isa dir, use that instead.
45893        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45894        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45895$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45896      fi
45897    fi
45898  fi
45899
45900  if test "x$FOUND_FREETYPE" = xyes; then
45901
45902  # Only process if variable expands to non-empty
45903
45904  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45905    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45906
45907  # Input might be given as Windows format, start by converting to
45908  # unix format.
45909  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45910  new_path=`$CYGPATH -u "$path"`
45911
45912  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45913  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45914  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45915  # "foo.exe" is OK but "foo" is an error.
45916  #
45917  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45918  # It is also a way to make sure we got the proper file name for the real test later on.
45919  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45920  if test "x$test_shortpath" = x; then
45921    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45923    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45924  fi
45925
45926  # Call helper function which possibly converts this using DOS-style short mode.
45927  # If so, the updated path is stored in $new_path.
45928
45929  input_path="$new_path"
45930  # Check if we need to convert this using DOS-style short mode. If the path
45931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45932  # take no chances and rewrite it.
45933  # Note: m4 eats our [], so we need to use [ and ] instead.
45934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45935  if test "x$has_forbidden_chars" != x; then
45936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45940      # Going to short mode and back again did indeed matter. Since short mode is
45941      # case insensitive, let's make it lowercase to improve readability.
45942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45943      # Now convert it back to Unix-stile (cygpath)
45944      input_path=`$CYGPATH -u "$shortmode_path"`
45945      new_path="$input_path"
45946    fi
45947  fi
45948
45949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45950  if test "x$test_cygdrive_prefix" = x; then
45951    # As a simple fix, exclude /usr/bin since it's not a real path.
45952    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45954      # a path prefixed by /cygdrive for fixpath to work.
45955      new_path="$CYGWIN_ROOT_PATH$input_path"
45956    fi
45957  fi
45958
45959
45960  if test "x$path" != "x$new_path"; then
45961    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45964  fi
45965
45966    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45967
45968  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45969  has_colon=`$ECHO $path | $GREP ^.:`
45970  new_path="$path"
45971  if test "x$has_colon" = x; then
45972    # Not in mixed or Windows style, start by that.
45973    new_path=`cmd //c echo $path`
45974  fi
45975
45976
45977  input_path="$new_path"
45978  # Check if we need to convert this using DOS-style short mode. If the path
45979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45980  # take no chances and rewrite it.
45981  # Note: m4 eats our [], so we need to use [ and ] instead.
45982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45983  if test "x$has_forbidden_chars" != x; then
45984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45986  fi
45987
45988
45989  windows_path="$new_path"
45990  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45991    unix_path=`$CYGPATH -u "$windows_path"`
45992    new_path="$unix_path"
45993  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45994    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45995    new_path="$unix_path"
45996  fi
45997
45998  if test "x$path" != "x$new_path"; then
45999    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46000    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46001$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46002  fi
46003
46004  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46005  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46006
46007    else
46008      # We're on a unix platform. Hooray! :)
46009      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46010      has_space=`$ECHO "$path" | $GREP " "`
46011      if test "x$has_space" != x; then
46012        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46014        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46015      fi
46016
46017      # Use eval to expand a potential ~
46018      eval path="$path"
46019      if test ! -f "$path" && test ! -d "$path"; then
46020        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46021      fi
46022
46023      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46024    fi
46025  fi
46026
46027
46028  # Only process if variable expands to non-empty
46029
46030  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46032
46033  # Input might be given as Windows format, start by converting to
46034  # unix format.
46035  path="$POTENTIAL_FREETYPE_LIB_PATH"
46036  new_path=`$CYGPATH -u "$path"`
46037
46038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46041  # "foo.exe" is OK but "foo" is an error.
46042  #
46043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46044  # It is also a way to make sure we got the proper file name for the real test later on.
46045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46046  if test "x$test_shortpath" = x; then
46047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46048$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46049    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46050  fi
46051
46052  # Call helper function which possibly converts this using DOS-style short mode.
46053  # If so, the updated path is stored in $new_path.
46054
46055  input_path="$new_path"
46056  # Check if we need to convert this using DOS-style short mode. If the path
46057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46058  # take no chances and rewrite it.
46059  # Note: m4 eats our [], so we need to use [ and ] instead.
46060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46061  if test "x$has_forbidden_chars" != x; then
46062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46066      # Going to short mode and back again did indeed matter. Since short mode is
46067      # case insensitive, let's make it lowercase to improve readability.
46068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46069      # Now convert it back to Unix-stile (cygpath)
46070      input_path=`$CYGPATH -u "$shortmode_path"`
46071      new_path="$input_path"
46072    fi
46073  fi
46074
46075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46076  if test "x$test_cygdrive_prefix" = x; then
46077    # As a simple fix, exclude /usr/bin since it's not a real path.
46078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46080      # a path prefixed by /cygdrive for fixpath to work.
46081      new_path="$CYGWIN_ROOT_PATH$input_path"
46082    fi
46083  fi
46084
46085
46086  if test "x$path" != "x$new_path"; then
46087    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46089$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46090  fi
46091
46092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46093
46094  path="$POTENTIAL_FREETYPE_LIB_PATH"
46095  has_colon=`$ECHO $path | $GREP ^.:`
46096  new_path="$path"
46097  if test "x$has_colon" = x; then
46098    # Not in mixed or Windows style, start by that.
46099    new_path=`cmd //c echo $path`
46100  fi
46101
46102
46103  input_path="$new_path"
46104  # Check if we need to convert this using DOS-style short mode. If the path
46105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46106  # take no chances and rewrite it.
46107  # Note: m4 eats our [], so we need to use [ and ] instead.
46108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46109  if test "x$has_forbidden_chars" != x; then
46110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46112  fi
46113
46114
46115  windows_path="$new_path"
46116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46117    unix_path=`$CYGPATH -u "$windows_path"`
46118    new_path="$unix_path"
46119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46121    new_path="$unix_path"
46122  fi
46123
46124  if test "x$path" != "x$new_path"; then
46125    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46128  fi
46129
46130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46132
46133    else
46134      # We're on a unix platform. Hooray! :)
46135      path="$POTENTIAL_FREETYPE_LIB_PATH"
46136      has_space=`$ECHO "$path" | $GREP " "`
46137      if test "x$has_space" != x; then
46138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46139$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46141      fi
46142
46143      # Use eval to expand a potential ~
46144      eval path="$path"
46145      if test ! -f "$path" && test ! -d "$path"; then
46146        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46147      fi
46148
46149      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46150    fi
46151  fi
46152
46153
46154    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46156$as_echo_n "checking for freetype includes... " >&6; }
46157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46158$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46159    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46160    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46161$as_echo_n "checking for freetype libraries... " >&6; }
46162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46163$as_echo "$FREETYPE_LIB_PATH" >&6; }
46164  fi
46165
46166          fi
46167        else
46168          FREETYPE_BASE_DIR="$SYSROOT/usr"
46169
46170  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46171  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46172  METHOD="well-known location"
46173
46174  # Let's start with an optimistic view of the world :-)
46175  FOUND_FREETYPE=yes
46176
46177  # First look for the canonical freetype main include file ft2build.h.
46178  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46179    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46180    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46181    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46182      # Fail.
46183      FOUND_FREETYPE=no
46184    fi
46185  fi
46186
46187  if test "x$FOUND_FREETYPE" = xyes; then
46188    # Include file found, let's continue the sanity check.
46189    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46190$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46191
46192    # Reset to default value
46193    FREETYPE_BASE_NAME=freetype
46194    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46195    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46196      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46197          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46198        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46199        # for the .6 version explicitly.
46200        FREETYPE_BASE_NAME=freetype.6
46201        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46202        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46203$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46204      else
46205        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46206$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46207        FOUND_FREETYPE=no
46208      fi
46209    else
46210      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46211        # On Windows, we will need both .lib and .dll file.
46212        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46213          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46214$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46215          FOUND_FREETYPE=no
46216        fi
46217      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46218          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46219        # Found lib in isa dir, use that instead.
46220        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46221        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46222$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46223      fi
46224    fi
46225  fi
46226
46227  if test "x$FOUND_FREETYPE" = xyes; then
46228
46229  # Only process if variable expands to non-empty
46230
46231  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46232    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46233
46234  # Input might be given as Windows format, start by converting to
46235  # unix format.
46236  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46237  new_path=`$CYGPATH -u "$path"`
46238
46239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46242  # "foo.exe" is OK but "foo" is an error.
46243  #
46244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46245  # It is also a way to make sure we got the proper file name for the real test later on.
46246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46247  if test "x$test_shortpath" = x; then
46248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46249$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46250    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46251  fi
46252
46253  # Call helper function which possibly converts this using DOS-style short mode.
46254  # If so, the updated path is stored in $new_path.
46255
46256  input_path="$new_path"
46257  # Check if we need to convert this using DOS-style short mode. If the path
46258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46259  # take no chances and rewrite it.
46260  # Note: m4 eats our [], so we need to use [ and ] instead.
46261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46262  if test "x$has_forbidden_chars" != x; then
46263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46267      # Going to short mode and back again did indeed matter. Since short mode is
46268      # case insensitive, let's make it lowercase to improve readability.
46269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46270      # Now convert it back to Unix-stile (cygpath)
46271      input_path=`$CYGPATH -u "$shortmode_path"`
46272      new_path="$input_path"
46273    fi
46274  fi
46275
46276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46277  if test "x$test_cygdrive_prefix" = x; then
46278    # As a simple fix, exclude /usr/bin since it's not a real path.
46279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46281      # a path prefixed by /cygdrive for fixpath to work.
46282      new_path="$CYGWIN_ROOT_PATH$input_path"
46283    fi
46284  fi
46285
46286
46287  if test "x$path" != "x$new_path"; then
46288    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46290$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46291  fi
46292
46293    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46294
46295  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46296  has_colon=`$ECHO $path | $GREP ^.:`
46297  new_path="$path"
46298  if test "x$has_colon" = x; then
46299    # Not in mixed or Windows style, start by that.
46300    new_path=`cmd //c echo $path`
46301  fi
46302
46303
46304  input_path="$new_path"
46305  # Check if we need to convert this using DOS-style short mode. If the path
46306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46307  # take no chances and rewrite it.
46308  # Note: m4 eats our [], so we need to use [ and ] instead.
46309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46310  if test "x$has_forbidden_chars" != x; then
46311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46313  fi
46314
46315
46316  windows_path="$new_path"
46317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46318    unix_path=`$CYGPATH -u "$windows_path"`
46319    new_path="$unix_path"
46320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46322    new_path="$unix_path"
46323  fi
46324
46325  if test "x$path" != "x$new_path"; then
46326    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46328$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46329  fi
46330
46331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46333
46334    else
46335      # We're on a unix platform. Hooray! :)
46336      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46337      has_space=`$ECHO "$path" | $GREP " "`
46338      if test "x$has_space" != x; then
46339        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46340$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46341        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46342      fi
46343
46344      # Use eval to expand a potential ~
46345      eval path="$path"
46346      if test ! -f "$path" && test ! -d "$path"; then
46347        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46348      fi
46349
46350      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46351    fi
46352  fi
46353
46354
46355  # Only process if variable expands to non-empty
46356
46357  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46359
46360  # Input might be given as Windows format, start by converting to
46361  # unix format.
46362  path="$POTENTIAL_FREETYPE_LIB_PATH"
46363  new_path=`$CYGPATH -u "$path"`
46364
46365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46368  # "foo.exe" is OK but "foo" is an error.
46369  #
46370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46371  # It is also a way to make sure we got the proper file name for the real test later on.
46372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46373  if test "x$test_shortpath" = x; then
46374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46375$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46376    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46377  fi
46378
46379  # Call helper function which possibly converts this using DOS-style short mode.
46380  # If so, the updated path is stored in $new_path.
46381
46382  input_path="$new_path"
46383  # Check if we need to convert this using DOS-style short mode. If the path
46384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46385  # take no chances and rewrite it.
46386  # Note: m4 eats our [], so we need to use [ and ] instead.
46387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46388  if test "x$has_forbidden_chars" != x; then
46389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46393      # Going to short mode and back again did indeed matter. Since short mode is
46394      # case insensitive, let's make it lowercase to improve readability.
46395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46396      # Now convert it back to Unix-stile (cygpath)
46397      input_path=`$CYGPATH -u "$shortmode_path"`
46398      new_path="$input_path"
46399    fi
46400  fi
46401
46402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46403  if test "x$test_cygdrive_prefix" = x; then
46404    # As a simple fix, exclude /usr/bin since it's not a real path.
46405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46407      # a path prefixed by /cygdrive for fixpath to work.
46408      new_path="$CYGWIN_ROOT_PATH$input_path"
46409    fi
46410  fi
46411
46412
46413  if test "x$path" != "x$new_path"; then
46414    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46416$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46417  fi
46418
46419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46420
46421  path="$POTENTIAL_FREETYPE_LIB_PATH"
46422  has_colon=`$ECHO $path | $GREP ^.:`
46423  new_path="$path"
46424  if test "x$has_colon" = x; then
46425    # Not in mixed or Windows style, start by that.
46426    new_path=`cmd //c echo $path`
46427  fi
46428
46429
46430  input_path="$new_path"
46431  # Check if we need to convert this using DOS-style short mode. If the path
46432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46433  # take no chances and rewrite it.
46434  # Note: m4 eats our [], so we need to use [ and ] instead.
46435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46436  if test "x$has_forbidden_chars" != x; then
46437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46439  fi
46440
46441
46442  windows_path="$new_path"
46443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46444    unix_path=`$CYGPATH -u "$windows_path"`
46445    new_path="$unix_path"
46446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46448    new_path="$unix_path"
46449  fi
46450
46451  if test "x$path" != "x$new_path"; then
46452    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46454$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46455  fi
46456
46457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46459
46460    else
46461      # We're on a unix platform. Hooray! :)
46462      path="$POTENTIAL_FREETYPE_LIB_PATH"
46463      has_space=`$ECHO "$path" | $GREP " "`
46464      if test "x$has_space" != x; then
46465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46466$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46468      fi
46469
46470      # Use eval to expand a potential ~
46471      eval path="$path"
46472      if test ! -f "$path" && test ! -d "$path"; then
46473        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46474      fi
46475
46476      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46477    fi
46478  fi
46479
46480
46481    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46482    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46483$as_echo_n "checking for freetype includes... " >&6; }
46484    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46485$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46486    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46487    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46488$as_echo_n "checking for freetype libraries... " >&6; }
46489    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46490$as_echo "$FREETYPE_LIB_PATH" >&6; }
46491  fi
46492
46493
46494          if test "x$FOUND_FREETYPE" != xyes; then
46495            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46496
46497  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46498  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46499  METHOD="well-known location"
46500
46501  # Let's start with an optimistic view of the world :-)
46502  FOUND_FREETYPE=yes
46503
46504  # First look for the canonical freetype main include file ft2build.h.
46505  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46506    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46507    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46508    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46509      # Fail.
46510      FOUND_FREETYPE=no
46511    fi
46512  fi
46513
46514  if test "x$FOUND_FREETYPE" = xyes; then
46515    # Include file found, let's continue the sanity check.
46516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46517$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46518
46519    # Reset to default value
46520    FREETYPE_BASE_NAME=freetype
46521    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46522    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46523      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46524          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46525        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46526        # for the .6 version explicitly.
46527        FREETYPE_BASE_NAME=freetype.6
46528        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46529        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46530$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46531      else
46532        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46533$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46534        FOUND_FREETYPE=no
46535      fi
46536    else
46537      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46538        # On Windows, we will need both .lib and .dll file.
46539        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46540          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46541$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46542          FOUND_FREETYPE=no
46543        fi
46544      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46545          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46546        # Found lib in isa dir, use that instead.
46547        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46548        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46549$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46550      fi
46551    fi
46552  fi
46553
46554  if test "x$FOUND_FREETYPE" = xyes; then
46555
46556  # Only process if variable expands to non-empty
46557
46558  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46560
46561  # Input might be given as Windows format, start by converting to
46562  # unix format.
46563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46564  new_path=`$CYGPATH -u "$path"`
46565
46566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46569  # "foo.exe" is OK but "foo" is an error.
46570  #
46571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46572  # It is also a way to make sure we got the proper file name for the real test later on.
46573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46574  if test "x$test_shortpath" = x; then
46575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46576$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46577    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46578  fi
46579
46580  # Call helper function which possibly converts this using DOS-style short mode.
46581  # If so, the updated path is stored in $new_path.
46582
46583  input_path="$new_path"
46584  # Check if we need to convert this using DOS-style short mode. If the path
46585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46586  # take no chances and rewrite it.
46587  # Note: m4 eats our [], so we need to use [ and ] instead.
46588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46589  if test "x$has_forbidden_chars" != x; then
46590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46594      # Going to short mode and back again did indeed matter. Since short mode is
46595      # case insensitive, let's make it lowercase to improve readability.
46596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46597      # Now convert it back to Unix-stile (cygpath)
46598      input_path=`$CYGPATH -u "$shortmode_path"`
46599      new_path="$input_path"
46600    fi
46601  fi
46602
46603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46604  if test "x$test_cygdrive_prefix" = x; then
46605    # As a simple fix, exclude /usr/bin since it's not a real path.
46606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46608      # a path prefixed by /cygdrive for fixpath to work.
46609      new_path="$CYGWIN_ROOT_PATH$input_path"
46610    fi
46611  fi
46612
46613
46614  if test "x$path" != "x$new_path"; then
46615    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46617$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46618  fi
46619
46620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46621
46622  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46623  has_colon=`$ECHO $path | $GREP ^.:`
46624  new_path="$path"
46625  if test "x$has_colon" = x; then
46626    # Not in mixed or Windows style, start by that.
46627    new_path=`cmd //c echo $path`
46628  fi
46629
46630
46631  input_path="$new_path"
46632  # Check if we need to convert this using DOS-style short mode. If the path
46633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46634  # take no chances and rewrite it.
46635  # Note: m4 eats our [], so we need to use [ and ] instead.
46636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46637  if test "x$has_forbidden_chars" != x; then
46638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46640  fi
46641
46642
46643  windows_path="$new_path"
46644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46645    unix_path=`$CYGPATH -u "$windows_path"`
46646    new_path="$unix_path"
46647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46649    new_path="$unix_path"
46650  fi
46651
46652  if test "x$path" != "x$new_path"; then
46653    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46655$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46656  fi
46657
46658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46660
46661    else
46662      # We're on a unix platform. Hooray! :)
46663      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46664      has_space=`$ECHO "$path" | $GREP " "`
46665      if test "x$has_space" != x; then
46666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46668        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46669      fi
46670
46671      # Use eval to expand a potential ~
46672      eval path="$path"
46673      if test ! -f "$path" && test ! -d "$path"; then
46674        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46675      fi
46676
46677      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46678    fi
46679  fi
46680
46681
46682  # Only process if variable expands to non-empty
46683
46684  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46686
46687  # Input might be given as Windows format, start by converting to
46688  # unix format.
46689  path="$POTENTIAL_FREETYPE_LIB_PATH"
46690  new_path=`$CYGPATH -u "$path"`
46691
46692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46695  # "foo.exe" is OK but "foo" is an error.
46696  #
46697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46698  # It is also a way to make sure we got the proper file name for the real test later on.
46699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46700  if test "x$test_shortpath" = x; then
46701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46702$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46703    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46704  fi
46705
46706  # Call helper function which possibly converts this using DOS-style short mode.
46707  # If so, the updated path is stored in $new_path.
46708
46709  input_path="$new_path"
46710  # Check if we need to convert this using DOS-style short mode. If the path
46711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46712  # take no chances and rewrite it.
46713  # Note: m4 eats our [], so we need to use [ and ] instead.
46714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46715  if test "x$has_forbidden_chars" != x; then
46716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46720      # Going to short mode and back again did indeed matter. Since short mode is
46721      # case insensitive, let's make it lowercase to improve readability.
46722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46723      # Now convert it back to Unix-stile (cygpath)
46724      input_path=`$CYGPATH -u "$shortmode_path"`
46725      new_path="$input_path"
46726    fi
46727  fi
46728
46729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46730  if test "x$test_cygdrive_prefix" = x; then
46731    # As a simple fix, exclude /usr/bin since it's not a real path.
46732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46734      # a path prefixed by /cygdrive for fixpath to work.
46735      new_path="$CYGWIN_ROOT_PATH$input_path"
46736    fi
46737  fi
46738
46739
46740  if test "x$path" != "x$new_path"; then
46741    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46743$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46744  fi
46745
46746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46747
46748  path="$POTENTIAL_FREETYPE_LIB_PATH"
46749  has_colon=`$ECHO $path | $GREP ^.:`
46750  new_path="$path"
46751  if test "x$has_colon" = x; then
46752    # Not in mixed or Windows style, start by that.
46753    new_path=`cmd //c echo $path`
46754  fi
46755
46756
46757  input_path="$new_path"
46758  # Check if we need to convert this using DOS-style short mode. If the path
46759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46760  # take no chances and rewrite it.
46761  # Note: m4 eats our [], so we need to use [ and ] instead.
46762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46763  if test "x$has_forbidden_chars" != x; then
46764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46766  fi
46767
46768
46769  windows_path="$new_path"
46770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46771    unix_path=`$CYGPATH -u "$windows_path"`
46772    new_path="$unix_path"
46773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46775    new_path="$unix_path"
46776  fi
46777
46778  if test "x$path" != "x$new_path"; then
46779    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46781$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46782  fi
46783
46784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46786
46787    else
46788      # We're on a unix platform. Hooray! :)
46789      path="$POTENTIAL_FREETYPE_LIB_PATH"
46790      has_space=`$ECHO "$path" | $GREP " "`
46791      if test "x$has_space" != x; then
46792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46795      fi
46796
46797      # Use eval to expand a potential ~
46798      eval path="$path"
46799      if test ! -f "$path" && test ! -d "$path"; then
46800        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46801      fi
46802
46803      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46804    fi
46805  fi
46806
46807
46808    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46810$as_echo_n "checking for freetype includes... " >&6; }
46811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46812$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46813    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46814    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46815$as_echo_n "checking for freetype libraries... " >&6; }
46816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46817$as_echo "$FREETYPE_LIB_PATH" >&6; }
46818  fi
46819
46820          fi
46821
46822          if test "x$FOUND_FREETYPE" != xyes; then
46823            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46824
46825  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46826  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46827  METHOD="well-known location"
46828
46829  # Let's start with an optimistic view of the world :-)
46830  FOUND_FREETYPE=yes
46831
46832  # First look for the canonical freetype main include file ft2build.h.
46833  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46834    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46835    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46836    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46837      # Fail.
46838      FOUND_FREETYPE=no
46839    fi
46840  fi
46841
46842  if test "x$FOUND_FREETYPE" = xyes; then
46843    # Include file found, let's continue the sanity check.
46844    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46845$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46846
46847    # Reset to default value
46848    FREETYPE_BASE_NAME=freetype
46849    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46850    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46851      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46852          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46853        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46854        # for the .6 version explicitly.
46855        FREETYPE_BASE_NAME=freetype.6
46856        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46857        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46858$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46859      else
46860        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46861$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46862        FOUND_FREETYPE=no
46863      fi
46864    else
46865      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46866        # On Windows, we will need both .lib and .dll file.
46867        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46868          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46870          FOUND_FREETYPE=no
46871        fi
46872      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46873          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46874        # Found lib in isa dir, use that instead.
46875        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46876        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46877$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46878      fi
46879    fi
46880  fi
46881
46882  if test "x$FOUND_FREETYPE" = xyes; then
46883
46884  # Only process if variable expands to non-empty
46885
46886  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46887    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46888
46889  # Input might be given as Windows format, start by converting to
46890  # unix format.
46891  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46892  new_path=`$CYGPATH -u "$path"`
46893
46894  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46895  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46896  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46897  # "foo.exe" is OK but "foo" is an error.
46898  #
46899  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46900  # It is also a way to make sure we got the proper file name for the real test later on.
46901  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46902  if test "x$test_shortpath" = x; then
46903    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46904$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46905    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46906  fi
46907
46908  # Call helper function which possibly converts this using DOS-style short mode.
46909  # If so, the updated path is stored in $new_path.
46910
46911  input_path="$new_path"
46912  # Check if we need to convert this using DOS-style short mode. If the path
46913  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46914  # take no chances and rewrite it.
46915  # Note: m4 eats our [], so we need to use [ and ] instead.
46916  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46917  if test "x$has_forbidden_chars" != x; then
46918    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46919    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46920    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46921    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46922      # Going to short mode and back again did indeed matter. Since short mode is
46923      # case insensitive, let's make it lowercase to improve readability.
46924      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46925      # Now convert it back to Unix-stile (cygpath)
46926      input_path=`$CYGPATH -u "$shortmode_path"`
46927      new_path="$input_path"
46928    fi
46929  fi
46930
46931  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46932  if test "x$test_cygdrive_prefix" = x; then
46933    # As a simple fix, exclude /usr/bin since it's not a real path.
46934    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46935      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46936      # a path prefixed by /cygdrive for fixpath to work.
46937      new_path="$CYGWIN_ROOT_PATH$input_path"
46938    fi
46939  fi
46940
46941
46942  if test "x$path" != "x$new_path"; then
46943    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46944    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46945$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46946  fi
46947
46948    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46949
46950  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46951  has_colon=`$ECHO $path | $GREP ^.:`
46952  new_path="$path"
46953  if test "x$has_colon" = x; then
46954    # Not in mixed or Windows style, start by that.
46955    new_path=`cmd //c echo $path`
46956  fi
46957
46958
46959  input_path="$new_path"
46960  # Check if we need to convert this using DOS-style short mode. If the path
46961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46962  # take no chances and rewrite it.
46963  # Note: m4 eats our [], so we need to use [ and ] instead.
46964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46965  if test "x$has_forbidden_chars" != x; then
46966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46967    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46968  fi
46969
46970
46971  windows_path="$new_path"
46972  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46973    unix_path=`$CYGPATH -u "$windows_path"`
46974    new_path="$unix_path"
46975  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46976    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46977    new_path="$unix_path"
46978  fi
46979
46980  if test "x$path" != "x$new_path"; then
46981    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46983$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46984  fi
46985
46986  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46987  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46988
46989    else
46990      # We're on a unix platform. Hooray! :)
46991      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46992      has_space=`$ECHO "$path" | $GREP " "`
46993      if test "x$has_space" != x; then
46994        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46995$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46996        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46997      fi
46998
46999      # Use eval to expand a potential ~
47000      eval path="$path"
47001      if test ! -f "$path" && test ! -d "$path"; then
47002        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47003      fi
47004
47005      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47006    fi
47007  fi
47008
47009
47010  # Only process if variable expands to non-empty
47011
47012  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47014
47015  # Input might be given as Windows format, start by converting to
47016  # unix format.
47017  path="$POTENTIAL_FREETYPE_LIB_PATH"
47018  new_path=`$CYGPATH -u "$path"`
47019
47020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47023  # "foo.exe" is OK but "foo" is an error.
47024  #
47025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47026  # It is also a way to make sure we got the proper file name for the real test later on.
47027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47028  if test "x$test_shortpath" = x; then
47029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47030$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47031    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47032  fi
47033
47034  # Call helper function which possibly converts this using DOS-style short mode.
47035  # If so, the updated path is stored in $new_path.
47036
47037  input_path="$new_path"
47038  # Check if we need to convert this using DOS-style short mode. If the path
47039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47040  # take no chances and rewrite it.
47041  # Note: m4 eats our [], so we need to use [ and ] instead.
47042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47043  if test "x$has_forbidden_chars" != x; then
47044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47048      # Going to short mode and back again did indeed matter. Since short mode is
47049      # case insensitive, let's make it lowercase to improve readability.
47050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47051      # Now convert it back to Unix-stile (cygpath)
47052      input_path=`$CYGPATH -u "$shortmode_path"`
47053      new_path="$input_path"
47054    fi
47055  fi
47056
47057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47058  if test "x$test_cygdrive_prefix" = x; then
47059    # As a simple fix, exclude /usr/bin since it's not a real path.
47060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47062      # a path prefixed by /cygdrive for fixpath to work.
47063      new_path="$CYGWIN_ROOT_PATH$input_path"
47064    fi
47065  fi
47066
47067
47068  if test "x$path" != "x$new_path"; then
47069    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47071$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47072  fi
47073
47074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47075
47076  path="$POTENTIAL_FREETYPE_LIB_PATH"
47077  has_colon=`$ECHO $path | $GREP ^.:`
47078  new_path="$path"
47079  if test "x$has_colon" = x; then
47080    # Not in mixed or Windows style, start by that.
47081    new_path=`cmd //c echo $path`
47082  fi
47083
47084
47085  input_path="$new_path"
47086  # Check if we need to convert this using DOS-style short mode. If the path
47087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47088  # take no chances and rewrite it.
47089  # Note: m4 eats our [], so we need to use [ and ] instead.
47090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47091  if test "x$has_forbidden_chars" != x; then
47092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47094  fi
47095
47096
47097  windows_path="$new_path"
47098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47099    unix_path=`$CYGPATH -u "$windows_path"`
47100    new_path="$unix_path"
47101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47103    new_path="$unix_path"
47104  fi
47105
47106  if test "x$path" != "x$new_path"; then
47107    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47109$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47110  fi
47111
47112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47114
47115    else
47116      # We're on a unix platform. Hooray! :)
47117      path="$POTENTIAL_FREETYPE_LIB_PATH"
47118      has_space=`$ECHO "$path" | $GREP " "`
47119      if test "x$has_space" != x; then
47120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47121$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47123      fi
47124
47125      # Use eval to expand a potential ~
47126      eval path="$path"
47127      if test ! -f "$path" && test ! -d "$path"; then
47128        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47129      fi
47130
47131      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47132    fi
47133  fi
47134
47135
47136    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47138$as_echo_n "checking for freetype includes... " >&6; }
47139    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47140$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47141    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47143$as_echo_n "checking for freetype libraries... " >&6; }
47144    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47145$as_echo "$FREETYPE_LIB_PATH" >&6; }
47146  fi
47147
47148          fi
47149
47150          if test "x$FOUND_FREETYPE" != xyes; then
47151            FREETYPE_BASE_DIR="$SYSROOT/usr"
47152            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47153
47154  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47155  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47156  METHOD="well-known location"
47157
47158  # Let's start with an optimistic view of the world :-)
47159  FOUND_FREETYPE=yes
47160
47161  # First look for the canonical freetype main include file ft2build.h.
47162  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47163    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47164    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47165    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47166      # Fail.
47167      FOUND_FREETYPE=no
47168    fi
47169  fi
47170
47171  if test "x$FOUND_FREETYPE" = xyes; then
47172    # Include file found, let's continue the sanity check.
47173    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47174$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47175
47176    # Reset to default value
47177    FREETYPE_BASE_NAME=freetype
47178    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47179    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47180      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47181          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47182        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47183        # for the .6 version explicitly.
47184        FREETYPE_BASE_NAME=freetype.6
47185        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47186        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47187$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47188      else
47189        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47190$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47191        FOUND_FREETYPE=no
47192      fi
47193    else
47194      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47195        # On Windows, we will need both .lib and .dll file.
47196        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47197          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47198$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47199          FOUND_FREETYPE=no
47200        fi
47201      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47202          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47203        # Found lib in isa dir, use that instead.
47204        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47205        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47206$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47207      fi
47208    fi
47209  fi
47210
47211  if test "x$FOUND_FREETYPE" = xyes; then
47212
47213  # Only process if variable expands to non-empty
47214
47215  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47217
47218  # Input might be given as Windows format, start by converting to
47219  # unix format.
47220  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47221  new_path=`$CYGPATH -u "$path"`
47222
47223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47226  # "foo.exe" is OK but "foo" is an error.
47227  #
47228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47229  # It is also a way to make sure we got the proper file name for the real test later on.
47230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47231  if test "x$test_shortpath" = x; then
47232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47233$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47234    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47235  fi
47236
47237  # Call helper function which possibly converts this using DOS-style short mode.
47238  # If so, the updated path is stored in $new_path.
47239
47240  input_path="$new_path"
47241  # Check if we need to convert this using DOS-style short mode. If the path
47242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47243  # take no chances and rewrite it.
47244  # Note: m4 eats our [], so we need to use [ and ] instead.
47245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47246  if test "x$has_forbidden_chars" != x; then
47247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47251      # Going to short mode and back again did indeed matter. Since short mode is
47252      # case insensitive, let's make it lowercase to improve readability.
47253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47254      # Now convert it back to Unix-stile (cygpath)
47255      input_path=`$CYGPATH -u "$shortmode_path"`
47256      new_path="$input_path"
47257    fi
47258  fi
47259
47260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47261  if test "x$test_cygdrive_prefix" = x; then
47262    # As a simple fix, exclude /usr/bin since it's not a real path.
47263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47265      # a path prefixed by /cygdrive for fixpath to work.
47266      new_path="$CYGWIN_ROOT_PATH$input_path"
47267    fi
47268  fi
47269
47270
47271  if test "x$path" != "x$new_path"; then
47272    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47274$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47275  fi
47276
47277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47278
47279  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47280  has_colon=`$ECHO $path | $GREP ^.:`
47281  new_path="$path"
47282  if test "x$has_colon" = x; then
47283    # Not in mixed or Windows style, start by that.
47284    new_path=`cmd //c echo $path`
47285  fi
47286
47287
47288  input_path="$new_path"
47289  # Check if we need to convert this using DOS-style short mode. If the path
47290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47291  # take no chances and rewrite it.
47292  # Note: m4 eats our [], so we need to use [ and ] instead.
47293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47294  if test "x$has_forbidden_chars" != x; then
47295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47297  fi
47298
47299
47300  windows_path="$new_path"
47301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47302    unix_path=`$CYGPATH -u "$windows_path"`
47303    new_path="$unix_path"
47304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47306    new_path="$unix_path"
47307  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47317
47318    else
47319      # We're on a unix platform. Hooray! :)
47320      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47321      has_space=`$ECHO "$path" | $GREP " "`
47322      if test "x$has_space" != x; then
47323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47324$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47326      fi
47327
47328      # Use eval to expand a potential ~
47329      eval path="$path"
47330      if test ! -f "$path" && test ! -d "$path"; then
47331        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47332      fi
47333
47334      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47335    fi
47336  fi
47337
47338
47339  # Only process if variable expands to non-empty
47340
47341  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47342    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47343
47344  # Input might be given as Windows format, start by converting to
47345  # unix format.
47346  path="$POTENTIAL_FREETYPE_LIB_PATH"
47347  new_path=`$CYGPATH -u "$path"`
47348
47349  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47350  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47351  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47352  # "foo.exe" is OK but "foo" is an error.
47353  #
47354  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47355  # It is also a way to make sure we got the proper file name for the real test later on.
47356  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47357  if test "x$test_shortpath" = x; then
47358    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47359$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47360    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47361  fi
47362
47363  # Call helper function which possibly converts this using DOS-style short mode.
47364  # If so, the updated path is stored in $new_path.
47365
47366  input_path="$new_path"
47367  # Check if we need to convert this using DOS-style short mode. If the path
47368  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47369  # take no chances and rewrite it.
47370  # Note: m4 eats our [], so we need to use [ and ] instead.
47371  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47372  if test "x$has_forbidden_chars" != x; then
47373    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47374    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47375    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47376    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47377      # Going to short mode and back again did indeed matter. Since short mode is
47378      # case insensitive, let's make it lowercase to improve readability.
47379      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47380      # Now convert it back to Unix-stile (cygpath)
47381      input_path=`$CYGPATH -u "$shortmode_path"`
47382      new_path="$input_path"
47383    fi
47384  fi
47385
47386  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47387  if test "x$test_cygdrive_prefix" = x; then
47388    # As a simple fix, exclude /usr/bin since it's not a real path.
47389    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47390      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47391      # a path prefixed by /cygdrive for fixpath to work.
47392      new_path="$CYGWIN_ROOT_PATH$input_path"
47393    fi
47394  fi
47395
47396
47397  if test "x$path" != "x$new_path"; then
47398    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47400$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47401  fi
47402
47403    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47404
47405  path="$POTENTIAL_FREETYPE_LIB_PATH"
47406  has_colon=`$ECHO $path | $GREP ^.:`
47407  new_path="$path"
47408  if test "x$has_colon" = x; then
47409    # Not in mixed or Windows style, start by that.
47410    new_path=`cmd //c echo $path`
47411  fi
47412
47413
47414  input_path="$new_path"
47415  # Check if we need to convert this using DOS-style short mode. If the path
47416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47417  # take no chances and rewrite it.
47418  # Note: m4 eats our [], so we need to use [ and ] instead.
47419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47420  if test "x$has_forbidden_chars" != x; then
47421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47423  fi
47424
47425
47426  windows_path="$new_path"
47427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47428    unix_path=`$CYGPATH -u "$windows_path"`
47429    new_path="$unix_path"
47430  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47431    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47432    new_path="$unix_path"
47433  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47442  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47443
47444    else
47445      # We're on a unix platform. Hooray! :)
47446      path="$POTENTIAL_FREETYPE_LIB_PATH"
47447      has_space=`$ECHO "$path" | $GREP " "`
47448      if test "x$has_space" != x; then
47449        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47450$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47451        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47452      fi
47453
47454      # Use eval to expand a potential ~
47455      eval path="$path"
47456      if test ! -f "$path" && test ! -d "$path"; then
47457        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47458      fi
47459
47460      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47461    fi
47462  fi
47463
47464
47465    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47466    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47467$as_echo_n "checking for freetype includes... " >&6; }
47468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47469$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47470    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47471    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47472$as_echo_n "checking for freetype libraries... " >&6; }
47473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47474$as_echo "$FREETYPE_LIB_PATH" >&6; }
47475  fi
47476
47477            else
47478
47479  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47480  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47481  METHOD="well-known location"
47482
47483  # Let's start with an optimistic view of the world :-)
47484  FOUND_FREETYPE=yes
47485
47486  # First look for the canonical freetype main include file ft2build.h.
47487  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47488    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47489    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47490    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47491      # Fail.
47492      FOUND_FREETYPE=no
47493    fi
47494  fi
47495
47496  if test "x$FOUND_FREETYPE" = xyes; then
47497    # Include file found, let's continue the sanity check.
47498    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47499$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47500
47501    # Reset to default value
47502    FREETYPE_BASE_NAME=freetype
47503    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47504    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47505      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47506          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47507        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47508        # for the .6 version explicitly.
47509        FREETYPE_BASE_NAME=freetype.6
47510        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47511        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47512$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47513      else
47514        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47515$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47516        FOUND_FREETYPE=no
47517      fi
47518    else
47519      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47520        # On Windows, we will need both .lib and .dll file.
47521        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47522          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47523$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47524          FOUND_FREETYPE=no
47525        fi
47526      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47527          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47528        # Found lib in isa dir, use that instead.
47529        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47530        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47531$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47532      fi
47533    fi
47534  fi
47535
47536  if test "x$FOUND_FREETYPE" = xyes; then
47537
47538  # Only process if variable expands to non-empty
47539
47540  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47541    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47542
47543  # Input might be given as Windows format, start by converting to
47544  # unix format.
47545  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47546  new_path=`$CYGPATH -u "$path"`
47547
47548  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47549  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47550  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47551  # "foo.exe" is OK but "foo" is an error.
47552  #
47553  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47554  # It is also a way to make sure we got the proper file name for the real test later on.
47555  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47556  if test "x$test_shortpath" = x; then
47557    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47559    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47560  fi
47561
47562  # Call helper function which possibly converts this using DOS-style short mode.
47563  # If so, the updated path is stored in $new_path.
47564
47565  input_path="$new_path"
47566  # Check if we need to convert this using DOS-style short mode. If the path
47567  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47568  # take no chances and rewrite it.
47569  # Note: m4 eats our [], so we need to use [ and ] instead.
47570  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47571  if test "x$has_forbidden_chars" != x; then
47572    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47573    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47574    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47575    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47576      # Going to short mode and back again did indeed matter. Since short mode is
47577      # case insensitive, let's make it lowercase to improve readability.
47578      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47579      # Now convert it back to Unix-stile (cygpath)
47580      input_path=`$CYGPATH -u "$shortmode_path"`
47581      new_path="$input_path"
47582    fi
47583  fi
47584
47585  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47586  if test "x$test_cygdrive_prefix" = x; then
47587    # As a simple fix, exclude /usr/bin since it's not a real path.
47588    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47589      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47590      # a path prefixed by /cygdrive for fixpath to work.
47591      new_path="$CYGWIN_ROOT_PATH$input_path"
47592    fi
47593  fi
47594
47595
47596  if test "x$path" != "x$new_path"; then
47597    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47599$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47600  fi
47601
47602    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47603
47604  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47605  has_colon=`$ECHO $path | $GREP ^.:`
47606  new_path="$path"
47607  if test "x$has_colon" = x; then
47608    # Not in mixed or Windows style, start by that.
47609    new_path=`cmd //c echo $path`
47610  fi
47611
47612
47613  input_path="$new_path"
47614  # Check if we need to convert this using DOS-style short mode. If the path
47615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47616  # take no chances and rewrite it.
47617  # Note: m4 eats our [], so we need to use [ and ] instead.
47618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47619  if test "x$has_forbidden_chars" != x; then
47620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47621    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47622  fi
47623
47624
47625  windows_path="$new_path"
47626  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47627    unix_path=`$CYGPATH -u "$windows_path"`
47628    new_path="$unix_path"
47629  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47630    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47631    new_path="$unix_path"
47632  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47641  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47642
47643    else
47644      # We're on a unix platform. Hooray! :)
47645      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47646      has_space=`$ECHO "$path" | $GREP " "`
47647      if test "x$has_space" != x; then
47648        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47649$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47650        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47651      fi
47652
47653      # Use eval to expand a potential ~
47654      eval path="$path"
47655      if test ! -f "$path" && test ! -d "$path"; then
47656        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47657      fi
47658
47659      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47660    fi
47661  fi
47662
47663
47664  # Only process if variable expands to non-empty
47665
47666  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47668
47669  # Input might be given as Windows format, start by converting to
47670  # unix format.
47671  path="$POTENTIAL_FREETYPE_LIB_PATH"
47672  new_path=`$CYGPATH -u "$path"`
47673
47674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47677  # "foo.exe" is OK but "foo" is an error.
47678  #
47679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47680  # It is also a way to make sure we got the proper file name for the real test later on.
47681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47682  if test "x$test_shortpath" = x; then
47683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47686  fi
47687
47688  # Call helper function which possibly converts this using DOS-style short mode.
47689  # If so, the updated path is stored in $new_path.
47690
47691  input_path="$new_path"
47692  # Check if we need to convert this using DOS-style short mode. If the path
47693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47694  # take no chances and rewrite it.
47695  # Note: m4 eats our [], so we need to use [ and ] instead.
47696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47697  if test "x$has_forbidden_chars" != x; then
47698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47702      # Going to short mode and back again did indeed matter. Since short mode is
47703      # case insensitive, let's make it lowercase to improve readability.
47704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47705      # Now convert it back to Unix-stile (cygpath)
47706      input_path=`$CYGPATH -u "$shortmode_path"`
47707      new_path="$input_path"
47708    fi
47709  fi
47710
47711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47712  if test "x$test_cygdrive_prefix" = x; then
47713    # As a simple fix, exclude /usr/bin since it's not a real path.
47714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47716      # a path prefixed by /cygdrive for fixpath to work.
47717      new_path="$CYGWIN_ROOT_PATH$input_path"
47718    fi
47719  fi
47720
47721
47722  if test "x$path" != "x$new_path"; then
47723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47726  fi
47727
47728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47729
47730  path="$POTENTIAL_FREETYPE_LIB_PATH"
47731  has_colon=`$ECHO $path | $GREP ^.:`
47732  new_path="$path"
47733  if test "x$has_colon" = x; then
47734    # Not in mixed or Windows style, start by that.
47735    new_path=`cmd //c echo $path`
47736  fi
47737
47738
47739  input_path="$new_path"
47740  # Check if we need to convert this using DOS-style short mode. If the path
47741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47742  # take no chances and rewrite it.
47743  # Note: m4 eats our [], so we need to use [ and ] instead.
47744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47745  if test "x$has_forbidden_chars" != x; then
47746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47748  fi
47749
47750
47751  windows_path="$new_path"
47752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47753    unix_path=`$CYGPATH -u "$windows_path"`
47754    new_path="$unix_path"
47755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47757    new_path="$unix_path"
47758  fi
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  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47768
47769    else
47770      # We're on a unix platform. Hooray! :)
47771      path="$POTENTIAL_FREETYPE_LIB_PATH"
47772      has_space=`$ECHO "$path" | $GREP " "`
47773      if test "x$has_space" != x; then
47774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47777      fi
47778
47779      # Use eval to expand a potential ~
47780      eval path="$path"
47781      if test ! -f "$path" && test ! -d "$path"; then
47782        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47783      fi
47784
47785      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47786    fi
47787  fi
47788
47789
47790    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47791    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47792$as_echo_n "checking for freetype includes... " >&6; }
47793    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47794$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47795    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47796    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47797$as_echo_n "checking for freetype libraries... " >&6; }
47798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47799$as_echo "$FREETYPE_LIB_PATH" >&6; }
47800  fi
47801
47802              if test "x$FOUND_FREETYPE" != xyes; then
47803
47804  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47805  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47806  METHOD="well-known location"
47807
47808  # Let's start with an optimistic view of the world :-)
47809  FOUND_FREETYPE=yes
47810
47811  # First look for the canonical freetype main include file ft2build.h.
47812  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47813    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47814    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47815    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47816      # Fail.
47817      FOUND_FREETYPE=no
47818    fi
47819  fi
47820
47821  if test "x$FOUND_FREETYPE" = xyes; then
47822    # Include file found, let's continue the sanity check.
47823    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47824$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47825
47826    # Reset to default value
47827    FREETYPE_BASE_NAME=freetype
47828    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47829    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47830      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47831          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47832        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47833        # for the .6 version explicitly.
47834        FREETYPE_BASE_NAME=freetype.6
47835        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47836        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47837$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47838      else
47839        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47840$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47841        FOUND_FREETYPE=no
47842      fi
47843    else
47844      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47845        # On Windows, we will need both .lib and .dll file.
47846        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47847          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47848$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47849          FOUND_FREETYPE=no
47850        fi
47851      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47852          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47853        # Found lib in isa dir, use that instead.
47854        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47855        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47856$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47857      fi
47858    fi
47859  fi
47860
47861  if test "x$FOUND_FREETYPE" = xyes; then
47862
47863  # Only process if variable expands to non-empty
47864
47865  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47867
47868  # Input might be given as Windows format, start by converting to
47869  # unix format.
47870  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47871  new_path=`$CYGPATH -u "$path"`
47872
47873  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47874  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47875  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47876  # "foo.exe" is OK but "foo" is an error.
47877  #
47878  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47879  # It is also a way to make sure we got the proper file name for the real test later on.
47880  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47881  if test "x$test_shortpath" = x; then
47882    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47883$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47884    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47885  fi
47886
47887  # Call helper function which possibly converts this using DOS-style short mode.
47888  # If so, the updated path is stored in $new_path.
47889
47890  input_path="$new_path"
47891  # Check if we need to convert this using DOS-style short mode. If the path
47892  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47893  # take no chances and rewrite it.
47894  # Note: m4 eats our [], so we need to use [ and ] instead.
47895  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47896  if test "x$has_forbidden_chars" != x; then
47897    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47898    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47899    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47900    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47901      # Going to short mode and back again did indeed matter. Since short mode is
47902      # case insensitive, let's make it lowercase to improve readability.
47903      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47904      # Now convert it back to Unix-stile (cygpath)
47905      input_path=`$CYGPATH -u "$shortmode_path"`
47906      new_path="$input_path"
47907    fi
47908  fi
47909
47910  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47911  if test "x$test_cygdrive_prefix" = x; then
47912    # As a simple fix, exclude /usr/bin since it's not a real path.
47913    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47914      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47915      # a path prefixed by /cygdrive for fixpath to work.
47916      new_path="$CYGWIN_ROOT_PATH$input_path"
47917    fi
47918  fi
47919
47920
47921  if test "x$path" != "x$new_path"; then
47922    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47924$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47925  fi
47926
47927    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47928
47929  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47930  has_colon=`$ECHO $path | $GREP ^.:`
47931  new_path="$path"
47932  if test "x$has_colon" = x; then
47933    # Not in mixed or Windows style, start by that.
47934    new_path=`cmd //c echo $path`
47935  fi
47936
47937
47938  input_path="$new_path"
47939  # Check if we need to convert this using DOS-style short mode. If the path
47940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47941  # take no chances and rewrite it.
47942  # Note: m4 eats our [], so we need to use [ and ] instead.
47943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47944  if test "x$has_forbidden_chars" != x; then
47945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47946    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47947  fi
47948
47949
47950  windows_path="$new_path"
47951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47952    unix_path=`$CYGPATH -u "$windows_path"`
47953    new_path="$unix_path"
47954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47956    new_path="$unix_path"
47957  fi
47958
47959  if test "x$path" != "x$new_path"; then
47960    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47961    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47962$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47963  fi
47964
47965  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47966  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47967
47968    else
47969      # We're on a unix platform. Hooray! :)
47970      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47971      has_space=`$ECHO "$path" | $GREP " "`
47972      if test "x$has_space" != x; then
47973        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47974$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47975        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47976      fi
47977
47978      # Use eval to expand a potential ~
47979      eval path="$path"
47980      if test ! -f "$path" && test ! -d "$path"; then
47981        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47982      fi
47983
47984      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47985    fi
47986  fi
47987
47988
47989  # Only process if variable expands to non-empty
47990
47991  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47992    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47993
47994  # Input might be given as Windows format, start by converting to
47995  # unix format.
47996  path="$POTENTIAL_FREETYPE_LIB_PATH"
47997  new_path=`$CYGPATH -u "$path"`
47998
47999  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48000  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48001  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48002  # "foo.exe" is OK but "foo" is an error.
48003  #
48004  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48005  # It is also a way to make sure we got the proper file name for the real test later on.
48006  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48007  if test "x$test_shortpath" = x; then
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48009$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48010    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48011  fi
48012
48013  # Call helper function which possibly converts this using DOS-style short mode.
48014  # If so, the updated path is stored in $new_path.
48015
48016  input_path="$new_path"
48017  # Check if we need to convert this using DOS-style short mode. If the path
48018  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48019  # take no chances and rewrite it.
48020  # Note: m4 eats our [], so we need to use [ and ] instead.
48021  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48022  if test "x$has_forbidden_chars" != x; then
48023    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48024    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48025    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48026    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48027      # Going to short mode and back again did indeed matter. Since short mode is
48028      # case insensitive, let's make it lowercase to improve readability.
48029      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48030      # Now convert it back to Unix-stile (cygpath)
48031      input_path=`$CYGPATH -u "$shortmode_path"`
48032      new_path="$input_path"
48033    fi
48034  fi
48035
48036  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48037  if test "x$test_cygdrive_prefix" = x; then
48038    # As a simple fix, exclude /usr/bin since it's not a real path.
48039    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48040      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48041      # a path prefixed by /cygdrive for fixpath to work.
48042      new_path="$CYGWIN_ROOT_PATH$input_path"
48043    fi
48044  fi
48045
48046
48047  if test "x$path" != "x$new_path"; then
48048    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48050$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48051  fi
48052
48053    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48054
48055  path="$POTENTIAL_FREETYPE_LIB_PATH"
48056  has_colon=`$ECHO $path | $GREP ^.:`
48057  new_path="$path"
48058  if test "x$has_colon" = x; then
48059    # Not in mixed or Windows style, start by that.
48060    new_path=`cmd //c echo $path`
48061  fi
48062
48063
48064  input_path="$new_path"
48065  # Check if we need to convert this using DOS-style short mode. If the path
48066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48067  # take no chances and rewrite it.
48068  # Note: m4 eats our [], so we need to use [ and ] instead.
48069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48070  if test "x$has_forbidden_chars" != x; then
48071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48072    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48073  fi
48074
48075
48076  windows_path="$new_path"
48077  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48078    unix_path=`$CYGPATH -u "$windows_path"`
48079    new_path="$unix_path"
48080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48081    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48082    new_path="$unix_path"
48083  fi
48084
48085  if test "x$path" != "x$new_path"; then
48086    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48089  fi
48090
48091  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48092  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48093
48094    else
48095      # We're on a unix platform. Hooray! :)
48096      path="$POTENTIAL_FREETYPE_LIB_PATH"
48097      has_space=`$ECHO "$path" | $GREP " "`
48098      if test "x$has_space" != x; then
48099        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48100$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48101        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48102      fi
48103
48104      # Use eval to expand a potential ~
48105      eval path="$path"
48106      if test ! -f "$path" && test ! -d "$path"; then
48107        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48108      fi
48109
48110      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48111    fi
48112  fi
48113
48114
48115    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48117$as_echo_n "checking for freetype includes... " >&6; }
48118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48119$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48120    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48121    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48122$as_echo_n "checking for freetype libraries... " >&6; }
48123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48124$as_echo "$FREETYPE_LIB_PATH" >&6; }
48125  fi
48126
48127              fi
48128            fi
48129          fi
48130        fi
48131      fi # end check in well-known locations
48132
48133      if test "x$FOUND_FREETYPE" != xyes; then
48134
48135  # Print a helpful message on how to acquire the necessary build dependency.
48136  # freetype is the help tag: freetype, cups, pulse, alsa etc
48137  MISSING_DEPENDENCY=freetype
48138
48139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48140    cygwin_help $MISSING_DEPENDENCY
48141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48142    msys_help $MISSING_DEPENDENCY
48143  else
48144    PKGHANDLER_COMMAND=
48145
48146    case $PKGHANDLER in
48147      apt-get)
48148        apt_help     $MISSING_DEPENDENCY ;;
48149      yum)
48150        yum_help     $MISSING_DEPENDENCY ;;
48151      port)
48152        port_help    $MISSING_DEPENDENCY ;;
48153      pkgutil)
48154        pkgutil_help $MISSING_DEPENDENCY ;;
48155      pkgadd)
48156        pkgadd_help  $MISSING_DEPENDENCY ;;
48157    esac
48158
48159    if test "x$PKGHANDLER_COMMAND" != x; then
48160      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48161    fi
48162  fi
48163
48164        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48165      fi
48166    fi # end user specified settings
48167
48168    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48169    if test "x$FREETYPE_CFLAGS" = x; then
48170
48171  # Only process if variable expands to non-empty
48172
48173  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48175
48176  # Input might be given as Windows format, start by converting to
48177  # unix format.
48178  path="$FREETYPE_INCLUDE_PATH"
48179  new_path=`$CYGPATH -u "$path"`
48180
48181  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48182  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48183  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48184  # "foo.exe" is OK but "foo" is an error.
48185  #
48186  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48187  # It is also a way to make sure we got the proper file name for the real test later on.
48188  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48189  if test "x$test_shortpath" = x; then
48190    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48191$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48192    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48193  fi
48194
48195  # Call helper function which possibly converts this using DOS-style short mode.
48196  # If so, the updated path is stored in $new_path.
48197
48198  input_path="$new_path"
48199  # Check if we need to convert this using DOS-style short mode. If the path
48200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48201  # take no chances and rewrite it.
48202  # Note: m4 eats our [], so we need to use [ and ] instead.
48203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48204  if test "x$has_forbidden_chars" != x; then
48205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48206    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48207    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48208    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48209      # Going to short mode and back again did indeed matter. Since short mode is
48210      # case insensitive, let's make it lowercase to improve readability.
48211      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48212      # Now convert it back to Unix-stile (cygpath)
48213      input_path=`$CYGPATH -u "$shortmode_path"`
48214      new_path="$input_path"
48215    fi
48216  fi
48217
48218  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48219  if test "x$test_cygdrive_prefix" = x; then
48220    # As a simple fix, exclude /usr/bin since it's not a real path.
48221    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48222      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48223      # a path prefixed by /cygdrive for fixpath to work.
48224      new_path="$CYGWIN_ROOT_PATH$input_path"
48225    fi
48226  fi
48227
48228
48229  if test "x$path" != "x$new_path"; then
48230    FREETYPE_INCLUDE_PATH="$new_path"
48231    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48232$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48233  fi
48234
48235    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48236
48237  path="$FREETYPE_INCLUDE_PATH"
48238  has_colon=`$ECHO $path | $GREP ^.:`
48239  new_path="$path"
48240  if test "x$has_colon" = x; then
48241    # Not in mixed or Windows style, start by that.
48242    new_path=`cmd //c echo $path`
48243  fi
48244
48245
48246  input_path="$new_path"
48247  # Check if we need to convert this using DOS-style short mode. If the path
48248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48249  # take no chances and rewrite it.
48250  # Note: m4 eats our [], so we need to use [ and ] instead.
48251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48252  if test "x$has_forbidden_chars" != x; then
48253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48254    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48255  fi
48256
48257
48258  windows_path="$new_path"
48259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48260    unix_path=`$CYGPATH -u "$windows_path"`
48261    new_path="$unix_path"
48262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48264    new_path="$unix_path"
48265  fi
48266
48267  if test "x$path" != "x$new_path"; then
48268    FREETYPE_INCLUDE_PATH="$new_path"
48269    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48270$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48271  fi
48272
48273  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48274  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48275
48276    else
48277      # We're on a unix platform. Hooray! :)
48278      path="$FREETYPE_INCLUDE_PATH"
48279      has_space=`$ECHO "$path" | $GREP " "`
48280      if test "x$has_space" != x; then
48281        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48282$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48283        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48284      fi
48285
48286      # Use eval to expand a potential ~
48287      eval path="$path"
48288      if test ! -f "$path" && test ! -d "$path"; then
48289        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48290      fi
48291
48292      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48293    fi
48294  fi
48295
48296      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48297        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48298      else
48299        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48300      fi
48301    fi
48302
48303    if test "x$FREETYPE_LIBS" = x; then
48304
48305  # Only process if variable expands to non-empty
48306
48307  if test "x$FREETYPE_LIB_PATH" != x; then
48308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48309
48310  # Input might be given as Windows format, start by converting to
48311  # unix format.
48312  path="$FREETYPE_LIB_PATH"
48313  new_path=`$CYGPATH -u "$path"`
48314
48315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48318  # "foo.exe" is OK but "foo" is an error.
48319  #
48320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48321  # It is also a way to make sure we got the proper file name for the real test later on.
48322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48323  if test "x$test_shortpath" = x; then
48324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48325$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48326    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48327  fi
48328
48329  # Call helper function which possibly converts this using DOS-style short mode.
48330  # If so, the updated path is stored in $new_path.
48331
48332  input_path="$new_path"
48333  # Check if we need to convert this using DOS-style short mode. If the path
48334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48335  # take no chances and rewrite it.
48336  # Note: m4 eats our [], so we need to use [ and ] instead.
48337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48338  if test "x$has_forbidden_chars" != x; then
48339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48343      # Going to short mode and back again did indeed matter. Since short mode is
48344      # case insensitive, let's make it lowercase to improve readability.
48345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48346      # Now convert it back to Unix-stile (cygpath)
48347      input_path=`$CYGPATH -u "$shortmode_path"`
48348      new_path="$input_path"
48349    fi
48350  fi
48351
48352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48353  if test "x$test_cygdrive_prefix" = x; then
48354    # As a simple fix, exclude /usr/bin since it's not a real path.
48355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48357      # a path prefixed by /cygdrive for fixpath to work.
48358      new_path="$CYGWIN_ROOT_PATH$input_path"
48359    fi
48360  fi
48361
48362
48363  if test "x$path" != "x$new_path"; then
48364    FREETYPE_LIB_PATH="$new_path"
48365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48366$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48367  fi
48368
48369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48370
48371  path="$FREETYPE_LIB_PATH"
48372  has_colon=`$ECHO $path | $GREP ^.:`
48373  new_path="$path"
48374  if test "x$has_colon" = x; then
48375    # Not in mixed or Windows style, start by that.
48376    new_path=`cmd //c echo $path`
48377  fi
48378
48379
48380  input_path="$new_path"
48381  # Check if we need to convert this using DOS-style short mode. If the path
48382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48383  # take no chances and rewrite it.
48384  # Note: m4 eats our [], so we need to use [ and ] instead.
48385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48386  if test "x$has_forbidden_chars" != x; then
48387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48389  fi
48390
48391
48392  windows_path="$new_path"
48393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48394    unix_path=`$CYGPATH -u "$windows_path"`
48395    new_path="$unix_path"
48396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48398    new_path="$unix_path"
48399  fi
48400
48401  if test "x$path" != "x$new_path"; then
48402    FREETYPE_LIB_PATH="$new_path"
48403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48404$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48405  fi
48406
48407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48409
48410    else
48411      # We're on a unix platform. Hooray! :)
48412      path="$FREETYPE_LIB_PATH"
48413      has_space=`$ECHO "$path" | $GREP " "`
48414      if test "x$has_space" != x; then
48415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48416$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48418      fi
48419
48420      # Use eval to expand a potential ~
48421      eval path="$path"
48422      if test ! -f "$path" && test ! -d "$path"; then
48423        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48424      fi
48425
48426      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48427    fi
48428  fi
48429
48430      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48431        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48432      else
48433        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48434      fi
48435    fi
48436
48437    # Try to compile it
48438    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48439$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48440    ac_ext=cpp
48441ac_cpp='$CXXCPP $CPPFLAGS'
48442ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48443ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48444ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48445
48446    PREV_CXXCFLAGS="$CXXFLAGS"
48447    PREV_LIBS="$LIBS"
48448    PREV_CXX="$CXX"
48449    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48450    LIBS="$LIBS $FREETYPE_LIBS"
48451    CXX="$FIXPATH $CXX"
48452    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48453/* end confdefs.h.  */
48454
48455          #include<ft2build.h>
48456          #include FT_FREETYPE_H
48457          int main () {
48458            FT_Init_FreeType(NULL);
48459            return 0;
48460          }
48461
48462_ACEOF
48463if ac_fn_cxx_try_link "$LINENO"; then :
48464
48465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48466$as_echo "yes" >&6; }
48467
48468else
48469
48470          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48471$as_echo "no" >&6; }
48472          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48473$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48474          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48475$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48476
48477
48478  # Print a helpful message on how to acquire the necessary build dependency.
48479  # freetype is the help tag: freetype, cups, pulse, alsa etc
48480  MISSING_DEPENDENCY=freetype
48481
48482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48483    cygwin_help $MISSING_DEPENDENCY
48484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48485    msys_help $MISSING_DEPENDENCY
48486  else
48487    PKGHANDLER_COMMAND=
48488
48489    case $PKGHANDLER in
48490      apt-get)
48491        apt_help     $MISSING_DEPENDENCY ;;
48492      yum)
48493        yum_help     $MISSING_DEPENDENCY ;;
48494      port)
48495        port_help    $MISSING_DEPENDENCY ;;
48496      pkgutil)
48497        pkgutil_help $MISSING_DEPENDENCY ;;
48498      pkgadd)
48499        pkgadd_help  $MISSING_DEPENDENCY ;;
48500    esac
48501
48502    if test "x$PKGHANDLER_COMMAND" != x; then
48503      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48504    fi
48505  fi
48506
48507
48508          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48509
48510
48511fi
48512rm -f core conftest.err conftest.$ac_objext \
48513    conftest$ac_exeext conftest.$ac_ext
48514    CXXCFLAGS="$PREV_CXXFLAGS"
48515    LIBS="$PREV_LIBS"
48516    CXX="$PREV_CXX"
48517    ac_ext=cpp
48518ac_cpp='$CXXCPP $CPPFLAGS'
48519ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48520ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48521ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48522
48523
48524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48525$as_echo_n "checking if we should bundle freetype... " >&6; }
48526    if test "x$BUNDLE_FREETYPE" = xyes; then
48527      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48528    fi
48529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48530$as_echo "$BUNDLE_FREETYPE" >&6; }
48531
48532  fi # end freetype needed
48533
48534
48535
48536
48537
48538
48539
48540  ###############################################################################
48541  #
48542  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48543  #
48544
48545# Check whether --with-alsa was given.
48546if test "${with_alsa+set}" = set; then :
48547  withval=$with_alsa;
48548fi
48549
48550
48551# Check whether --with-alsa-include was given.
48552if test "${with_alsa_include+set}" = set; then :
48553  withval=$with_alsa_include;
48554fi
48555
48556
48557# Check whether --with-alsa-lib was given.
48558if test "${with_alsa_lib+set}" = set; then :
48559  withval=$with_alsa_lib;
48560fi
48561
48562
48563  if test "x$ALSA_NOT_NEEDED" = xyes; then
48564    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48565      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48566$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48567    fi
48568    ALSA_CFLAGS=
48569    ALSA_LIBS=
48570  else
48571    ALSA_FOUND=no
48572
48573    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48574      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48575    fi
48576
48577    if test "x${with_alsa}" != x; then
48578      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48579      ALSA_CFLAGS="-I${with_alsa}/include"
48580      ALSA_FOUND=yes
48581    fi
48582    if test "x${with_alsa_include}" != x; then
48583      ALSA_CFLAGS="-I${with_alsa_include}"
48584      ALSA_FOUND=yes
48585    fi
48586    if test "x${with_alsa_lib}" != x; then
48587      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48588      ALSA_FOUND=yes
48589    fi
48590    if test "x$ALSA_FOUND" = xno; then
48591
48592
48593  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48594    # Source the builddeps file again, to make sure it uses the latest variables!
48595    . $builddepsfile
48596    # Look for a target and build machine specific resource!
48597    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48598    if test "x$resource" = x; then
48599      # Ok, lets instead look for a target specific resource
48600      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48601    fi
48602    if test "x$resource" = x; then
48603      # Ok, lets instead look for a build specific resource
48604      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48605    fi
48606    if test "x$resource" = x; then
48607      # Ok, lets instead look for a generic resource
48608      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48609      resource=${builddep_alsa}
48610    fi
48611    if test "x$resource" != x; then
48612      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48613$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48614      # If the resource in the builddeps.conf file is an existing directory,
48615      # for example /java/linux/cups
48616      if test -d ${resource}; then
48617        depdir=${resource}
48618      else
48619
48620  # alsa is for example mymodule
48621  # $resource is for example libs/general/libmymod_1_2_3.zip
48622  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48623  # $with_builddeps_dir is for example /localhome/builddeps
48624  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48625  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48626  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48627  filename=`basename $resource`
48628  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48629  filebase=${filename%%.*}
48630  extension=${filename#*.}
48631  installdir=$with_builddeps_dir/$filebase
48632  if test ! -f $installdir/$filename.unpacked; then
48633    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48634$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48635    if test ! -d $installdir; then
48636      mkdir -p $installdir
48637    fi
48638    if test ! -d $installdir; then
48639      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48640    fi
48641    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48642    touch $tmpfile
48643    if test ! -f $tmpfile; then
48644      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48645    fi
48646
48647  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48648  # $tmpfile is the local file name for the downloaded file.
48649  VALID_TOOL=no
48650  if test "x$BDEPS_FTP" = xwget; then
48651    VALID_TOOL=yes
48652    wget -O $tmpfile $with_builddeps_server/$resource
48653  fi
48654  if test "x$BDEPS_FTP" = xlftp; then
48655    VALID_TOOL=yes
48656    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48657  fi
48658  if test "x$BDEPS_FTP" = xftp; then
48659    VALID_TOOL=yes
48660    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48661    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48662    FTPUSERPWD=${FTPSERVER%%@*}
48663    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48664      FTPUSER=${userpwd%%:*}
48665      FTPPWD=${userpwd#*@}
48666      FTPSERVER=${FTPSERVER#*@}
48667    else
48668      FTPUSER=ftp
48669      FTPPWD=ftp
48670    fi
48671    # the "pass" command does not work on some
48672    # ftp clients (read ftp.exe) but if it works,
48673    # passive mode is better!
48674    ( \
48675        echo "user $FTPUSER $FTPPWD"        ; \
48676        echo "pass"                         ; \
48677        echo "bin"                          ; \
48678        echo "get $FTPPATH $tmpfile"              ; \
48679    ) | ftp -in $FTPSERVER
48680  fi
48681  if test "x$VALID_TOOL" != xyes; then
48682    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48683  fi
48684
48685    mv $tmpfile $installdir/$filename
48686    if test ! -s $installdir/$filename; then
48687      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48688    fi
48689    case "$extension" in
48690      zip)  echo "Unzipping $installdir/$filename..."
48691        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48692        ;;
48693      tar.gz) echo "Untaring $installdir/$filename..."
48694        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48695        ;;
48696      tgz) echo "Untaring $installdir/$filename..."
48697        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48698        ;;
48699      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48700        ;;
48701    esac
48702  fi
48703  if test -f $installdir/$filename.unpacked; then
48704    depdir=$installdir
48705  fi
48706
48707      fi
48708      # Source the builddeps file again, because in the previous command, the depdir
48709      # was updated to point at the current build dependency install directory.
48710      . $builddepsfile
48711      # Now extract variables from the builddeps.conf files.
48712      theroot=${builddep_alsa_ROOT}
48713      thecflags=${builddep_alsa_CFLAGS}
48714      thelibs=${builddep_alsa_LIBS}
48715      if test "x$depdir" = x; then
48716        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48717      fi
48718      ALSA=$depdir
48719      if test "x$theroot" != x; then
48720        ALSA="$theroot"
48721      fi
48722      if test "x$thecflags" != x; then
48723        ALSA_CFLAGS="$thecflags"
48724      fi
48725      if test "x$thelibs" != x; then
48726        ALSA_LIBS="$thelibs"
48727      fi
48728      ALSA_FOUND=yes
48729      else ALSA_FOUND=no
48730
48731    fi
48732    else ALSA_FOUND=no
48733
48734  fi
48735
48736    fi
48737    # Do not try pkg-config if we have a sysroot set.
48738    if test "x$SYSROOT" = x; then
48739      if test "x$ALSA_FOUND" = xno; then
48740
48741pkg_failed=no
48742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48743$as_echo_n "checking for ALSA... " >&6; }
48744
48745if test -n "$ALSA_CFLAGS"; then
48746    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48747 elif test -n "$PKG_CONFIG"; then
48748    if test -n "$PKG_CONFIG" && \
48749    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48750  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48751  ac_status=$?
48752  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48753  test $ac_status = 0; }; then
48754  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48755else
48756  pkg_failed=yes
48757fi
48758 else
48759    pkg_failed=untried
48760fi
48761if test -n "$ALSA_LIBS"; then
48762    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48763 elif test -n "$PKG_CONFIG"; then
48764    if test -n "$PKG_CONFIG" && \
48765    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48766  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48767  ac_status=$?
48768  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48769  test $ac_status = 0; }; then
48770  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48771else
48772  pkg_failed=yes
48773fi
48774 else
48775    pkg_failed=untried
48776fi
48777
48778
48779
48780if test $pkg_failed = yes; then
48781
48782if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48783        _pkg_short_errors_supported=yes
48784else
48785        _pkg_short_errors_supported=no
48786fi
48787        if test $_pkg_short_errors_supported = yes; then
48788	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48789        else
48790	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48791        fi
48792	# Put the nasty error message in config.log where it belongs
48793	echo "$ALSA_PKG_ERRORS" >&5
48794
48795	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48796$as_echo "no" >&6; }
48797                ALSA_FOUND=no
48798elif test $pkg_failed = untried; then
48799	ALSA_FOUND=no
48800else
48801	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48802	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48803        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48804$as_echo "yes" >&6; }
48805	ALSA_FOUND=yes
48806fi
48807      fi
48808    fi
48809    if test "x$ALSA_FOUND" = xno; then
48810      for ac_header in alsa/asoundlib.h
48811do :
48812  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48813if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48814  cat >>confdefs.h <<_ACEOF
48815#define HAVE_ALSA_ASOUNDLIB_H 1
48816_ACEOF
48817
48818            ALSA_FOUND=yes
48819            ALSA_CFLAGS=-Iignoreme
48820            ALSA_LIBS=-lasound
48821            DEFAULT_ALSA=yes
48822
48823else
48824  ALSA_FOUND=no
48825fi
48826
48827done
48828
48829    fi
48830    if test "x$ALSA_FOUND" = xno; then
48831
48832  # Print a helpful message on how to acquire the necessary build dependency.
48833  # alsa is the help tag: freetype, cups, pulse, alsa etc
48834  MISSING_DEPENDENCY=alsa
48835
48836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48837    cygwin_help $MISSING_DEPENDENCY
48838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48839    msys_help $MISSING_DEPENDENCY
48840  else
48841    PKGHANDLER_COMMAND=
48842
48843    case $PKGHANDLER in
48844      apt-get)
48845        apt_help     $MISSING_DEPENDENCY ;;
48846      yum)
48847        yum_help     $MISSING_DEPENDENCY ;;
48848      port)
48849        port_help    $MISSING_DEPENDENCY ;;
48850      pkgutil)
48851        pkgutil_help $MISSING_DEPENDENCY ;;
48852      pkgadd)
48853        pkgadd_help  $MISSING_DEPENDENCY ;;
48854    esac
48855
48856    if test "x$PKGHANDLER_COMMAND" != x; then
48857      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48858    fi
48859  fi
48860
48861      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48862    fi
48863  fi
48864
48865
48866
48867
48868
48869
48870  ###############################################################################
48871  #
48872  # Check for the jpeg library
48873  #
48874
48875
48876# Check whether --with-libjpeg was given.
48877if test "${with_libjpeg+set}" = set; then :
48878  withval=$with_libjpeg;
48879fi
48880
48881
48882  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48883$as_echo_n "checking for which libjpeg to use... " >&6; }
48884
48885  # default is bundled
48886  DEFAULT_LIBJPEG=bundled
48887
48888  #
48889  # if user didn't specify, use DEFAULT_LIBJPEG
48890  #
48891  if test "x${with_libjpeg}" = "x"; then
48892    with_libjpeg=${DEFAULT_LIBJPEG}
48893  fi
48894
48895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48896$as_echo "${with_libjpeg}" >&6; }
48897
48898  if test "x${with_libjpeg}" = "xbundled"; then
48899    USE_EXTERNAL_LIBJPEG=false
48900  elif test "x${with_libjpeg}" = "xsystem"; then
48901    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48902if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48903
48904else
48905   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48906fi
48907
48908
48909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48910$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48911if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48912  $as_echo_n "(cached) " >&6
48913else
48914  ac_check_lib_save_LIBS=$LIBS
48915LIBS="-ljpeg  $LIBS"
48916cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48917/* end confdefs.h.  */
48918
48919/* Override any GCC internal prototype to avoid an error.
48920   Use char because int might match the return type of a GCC
48921   builtin and then its argument prototype would still apply.  */
48922#ifdef __cplusplus
48923extern "C"
48924#endif
48925char jpeg_CreateDecompress ();
48926int
48927main ()
48928{
48929return jpeg_CreateDecompress ();
48930  ;
48931  return 0;
48932}
48933_ACEOF
48934if ac_fn_cxx_try_link "$LINENO"; then :
48935  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48936else
48937  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48938fi
48939rm -f core conftest.err conftest.$ac_objext \
48940    conftest$ac_exeext conftest.$ac_ext
48941LIBS=$ac_check_lib_save_LIBS
48942fi
48943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48944$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48945if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48946  cat >>confdefs.h <<_ACEOF
48947#define HAVE_LIBJPEG 1
48948_ACEOF
48949
48950  LIBS="-ljpeg $LIBS"
48951
48952else
48953   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48954fi
48955
48956
48957    USE_EXTERNAL_LIBJPEG=true
48958  else
48959    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48960  fi
48961
48962
48963
48964  ###############################################################################
48965  #
48966  # Check for the gif library
48967  #
48968
48969
48970# Check whether --with-giflib was given.
48971if test "${with_giflib+set}" = set; then :
48972  withval=$with_giflib;
48973fi
48974
48975
48976
48977  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48978$as_echo_n "checking for which giflib to use... " >&6; }
48979
48980  # default is bundled
48981  DEFAULT_GIFLIB=bundled
48982
48983  #
48984  # if user didn't specify, use DEFAULT_GIFLIB
48985  #
48986  if test "x${with_giflib}" = "x"; then
48987    with_giflib=${DEFAULT_GIFLIB}
48988  fi
48989
48990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48991$as_echo "${with_giflib}" >&6; }
48992
48993  if test "x${with_giflib}" = "xbundled"; then
48994    USE_EXTERNAL_LIBGIF=false
48995  elif test "x${with_giflib}" = "xsystem"; then
48996    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48997if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48998
48999else
49000   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49001fi
49002
49003
49004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49005$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49006if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49007  $as_echo_n "(cached) " >&6
49008else
49009  ac_check_lib_save_LIBS=$LIBS
49010LIBS="-lgif  $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 DGifGetCode ();
49021int
49022main ()
49023{
49024return DGifGetCode ();
49025  ;
49026  return 0;
49027}
49028_ACEOF
49029if ac_fn_cxx_try_link "$LINENO"; then :
49030  ac_cv_lib_gif_DGifGetCode=yes
49031else
49032  ac_cv_lib_gif_DGifGetCode=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_gif_DGifGetCode" >&5
49039$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49040if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49041  cat >>confdefs.h <<_ACEOF
49042#define HAVE_LIBGIF 1
49043_ACEOF
49044
49045  LIBS="-lgif $LIBS"
49046
49047else
49048   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49049fi
49050
49051
49052    USE_EXTERNAL_LIBGIF=true
49053  else
49054    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49055  fi
49056
49057
49058  ###############################################################################
49059  #
49060  # Check for the lcms2 library
49061  #
49062
49063
49064# Check whether --with-lcms was given.
49065if test "${with_lcms+set}" = set; then :
49066  withval=$with_lcms;
49067fi
49068
49069
49070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49071$as_echo_n "checking for which lcms to use... " >&6; }
49072
49073  DEFAULT_LCMS=bundled
49074
49075  #
49076  # If user didn't specify, use DEFAULT_LCMS
49077  #
49078  if test "x${with_lcms}" = "x"; then
49079      with_lcms=${DEFAULT_LCMS}
49080  fi
49081
49082  if test "x${with_lcms}" = "xbundled"; then
49083    USE_EXTERNAL_LCMS=false
49084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49085$as_echo "bundled" >&6; }
49086  elif test "x${with_lcms}" = "xsystem"; then
49087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49088$as_echo "system" >&6; }
49089
49090pkg_failed=no
49091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49092$as_echo_n "checking for LCMS... " >&6; }
49093
49094if test -n "$LCMS_CFLAGS"; then
49095    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49096 elif test -n "$PKG_CONFIG"; then
49097    if test -n "$PKG_CONFIG" && \
49098    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49099  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49100  ac_status=$?
49101  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49102  test $ac_status = 0; }; then
49103  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49104else
49105  pkg_failed=yes
49106fi
49107 else
49108    pkg_failed=untried
49109fi
49110if test -n "$LCMS_LIBS"; then
49111    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49112 elif test -n "$PKG_CONFIG"; then
49113    if test -n "$PKG_CONFIG" && \
49114    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49115  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49116  ac_status=$?
49117  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49118  test $ac_status = 0; }; then
49119  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49120else
49121  pkg_failed=yes
49122fi
49123 else
49124    pkg_failed=untried
49125fi
49126
49127
49128
49129if test $pkg_failed = yes; then
49130
49131if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49132        _pkg_short_errors_supported=yes
49133else
49134        _pkg_short_errors_supported=no
49135fi
49136        if test $_pkg_short_errors_supported = yes; then
49137	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49138        else
49139	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49140        fi
49141	# Put the nasty error message in config.log where it belongs
49142	echo "$LCMS_PKG_ERRORS" >&5
49143
49144	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49145$as_echo "no" >&6; }
49146                LCMS_FOUND=no
49147elif test $pkg_failed = untried; then
49148	LCMS_FOUND=no
49149else
49150	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49151	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49152        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49153$as_echo "yes" >&6; }
49154	LCMS_FOUND=yes
49155fi
49156    if test "x${LCMS_FOUND}" = "xyes"; then
49157      USE_EXTERNAL_LCMS=true
49158    else
49159      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49160    fi
49161  else
49162    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49163  fi
49164
49165
49166
49167  ###############################################################################
49168  #
49169  # Check for the png library
49170  #
49171
49172
49173# Check whether --with-libpng was given.
49174if test "${with_libpng+set}" = set; then :
49175  withval=$with_libpng;
49176fi
49177
49178
49179
49180  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49181$as_echo_n "checking for which libpng to use... " >&6; }
49182
49183  # default is bundled
49184  DEFAULT_LIBPNG=bundled
49185
49186  #
49187  # if user didn't specify, use DEFAULT_LIBPNG
49188  #
49189  if test "x${with_libpng}" = "x"; then
49190      with_libpng=${DEFAULT_LIBPNG}
49191  fi
49192
49193  if test "x${with_libpng}" = "xbundled"; then
49194      USE_EXTERNAL_LIBPNG=false
49195      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49196$as_echo "bundled" >&6; }
49197  elif test "x${with_libpng}" = "xsystem"; then
49198
49199pkg_failed=no
49200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49201$as_echo_n "checking for PNG... " >&6; }
49202
49203if test -n "$PNG_CFLAGS"; then
49204    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49205 elif test -n "$PKG_CONFIG"; then
49206    if test -n "$PKG_CONFIG" && \
49207    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49208  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49209  ac_status=$?
49210  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49211  test $ac_status = 0; }; then
49212  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49213else
49214  pkg_failed=yes
49215fi
49216 else
49217    pkg_failed=untried
49218fi
49219if test -n "$PNG_LIBS"; then
49220    pkg_cv_PNG_LIBS="$PNG_LIBS"
49221 elif test -n "$PKG_CONFIG"; then
49222    if test -n "$PKG_CONFIG" && \
49223    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49224  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49225  ac_status=$?
49226  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49227  test $ac_status = 0; }; then
49228  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49229else
49230  pkg_failed=yes
49231fi
49232 else
49233    pkg_failed=untried
49234fi
49235
49236
49237
49238if test $pkg_failed = yes; then
49239
49240if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49241        _pkg_short_errors_supported=yes
49242else
49243        _pkg_short_errors_supported=no
49244fi
49245        if test $_pkg_short_errors_supported = yes; then
49246	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49247        else
49248	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49249        fi
49250	# Put the nasty error message in config.log where it belongs
49251	echo "$PNG_PKG_ERRORS" >&5
49252
49253	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49254$as_echo "no" >&6; }
49255                 LIBPNG_FOUND=no
49256elif test $pkg_failed = untried; then
49257	 LIBPNG_FOUND=no
49258else
49259	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49260	PNG_LIBS=$pkg_cv_PNG_LIBS
49261        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49262$as_echo "yes" >&6; }
49263	 LIBPNG_FOUND=yes
49264fi
49265      if test "x${LIBPNG_FOUND}" = "xyes"; then
49266          USE_EXTERNAL_LIBPNG=true
49267          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49268$as_echo "system" >&6; }
49269      else
49270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49271$as_echo "system not found" >&6; }
49272          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49273      fi
49274  else
49275      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49276  fi
49277
49278
49279  ###############################################################################
49280  #
49281  # Check for the zlib library
49282  #
49283
49284
49285# Check whether --with-zlib was given.
49286if test "${with_zlib+set}" = set; then :
49287  withval=$with_zlib;
49288fi
49289
49290
49291  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49292$as_echo_n "checking for compress in -lz... " >&6; }
49293if ${ac_cv_lib_z_compress+:} false; then :
49294  $as_echo_n "(cached) " >&6
49295else
49296  ac_check_lib_save_LIBS=$LIBS
49297LIBS="-lz  $LIBS"
49298cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49299/* end confdefs.h.  */
49300
49301/* Override any GCC internal prototype to avoid an error.
49302   Use char because int might match the return type of a GCC
49303   builtin and then its argument prototype would still apply.  */
49304#ifdef __cplusplus
49305extern "C"
49306#endif
49307char compress ();
49308int
49309main ()
49310{
49311return compress ();
49312  ;
49313  return 0;
49314}
49315_ACEOF
49316if ac_fn_cxx_try_link "$LINENO"; then :
49317  ac_cv_lib_z_compress=yes
49318else
49319  ac_cv_lib_z_compress=no
49320fi
49321rm -f core conftest.err conftest.$ac_objext \
49322    conftest$ac_exeext conftest.$ac_ext
49323LIBS=$ac_check_lib_save_LIBS
49324fi
49325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49326$as_echo "$ac_cv_lib_z_compress" >&6; }
49327if test "x$ac_cv_lib_z_compress" = xyes; then :
49328   ZLIB_FOUND=yes
49329else
49330   ZLIB_FOUND=no
49331fi
49332
49333
49334  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49335$as_echo_n "checking for which zlib to use... " >&6; }
49336
49337  DEFAULT_ZLIB=bundled
49338  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49339    #
49340    # On macosx default is system...on others default is
49341    #
49342    DEFAULT_ZLIB=system
49343  fi
49344
49345  if test "x${ZLIB_FOUND}" != "xyes"; then
49346    #
49347    # If we don't find any system...set default to bundled
49348    #
49349    DEFAULT_ZLIB=bundled
49350  fi
49351
49352  #
49353  # If user didn't specify, use DEFAULT_ZLIB
49354  #
49355  if test "x${with_zlib}" = "x"; then
49356    with_zlib=${DEFAULT_ZLIB}
49357  fi
49358
49359  if test "x${with_zlib}" = "xbundled"; then
49360    USE_EXTERNAL_LIBZ=false
49361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49362$as_echo "bundled" >&6; }
49363  elif test "x${with_zlib}" = "xsystem"; then
49364    if test "x${ZLIB_FOUND}" = "xyes"; then
49365      USE_EXTERNAL_LIBZ=true
49366      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49367$as_echo "system" >&6; }
49368    else
49369      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49370$as_echo "system not found" >&6; }
49371      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49372    fi
49373  else
49374    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49375  fi
49376
49377
49378
49379  ###############################################################################
49380  LIBZIP_CAN_USE_MMAP=true
49381
49382
49383
49384  ###############################################################################
49385  #
49386  # Check if altzone exists in time.h
49387  #
49388
49389  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49390/* end confdefs.h.  */
49391#include <time.h>
49392int
49393main ()
49394{
49395return (int)altzone;
49396  ;
49397  return 0;
49398}
49399_ACEOF
49400if ac_fn_cxx_try_link "$LINENO"; then :
49401  has_altzone=yes
49402else
49403  has_altzone=no
49404fi
49405rm -f core conftest.err conftest.$ac_objext \
49406    conftest$ac_exeext conftest.$ac_ext
49407  if test "x$has_altzone" = xyes; then
49408
49409$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49410
49411  fi
49412
49413  ###############################################################################
49414  #
49415  # Check the maths library
49416  #
49417
49418  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49419$as_echo_n "checking for cos in -lm... " >&6; }
49420if ${ac_cv_lib_m_cos+:} false; then :
49421  $as_echo_n "(cached) " >&6
49422else
49423  ac_check_lib_save_LIBS=$LIBS
49424LIBS="-lm  $LIBS"
49425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49426/* end confdefs.h.  */
49427
49428/* Override any GCC internal prototype to avoid an error.
49429   Use char because int might match the return type of a GCC
49430   builtin and then its argument prototype would still apply.  */
49431#ifdef __cplusplus
49432extern "C"
49433#endif
49434char cos ();
49435int
49436main ()
49437{
49438return cos ();
49439  ;
49440  return 0;
49441}
49442_ACEOF
49443if ac_fn_cxx_try_link "$LINENO"; then :
49444  ac_cv_lib_m_cos=yes
49445else
49446  ac_cv_lib_m_cos=no
49447fi
49448rm -f core conftest.err conftest.$ac_objext \
49449    conftest$ac_exeext conftest.$ac_ext
49450LIBS=$ac_check_lib_save_LIBS
49451fi
49452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49453$as_echo "$ac_cv_lib_m_cos" >&6; }
49454if test "x$ac_cv_lib_m_cos" = xyes; then :
49455  cat >>confdefs.h <<_ACEOF
49456#define HAVE_LIBM 1
49457_ACEOF
49458
49459  LIBS="-lm $LIBS"
49460
49461else
49462
49463        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49464$as_echo "$as_me: Maths library was not found" >&6;}
49465
49466
49467fi
49468
49469
49470
49471  ###############################################################################
49472  #
49473  # Check for libdl.so
49474
49475  save_LIBS="$LIBS"
49476  LIBS=""
49477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49478$as_echo_n "checking for dlopen in -ldl... " >&6; }
49479if ${ac_cv_lib_dl_dlopen+:} false; then :
49480  $as_echo_n "(cached) " >&6
49481else
49482  ac_check_lib_save_LIBS=$LIBS
49483LIBS="-ldl  $LIBS"
49484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49485/* end confdefs.h.  */
49486
49487/* Override any GCC internal prototype to avoid an error.
49488   Use char because int might match the return type of a GCC
49489   builtin and then its argument prototype would still apply.  */
49490#ifdef __cplusplus
49491extern "C"
49492#endif
49493char dlopen ();
49494int
49495main ()
49496{
49497return dlopen ();
49498  ;
49499  return 0;
49500}
49501_ACEOF
49502if ac_fn_cxx_try_link "$LINENO"; then :
49503  ac_cv_lib_dl_dlopen=yes
49504else
49505  ac_cv_lib_dl_dlopen=no
49506fi
49507rm -f core conftest.err conftest.$ac_objext \
49508    conftest$ac_exeext conftest.$ac_ext
49509LIBS=$ac_check_lib_save_LIBS
49510fi
49511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49512$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49513if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49514  cat >>confdefs.h <<_ACEOF
49515#define HAVE_LIBDL 1
49516_ACEOF
49517
49518  LIBS="-ldl $LIBS"
49519
49520fi
49521
49522  LIBDL="$LIBS"
49523
49524  LIBS="$save_LIBS"
49525
49526
49527  ###############################################################################
49528  #
49529  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49530  # dynamic build is configured on command line.
49531  #
49532
49533# Check whether --with-stdc++lib was given.
49534if test "${with_stdc__lib+set}" = set; then :
49535  withval=$with_stdc__lib;
49536        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49537                && test "x$with_stdc__lib" != xdefault; then
49538          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49539        fi
49540
49541else
49542  with_stdc__lib=default
49543
49544fi
49545
49546
49547  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49548    # Test if -lstdc++ works.
49549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49550$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49551    ac_ext=cpp
49552ac_cpp='$CXXCPP $CPPFLAGS'
49553ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49554ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49555ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49556
49557    OLD_CXXFLAGS="$CXXFLAGS"
49558    CXXFLAGS="$CXXFLAGS -lstdc++"
49559    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49560/* end confdefs.h.  */
49561
49562int
49563main ()
49564{
49565return 0;
49566  ;
49567  return 0;
49568}
49569_ACEOF
49570if ac_fn_cxx_try_link "$LINENO"; then :
49571  has_dynamic_libstdcxx=yes
49572else
49573  has_dynamic_libstdcxx=no
49574fi
49575rm -f core conftest.err conftest.$ac_objext \
49576    conftest$ac_exeext conftest.$ac_ext
49577    CXXFLAGS="$OLD_CXXFLAGS"
49578    ac_ext=cpp
49579ac_cpp='$CXXCPP $CPPFLAGS'
49580ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49581ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49582ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49583
49584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49585$as_echo "$has_dynamic_libstdcxx" >&6; }
49586
49587    # Test if stdc++ can be linked statically.
49588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49589$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49590    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49591    ac_ext=cpp
49592ac_cpp='$CXXCPP $CPPFLAGS'
49593ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49594ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49595ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49596
49597    OLD_LIBS="$LIBS"
49598    OLD_CXX="$CXX"
49599    LIBS="$STATIC_STDCXX_FLAGS"
49600    CXX="$CC"
49601    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49602/* end confdefs.h.  */
49603
49604int
49605main ()
49606{
49607return 0;
49608  ;
49609  return 0;
49610}
49611_ACEOF
49612if ac_fn_cxx_try_link "$LINENO"; then :
49613  has_static_libstdcxx=yes
49614else
49615  has_static_libstdcxx=no
49616fi
49617rm -f core conftest.err conftest.$ac_objext \
49618    conftest$ac_exeext conftest.$ac_ext
49619    LIBS="$OLD_LIBS"
49620    CXX="$OLD_CXX"
49621    ac_ext=cpp
49622ac_cpp='$CXXCPP $CPPFLAGS'
49623ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49624ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49625ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49626
49627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49628$as_echo "$has_static_libstdcxx" >&6; }
49629
49630    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49631      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49632    fi
49633
49634    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49635      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49636    fi
49637
49638    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49639      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49640    fi
49641
49642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49643$as_echo_n "checking how to link with libstdc++... " >&6; }
49644    # If dynamic was requested, it's available since it would fail above otherwise.
49645    # If dynamic wasn't requested, go with static unless it isn't available.
49646    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49647      LIBCXX="$LIBCXX -lstdc++"
49648      LDCXX="$CXX"
49649      STATIC_CXX_SETTING="STATIC_CXX=false"
49650      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49651$as_echo "dynamic" >&6; }
49652    else
49653      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49654      LDCXX="$CC"
49655      STATIC_CXX_SETTING="STATIC_CXX=true"
49656      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49657$as_echo "static" >&6; }
49658    fi
49659  fi
49660
49661
49662  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49663    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49664
49665pkg_failed=no
49666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49667$as_echo_n "checking for LIBFFI... " >&6; }
49668
49669if test -n "$LIBFFI_CFLAGS"; then
49670    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49671 elif test -n "$PKG_CONFIG"; then
49672    if test -n "$PKG_CONFIG" && \
49673    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49674  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49675  ac_status=$?
49676  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49677  test $ac_status = 0; }; then
49678  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49679else
49680  pkg_failed=yes
49681fi
49682 else
49683    pkg_failed=untried
49684fi
49685if test -n "$LIBFFI_LIBS"; then
49686    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49687 elif test -n "$PKG_CONFIG"; then
49688    if test -n "$PKG_CONFIG" && \
49689    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49690  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49691  ac_status=$?
49692  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49693  test $ac_status = 0; }; then
49694  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49695else
49696  pkg_failed=yes
49697fi
49698 else
49699    pkg_failed=untried
49700fi
49701
49702
49703
49704if test $pkg_failed = yes; then
49705
49706if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49707        _pkg_short_errors_supported=yes
49708else
49709        _pkg_short_errors_supported=no
49710fi
49711        if test $_pkg_short_errors_supported = yes; then
49712	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49713        else
49714	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49715        fi
49716	# Put the nasty error message in config.log where it belongs
49717	echo "$LIBFFI_PKG_ERRORS" >&5
49718
49719	as_fn_error $? "Package requirements (libffi) were not met:
49720
49721$LIBFFI_PKG_ERRORS
49722
49723Consider adjusting the PKG_CONFIG_PATH environment variable if you
49724installed software in a non-standard prefix.
49725
49726Alternatively, you may set the environment variables LIBFFI_CFLAGS
49727and LIBFFI_LIBS to avoid the need to call pkg-config.
49728See the pkg-config man page for more details.
49729" "$LINENO" 5
49730elif test $pkg_failed = untried; then
49731	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49732$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49733as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49734is in your PATH or set the PKG_CONFIG environment variable to the full
49735path to pkg-config.
49736
49737Alternatively, you may set the environment variables LIBFFI_CFLAGS
49738and LIBFFI_LIBS to avoid the need to call pkg-config.
49739See the pkg-config man page for more details.
49740
49741To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49742See \`config.log' for more details" "$LINENO" 5; }
49743else
49744	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49745	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49746        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49747$as_echo "yes" >&6; }
49748	:
49749fi
49750
49751  fi
49752
49753  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49754    # Extract the first word of "llvm-config", so it can be a program name with args.
49755set dummy llvm-config; ac_word=$2
49756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49757$as_echo_n "checking for $ac_word... " >&6; }
49758if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49759  $as_echo_n "(cached) " >&6
49760else
49761  if test -n "$LLVM_CONFIG"; then
49762  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49763else
49764as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49765for as_dir in $PATH
49766do
49767  IFS=$as_save_IFS
49768  test -z "$as_dir" && as_dir=.
49769    for ac_exec_ext in '' $ac_executable_extensions; do
49770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49771    ac_cv_prog_LLVM_CONFIG="llvm-config"
49772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49773    break 2
49774  fi
49775done
49776  done
49777IFS=$as_save_IFS
49778
49779fi
49780fi
49781LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49782if test -n "$LLVM_CONFIG"; then
49783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49784$as_echo "$LLVM_CONFIG" >&6; }
49785else
49786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49787$as_echo "no" >&6; }
49788fi
49789
49790
49791
49792    if test "x$LLVM_CONFIG" != xllvm-config; then
49793      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49794    fi
49795
49796    llvm_components="jit mcjit engine nativecodegen native"
49797    unset LLVM_CFLAGS
49798    for flag in $("$LLVM_CONFIG" --cxxflags); do
49799      if echo "${flag}" | grep -q '^-[ID]'; then
49800        if test "${flag}" != "-D_DEBUG" ; then
49801          if test "${LLVM_CFLAGS}" != "" ; then
49802            LLVM_CFLAGS="${LLVM_CFLAGS} "
49803          fi
49804          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49805        fi
49806      fi
49807    done
49808    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49809    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49810
49811    unset LLVM_LDFLAGS
49812    for flag in $("${LLVM_CONFIG}" --ldflags); do
49813      if echo "${flag}" | grep -q '^-L'; then
49814        if test "${LLVM_LDFLAGS}" != ""; then
49815          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49816        fi
49817        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49818      fi
49819    done
49820
49821    unset LLVM_LIBS
49822    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49823      if echo "${flag}" | grep -q '^-l'; then
49824        if test "${LLVM_LIBS}" != ""; then
49825          LLVM_LIBS="${LLVM_LIBS} "
49826        fi
49827        LLVM_LIBS="${LLVM_LIBS}${flag}"
49828      fi
49829    done
49830
49831
49832
49833
49834  fi
49835
49836  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49837  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49838    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49839  fi
49840
49841  # TODO better (platform agnostic) test
49842  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49843    LIBCXX="-lstdc++"
49844  fi
49845
49846
49847
49848
49849  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49850
49851
49852# Check whether --with-msvcr-dll was given.
49853if test "${with_msvcr_dll+set}" = set; then :
49854  withval=$with_msvcr_dll;
49855fi
49856
49857
49858  if test "x$with_msvcr_dll" != x; then
49859    # If given explicitely by user, do not probe. If not present, fail directly.
49860
49861  DLL_NAME="$DLL_NAME"
49862  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49863  METHOD="--with-msvcr-dll"
49864  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49865    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49866$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49867
49868    # Need to check if the found msvcr is correct architecture
49869    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49870$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49871    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49872    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49873      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49874      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49876        CORRECT_MSVCR_ARCH="PE32 executable"
49877      else
49878        CORRECT_MSVCR_ARCH="PE32+ executable"
49879      fi
49880    else
49881      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49882        CORRECT_MSVCR_ARCH=386
49883      else
49884        CORRECT_MSVCR_ARCH=x86-64
49885      fi
49886    fi
49887    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49889$as_echo "ok" >&6; }
49890      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49891      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49892$as_echo_n "checking for $DLL_NAME... " >&6; }
49893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49894$as_echo "$MSVC_DLL" >&6; }
49895    else
49896      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49897$as_echo "incorrect, ignoring" >&6; }
49898      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49899$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49900    fi
49901  fi
49902
49903    if test "x$MSVC_DLL" = x; then
49904      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49905    fi
49906  else
49907
49908  VAR_NAME="MSVCR_DLL"
49909  DLL_NAME="${MSVCR_NAME}"
49910  MSVC_DLL=
49911
49912  if test "x$MSVC_DLL" = x; then
49913    # Probe: Using well-known location from Visual Studio 10.0
49914    if test "x$VCINSTALLDIR" != x; then
49915      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49916
49917  windows_path="$CYGWIN_VC_INSTALL_DIR"
49918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49919    unix_path=`$CYGPATH -u "$windows_path"`
49920    CYGWIN_VC_INSTALL_DIR="$unix_path"
49921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49923    CYGWIN_VC_INSTALL_DIR="$unix_path"
49924  fi
49925
49926      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49927        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49928      else
49929        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49930      fi
49931      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49932
49933  DLL_NAME="$DLL_NAME"
49934  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49935  METHOD="well-known location in VCINSTALLDIR"
49936  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49937    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49938$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49939
49940    # Need to check if the found msvcr is correct architecture
49941    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49942$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49943    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49944    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49945      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49946      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49947      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49948        CORRECT_MSVCR_ARCH="PE32 executable"
49949      else
49950        CORRECT_MSVCR_ARCH="PE32+ executable"
49951      fi
49952    else
49953      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49954        CORRECT_MSVCR_ARCH=386
49955      else
49956        CORRECT_MSVCR_ARCH=x86-64
49957      fi
49958    fi
49959    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49960      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49961$as_echo "ok" >&6; }
49962      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49963      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49964$as_echo_n "checking for $DLL_NAME... " >&6; }
49965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49966$as_echo "$MSVC_DLL" >&6; }
49967    else
49968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49969$as_echo "incorrect, ignoring" >&6; }
49970      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49971$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49972    fi
49973  fi
49974
49975    fi
49976  fi
49977
49978  if test "x$MSVC_DLL" = x; then
49979    # Probe: Check in the Boot JDK directory.
49980    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49981
49982  DLL_NAME="$DLL_NAME"
49983  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49984  METHOD="well-known location in Boot JDK"
49985  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49986    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49987$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49988
49989    # Need to check if the found msvcr is correct architecture
49990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49991$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49992    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49994      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49995      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49996      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49997        CORRECT_MSVCR_ARCH="PE32 executable"
49998      else
49999        CORRECT_MSVCR_ARCH="PE32+ executable"
50000      fi
50001    else
50002      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50003        CORRECT_MSVCR_ARCH=386
50004      else
50005        CORRECT_MSVCR_ARCH=x86-64
50006      fi
50007    fi
50008    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50010$as_echo "ok" >&6; }
50011      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50012      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50013$as_echo_n "checking for $DLL_NAME... " >&6; }
50014      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50015$as_echo "$MSVC_DLL" >&6; }
50016    else
50017      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50018$as_echo "incorrect, ignoring" >&6; }
50019      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50020$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50021    fi
50022  fi
50023
50024  fi
50025
50026  if test "x$MSVC_DLL" = x; then
50027    # Probe: Look in the Windows system32 directory
50028    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50029
50030  windows_path="$CYGWIN_SYSTEMROOT"
50031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50032    unix_path=`$CYGPATH -u "$windows_path"`
50033    CYGWIN_SYSTEMROOT="$unix_path"
50034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50036    CYGWIN_SYSTEMROOT="$unix_path"
50037  fi
50038
50039    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50040
50041  DLL_NAME="$DLL_NAME"
50042  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50043  METHOD="well-known location in SYSTEMROOT"
50044  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50045    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50046$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50047
50048    # Need to check if the found msvcr is correct architecture
50049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50050$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50051    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50053      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50054      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50055      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50056        CORRECT_MSVCR_ARCH="PE32 executable"
50057      else
50058        CORRECT_MSVCR_ARCH="PE32+ executable"
50059      fi
50060    else
50061      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50062        CORRECT_MSVCR_ARCH=386
50063      else
50064        CORRECT_MSVCR_ARCH=x86-64
50065      fi
50066    fi
50067    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50068      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50069$as_echo "ok" >&6; }
50070      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50072$as_echo_n "checking for $DLL_NAME... " >&6; }
50073      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50074$as_echo "$MSVC_DLL" >&6; }
50075    else
50076      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50077$as_echo "incorrect, ignoring" >&6; }
50078      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50079$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50080    fi
50081  fi
50082
50083  fi
50084
50085  if test "x$MSVC_DLL" = x; then
50086    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50087    if test "x$VS100COMNTOOLS" != x; then
50088      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50089
50090  windows_path="$CYGWIN_VS_TOOLS_DIR"
50091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50092    unix_path=`$CYGPATH -u "$windows_path"`
50093    CYGWIN_VS_TOOLS_DIR="$unix_path"
50094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50096    CYGWIN_VS_TOOLS_DIR="$unix_path"
50097  fi
50098
50099      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50100        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50101	    | $GREP -i /x64/ | $HEAD --lines 1`
50102      else
50103        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50104	    | $GREP -i /x86/ | $HEAD --lines 1`
50105      fi
50106
50107  DLL_NAME="$DLL_NAME"
50108  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50109  METHOD="search of VS100COMNTOOLS"
50110  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50112$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50113
50114    # Need to check if the found msvcr is correct architecture
50115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50116$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50117    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50119      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50120      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50121      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50122        CORRECT_MSVCR_ARCH="PE32 executable"
50123      else
50124        CORRECT_MSVCR_ARCH="PE32+ executable"
50125      fi
50126    else
50127      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50128        CORRECT_MSVCR_ARCH=386
50129      else
50130        CORRECT_MSVCR_ARCH=x86-64
50131      fi
50132    fi
50133    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50135$as_echo "ok" >&6; }
50136      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50137      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50138$as_echo_n "checking for $DLL_NAME... " >&6; }
50139      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50140$as_echo "$MSVC_DLL" >&6; }
50141    else
50142      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50143$as_echo "incorrect, ignoring" >&6; }
50144      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50145$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50146    fi
50147  fi
50148
50149    fi
50150  fi
50151
50152  if test "x$MSVC_DLL" = x; then
50153    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50154    # (This was the original behaviour; kept since it might turn something up)
50155    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50156      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50157        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50158	    | $GREP x64 | $HEAD --lines 1`
50159      else
50160        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50161	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50162        if test "x$POSSIBLE_MSVC_DLL" = x; then
50163          # We're grasping at straws now...
50164          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50165	      | $HEAD --lines 1`
50166        fi
50167      fi
50168
50169
50170  DLL_NAME="$DLL_NAME"
50171  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50172  METHOD="search of VCINSTALLDIR"
50173  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50175$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50176
50177    # Need to check if the found msvcr is correct architecture
50178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50179$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50180    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50182      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50183      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50184      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50185        CORRECT_MSVCR_ARCH="PE32 executable"
50186      else
50187        CORRECT_MSVCR_ARCH="PE32+ executable"
50188      fi
50189    else
50190      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50191        CORRECT_MSVCR_ARCH=386
50192      else
50193        CORRECT_MSVCR_ARCH=x86-64
50194      fi
50195    fi
50196    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50198$as_echo "ok" >&6; }
50199      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50200      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50201$as_echo_n "checking for $DLL_NAME... " >&6; }
50202      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50203$as_echo "$MSVC_DLL" >&6; }
50204    else
50205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50206$as_echo "incorrect, ignoring" >&6; }
50207      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50208$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50209    fi
50210  fi
50211
50212    fi
50213  fi
50214
50215  if test "x$MSVC_DLL" = x; then
50216    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50217$as_echo_n "checking for $DLL_NAME... " >&6; }
50218    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50219$as_echo "no" >&6; }
50220    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50221  fi
50222
50223  MSVCR_DLL=$MSVC_DLL
50224
50225  # Only process if variable expands to non-empty
50226
50227  if test "x$MSVCR_DLL" != x; then
50228    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50229
50230  # Input might be given as Windows format, start by converting to
50231  # unix format.
50232  path="$MSVCR_DLL"
50233  new_path=`$CYGPATH -u "$path"`
50234
50235  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50236  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50237  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50238  # "foo.exe" is OK but "foo" is an error.
50239  #
50240  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50241  # It is also a way to make sure we got the proper file name for the real test later on.
50242  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50243  if test "x$test_shortpath" = x; then
50244    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50245$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50246    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50247  fi
50248
50249  # Call helper function which possibly converts this using DOS-style short mode.
50250  # If so, the updated path is stored in $new_path.
50251
50252  input_path="$new_path"
50253  # Check if we need to convert this using DOS-style short mode. If the path
50254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50255  # take no chances and rewrite it.
50256  # Note: m4 eats our [], so we need to use [ and ] instead.
50257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50258  if test "x$has_forbidden_chars" != x; then
50259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50260    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50261    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50262    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50263      # Going to short mode and back again did indeed matter. Since short mode is
50264      # case insensitive, let's make it lowercase to improve readability.
50265      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50266      # Now convert it back to Unix-stile (cygpath)
50267      input_path=`$CYGPATH -u "$shortmode_path"`
50268      new_path="$input_path"
50269    fi
50270  fi
50271
50272  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50273  if test "x$test_cygdrive_prefix" = x; then
50274    # As a simple fix, exclude /usr/bin since it's not a real path.
50275    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50276      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50277      # a path prefixed by /cygdrive for fixpath to work.
50278      new_path="$CYGWIN_ROOT_PATH$input_path"
50279    fi
50280  fi
50281
50282
50283  if test "x$path" != "x$new_path"; then
50284    MSVCR_DLL="$new_path"
50285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50286$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50287  fi
50288
50289    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50290
50291  path="$MSVCR_DLL"
50292  has_colon=`$ECHO $path | $GREP ^.:`
50293  new_path="$path"
50294  if test "x$has_colon" = x; then
50295    # Not in mixed or Windows style, start by that.
50296    new_path=`cmd //c echo $path`
50297  fi
50298
50299
50300  input_path="$new_path"
50301  # Check if we need to convert this using DOS-style short mode. If the path
50302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50303  # take no chances and rewrite it.
50304  # Note: m4 eats our [], so we need to use [ and ] instead.
50305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50306  if test "x$has_forbidden_chars" != x; then
50307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50308    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50309  fi
50310
50311
50312  windows_path="$new_path"
50313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50314    unix_path=`$CYGPATH -u "$windows_path"`
50315    new_path="$unix_path"
50316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50318    new_path="$unix_path"
50319  fi
50320
50321  if test "x$path" != "x$new_path"; then
50322    MSVCR_DLL="$new_path"
50323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50324$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50325  fi
50326
50327  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50328  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50329
50330    else
50331      # We're on a unix platform. Hooray! :)
50332      path="$MSVCR_DLL"
50333      has_space=`$ECHO "$path" | $GREP " "`
50334      if test "x$has_space" != x; then
50335        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50336$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50337        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50338      fi
50339
50340      # Use eval to expand a potential ~
50341      eval path="$path"
50342      if test ! -f "$path" && test ! -d "$path"; then
50343        as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50344      fi
50345
50346      MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50347    fi
50348  fi
50349
50350  MSVCR_DLL=$MSVCR_DLL
50351
50352
50353  fi
50354
50355
50356# Check whether --with-msvcp-dll was given.
50357if test "${with_msvcp_dll+set}" = set; then :
50358  withval=$with_msvcp_dll;
50359fi
50360
50361
50362  if test "x$MSVCP_NAME" != "x"; then
50363    if test "x$with_msvcp_dll" != x; then
50364      # If given explicitely by user, do not probe. If not present, fail directly.
50365
50366  DLL_NAME="$DLL_NAME"
50367  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50368  METHOD="--with-msvcp-dll"
50369  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50370    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50371$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50372
50373    # Need to check if the found msvcr is correct architecture
50374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50375$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50376    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50378      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50379      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50380      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50381        CORRECT_MSVCR_ARCH="PE32 executable"
50382      else
50383        CORRECT_MSVCR_ARCH="PE32+ executable"
50384      fi
50385    else
50386      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50387        CORRECT_MSVCR_ARCH=386
50388      else
50389        CORRECT_MSVCR_ARCH=x86-64
50390      fi
50391    fi
50392    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50394$as_echo "ok" >&6; }
50395      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50396      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50397$as_echo_n "checking for $DLL_NAME... " >&6; }
50398      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50399$as_echo "$MSVC_DLL" >&6; }
50400    else
50401      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50402$as_echo "incorrect, ignoring" >&6; }
50403      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50404$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50405    fi
50406  fi
50407
50408      if test "x$MSVC_DLL" = x; then
50409        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50410      fi
50411    else
50412
50413  VAR_NAME="MSVCP_DLL"
50414  DLL_NAME="${MSVCP_NAME}"
50415  MSVC_DLL=
50416
50417  if test "x$MSVC_DLL" = x; then
50418    # Probe: Using well-known location from Visual Studio 10.0
50419    if test "x$VCINSTALLDIR" != x; then
50420      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50421
50422  windows_path="$CYGWIN_VC_INSTALL_DIR"
50423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50424    unix_path=`$CYGPATH -u "$windows_path"`
50425    CYGWIN_VC_INSTALL_DIR="$unix_path"
50426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50428    CYGWIN_VC_INSTALL_DIR="$unix_path"
50429  fi
50430
50431      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50432        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50433      else
50434        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50435      fi
50436      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50437
50438  DLL_NAME="$DLL_NAME"
50439  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50440  METHOD="well-known location in VCINSTALLDIR"
50441  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50442    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50443$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50444
50445    # Need to check if the found msvcr is correct architecture
50446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50447$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50448    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50449    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50450      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50451      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50453        CORRECT_MSVCR_ARCH="PE32 executable"
50454      else
50455        CORRECT_MSVCR_ARCH="PE32+ executable"
50456      fi
50457    else
50458      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50459        CORRECT_MSVCR_ARCH=386
50460      else
50461        CORRECT_MSVCR_ARCH=x86-64
50462      fi
50463    fi
50464    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50465      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50466$as_echo "ok" >&6; }
50467      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50468      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50469$as_echo_n "checking for $DLL_NAME... " >&6; }
50470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50471$as_echo "$MSVC_DLL" >&6; }
50472    else
50473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50474$as_echo "incorrect, ignoring" >&6; }
50475      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50476$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50477    fi
50478  fi
50479
50480    fi
50481  fi
50482
50483  if test "x$MSVC_DLL" = x; then
50484    # Probe: Check in the Boot JDK directory.
50485    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50486
50487  DLL_NAME="$DLL_NAME"
50488  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50489  METHOD="well-known location in Boot JDK"
50490  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50491    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50492$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50493
50494    # Need to check if the found msvcr is correct architecture
50495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50496$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50497    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50498    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50499      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50500      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50501      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50502        CORRECT_MSVCR_ARCH="PE32 executable"
50503      else
50504        CORRECT_MSVCR_ARCH="PE32+ executable"
50505      fi
50506    else
50507      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50508        CORRECT_MSVCR_ARCH=386
50509      else
50510        CORRECT_MSVCR_ARCH=x86-64
50511      fi
50512    fi
50513    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50514      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50515$as_echo "ok" >&6; }
50516      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50517      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50518$as_echo_n "checking for $DLL_NAME... " >&6; }
50519      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50520$as_echo "$MSVC_DLL" >&6; }
50521    else
50522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50523$as_echo "incorrect, ignoring" >&6; }
50524      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50525$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50526    fi
50527  fi
50528
50529  fi
50530
50531  if test "x$MSVC_DLL" = x; then
50532    # Probe: Look in the Windows system32 directory
50533    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50534
50535  windows_path="$CYGWIN_SYSTEMROOT"
50536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50537    unix_path=`$CYGPATH -u "$windows_path"`
50538    CYGWIN_SYSTEMROOT="$unix_path"
50539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50541    CYGWIN_SYSTEMROOT="$unix_path"
50542  fi
50543
50544    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50545
50546  DLL_NAME="$DLL_NAME"
50547  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50548  METHOD="well-known location in SYSTEMROOT"
50549  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50550    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50551$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50552
50553    # Need to check if the found msvcr is correct architecture
50554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50555$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50556    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50557    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50558      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50559      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50560      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50561        CORRECT_MSVCR_ARCH="PE32 executable"
50562      else
50563        CORRECT_MSVCR_ARCH="PE32+ executable"
50564      fi
50565    else
50566      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50567        CORRECT_MSVCR_ARCH=386
50568      else
50569        CORRECT_MSVCR_ARCH=x86-64
50570      fi
50571    fi
50572    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50573      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50574$as_echo "ok" >&6; }
50575      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50576      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50577$as_echo_n "checking for $DLL_NAME... " >&6; }
50578      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50579$as_echo "$MSVC_DLL" >&6; }
50580    else
50581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50582$as_echo "incorrect, ignoring" >&6; }
50583      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50584$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50585    fi
50586  fi
50587
50588  fi
50589
50590  if test "x$MSVC_DLL" = x; then
50591    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50592    if test "x$VS100COMNTOOLS" != x; then
50593      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50594
50595  windows_path="$CYGWIN_VS_TOOLS_DIR"
50596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50597    unix_path=`$CYGPATH -u "$windows_path"`
50598    CYGWIN_VS_TOOLS_DIR="$unix_path"
50599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50601    CYGWIN_VS_TOOLS_DIR="$unix_path"
50602  fi
50603
50604      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50605        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50606	    | $GREP -i /x64/ | $HEAD --lines 1`
50607      else
50608        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50609	    | $GREP -i /x86/ | $HEAD --lines 1`
50610      fi
50611
50612  DLL_NAME="$DLL_NAME"
50613  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50614  METHOD="search of VS100COMNTOOLS"
50615  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50616    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50617$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50618
50619    # Need to check if the found msvcr is correct architecture
50620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50621$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50622    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50623    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50624      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50625      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50626      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50627        CORRECT_MSVCR_ARCH="PE32 executable"
50628      else
50629        CORRECT_MSVCR_ARCH="PE32+ executable"
50630      fi
50631    else
50632      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50633        CORRECT_MSVCR_ARCH=386
50634      else
50635        CORRECT_MSVCR_ARCH=x86-64
50636      fi
50637    fi
50638    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50639      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50640$as_echo "ok" >&6; }
50641      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50642      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50643$as_echo_n "checking for $DLL_NAME... " >&6; }
50644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50645$as_echo "$MSVC_DLL" >&6; }
50646    else
50647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50648$as_echo "incorrect, ignoring" >&6; }
50649      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50650$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50651    fi
50652  fi
50653
50654    fi
50655  fi
50656
50657  if test "x$MSVC_DLL" = x; then
50658    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50659    # (This was the original behaviour; kept since it might turn something up)
50660    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50661      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50662        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50663	    | $GREP x64 | $HEAD --lines 1`
50664      else
50665        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50666	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50667        if test "x$POSSIBLE_MSVC_DLL" = x; then
50668          # We're grasping at straws now...
50669          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50670	      | $HEAD --lines 1`
50671        fi
50672      fi
50673
50674
50675  DLL_NAME="$DLL_NAME"
50676  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50677  METHOD="search of VCINSTALLDIR"
50678  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50680$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50681
50682    # Need to check if the found msvcr is correct architecture
50683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50684$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50685    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50687      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50688      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50689      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50690        CORRECT_MSVCR_ARCH="PE32 executable"
50691      else
50692        CORRECT_MSVCR_ARCH="PE32+ executable"
50693      fi
50694    else
50695      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50696        CORRECT_MSVCR_ARCH=386
50697      else
50698        CORRECT_MSVCR_ARCH=x86-64
50699      fi
50700    fi
50701    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50703$as_echo "ok" >&6; }
50704      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50705      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50706$as_echo_n "checking for $DLL_NAME... " >&6; }
50707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50708$as_echo "$MSVC_DLL" >&6; }
50709    else
50710      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50711$as_echo "incorrect, ignoring" >&6; }
50712      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50713$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50714    fi
50715  fi
50716
50717    fi
50718  fi
50719
50720  if test "x$MSVC_DLL" = x; then
50721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50722$as_echo_n "checking for $DLL_NAME... " >&6; }
50723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50724$as_echo "no" >&6; }
50725    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50726  fi
50727
50728  MSVCP_DLL=$MSVC_DLL
50729
50730  # Only process if variable expands to non-empty
50731
50732  if test "x$MSVCP_DLL" != x; then
50733    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50734
50735  # Input might be given as Windows format, start by converting to
50736  # unix format.
50737  path="$MSVCP_DLL"
50738  new_path=`$CYGPATH -u "$path"`
50739
50740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50743  # "foo.exe" is OK but "foo" is an error.
50744  #
50745  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50746  # It is also a way to make sure we got the proper file name for the real test later on.
50747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50748  if test "x$test_shortpath" = x; then
50749    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50750$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50751    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50752  fi
50753
50754  # Call helper function which possibly converts this using DOS-style short mode.
50755  # If so, the updated path is stored in $new_path.
50756
50757  input_path="$new_path"
50758  # Check if we need to convert this using DOS-style short mode. If the path
50759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50760  # take no chances and rewrite it.
50761  # Note: m4 eats our [], so we need to use [ and ] instead.
50762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50763  if test "x$has_forbidden_chars" != x; then
50764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50765    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50766    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50767    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50768      # Going to short mode and back again did indeed matter. Since short mode is
50769      # case insensitive, let's make it lowercase to improve readability.
50770      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50771      # Now convert it back to Unix-stile (cygpath)
50772      input_path=`$CYGPATH -u "$shortmode_path"`
50773      new_path="$input_path"
50774    fi
50775  fi
50776
50777  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50778  if test "x$test_cygdrive_prefix" = x; then
50779    # As a simple fix, exclude /usr/bin since it's not a real path.
50780    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50781      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50782      # a path prefixed by /cygdrive for fixpath to work.
50783      new_path="$CYGWIN_ROOT_PATH$input_path"
50784    fi
50785  fi
50786
50787
50788  if test "x$path" != "x$new_path"; then
50789    MSVCP_DLL="$new_path"
50790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50791$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50792  fi
50793
50794    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50795
50796  path="$MSVCP_DLL"
50797  has_colon=`$ECHO $path | $GREP ^.:`
50798  new_path="$path"
50799  if test "x$has_colon" = x; then
50800    # Not in mixed or Windows style, start by that.
50801    new_path=`cmd //c echo $path`
50802  fi
50803
50804
50805  input_path="$new_path"
50806  # Check if we need to convert this using DOS-style short mode. If the path
50807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50808  # take no chances and rewrite it.
50809  # Note: m4 eats our [], so we need to use [ and ] instead.
50810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50811  if test "x$has_forbidden_chars" != x; then
50812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50814  fi
50815
50816
50817  windows_path="$new_path"
50818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50819    unix_path=`$CYGPATH -u "$windows_path"`
50820    new_path="$unix_path"
50821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50823    new_path="$unix_path"
50824  fi
50825
50826  if test "x$path" != "x$new_path"; then
50827    MSVCP_DLL="$new_path"
50828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50829$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50830  fi
50831
50832  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50833  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50834
50835    else
50836      # We're on a unix platform. Hooray! :)
50837      path="$MSVCP_DLL"
50838      has_space=`$ECHO "$path" | $GREP " "`
50839      if test "x$has_space" != x; then
50840        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50841$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50842        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50843      fi
50844
50845      # Use eval to expand a potential ~
50846      eval path="$path"
50847      if test ! -f "$path" && test ! -d "$path"; then
50848        as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50849      fi
50850
50851      MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50852    fi
50853  fi
50854
50855  MSVCP_DLL=$MSVCP_DLL
50856
50857
50858    fi
50859  fi
50860
50861
50862
50863# Check whether --with-dxsdk was given.
50864if test "${with_dxsdk+set}" = set; then :
50865  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50866$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50867fi
50868
50869
50870
50871
50872# Check whether --with-dxsdk-lib was given.
50873if test "${with_dxsdk_lib+set}" = set; then :
50874  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50875$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50876fi
50877
50878
50879
50880
50881# Check whether --with-dxsdk-include was given.
50882if test "${with_dxsdk_include+set}" = set; then :
50883  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50884$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50885fi
50886
50887
50888  fi
50889
50890
50891###############################################################################
50892#
50893# We need to do some final tweaking, when everything else is done.
50894#
50895###############################################################################
50896
50897
50898  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50899
50900
50901  # The name of the Service Agent jar.
50902  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50903  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50904    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50905  fi
50906
50907
50908
50909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50910$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50911
50912    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50913      ENABLE_INTREE_EC=yes
50914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50915$as_echo "yes" >&6; }
50916    else
50917      ENABLE_INTREE_EC=no
50918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50919$as_echo "no" >&6; }
50920    fi
50921
50922
50923
50924
50925###############################################################################
50926#
50927# Configure parts of the build that only affect the build performance,
50928# not the result.
50929#
50930###############################################################################
50931
50932
50933  # How many cores do we have on this build system?
50934
50935# Check whether --with-num-cores was given.
50936if test "${with_num_cores+set}" = set; then :
50937  withval=$with_num_cores;
50938fi
50939
50940  if test "x$with_num_cores" = x; then
50941    # The number of cores were not specified, try to probe them.
50942
50943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50944$as_echo_n "checking for number of cores... " >&6; }
50945  NUM_CORES=1
50946  FOUND_CORES=no
50947
50948  if test -f /proc/cpuinfo; then
50949    # Looks like a Linux (or cygwin) system
50950    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50951    FOUND_CORES=yes
50952  elif test -x /usr/sbin/psrinfo; then
50953    # Looks like a Solaris system
50954    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50955    FOUND_CORES=yes
50956  elif test -x /usr/sbin/system_profiler; then
50957    # Looks like a MacOSX system
50958    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50959    FOUND_CORES=yes
50960  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50961    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50962    FOUND_CORES=yes
50963  elif test -n "$NUMBER_OF_PROCESSORS"; then
50964    # On windows, look in the env
50965    NUM_CORES=$NUMBER_OF_PROCESSORS
50966    FOUND_CORES=yes
50967  fi
50968
50969  if test "x$FOUND_CORES" = xyes; then
50970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50971$as_echo "$NUM_CORES" >&6; }
50972  else
50973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50974$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50975    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50976$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50977  fi
50978
50979  else
50980    NUM_CORES=$with_num_cores
50981  fi
50982
50983
50984
50985  # How much memory do we have on this build system?
50986
50987# Check whether --with-memory-size was given.
50988if test "${with_memory_size+set}" = set; then :
50989  withval=$with_memory_size;
50990fi
50991
50992  if test "x$with_memory_size" = x; then
50993    # The memory size was not specified, try to probe it.
50994
50995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50996$as_echo_n "checking for memory size... " >&6; }
50997  # Default to 1024 MB
50998  MEMORY_SIZE=1024
50999  FOUND_MEM=no
51000
51001  if test -f /proc/meminfo; then
51002    # Looks like a Linux (or cygwin) system
51003    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51004    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51005    FOUND_MEM=yes
51006  elif test -x /usr/sbin/prtconf; then
51007    # Looks like a Solaris or AIX system
51008    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51009    FOUND_MEM=yes
51010  elif test -x /usr/sbin/system_profiler; then
51011    # Looks like a MacOSX system
51012    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51013    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51014    FOUND_MEM=yes
51015  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51016    # Windows, but without cygwin
51017    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51018    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51019    FOUND_MEM=yes
51020  fi
51021
51022  if test "x$FOUND_MEM" = xyes; then
51023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51024$as_echo "$MEMORY_SIZE MB" >&6; }
51025  else
51026    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51027$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51028    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51029$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51030  fi
51031
51032  else
51033    MEMORY_SIZE=$with_memory_size
51034  fi
51035
51036
51037
51038  # Provide a decent default number of parallel jobs for make depending on
51039  # number of cores, amount of memory and machine architecture.
51040
51041# Check whether --with-jobs was given.
51042if test "${with_jobs+set}" = set; then :
51043  withval=$with_jobs;
51044fi
51045
51046  if test "x$with_jobs" = x; then
51047    # Number of jobs was not specified, calculate.
51048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51049$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51050    # Approximate memory in GB.
51051    memory_gb=`expr $MEMORY_SIZE / 1024`
51052    # Pick the lowest of memory in gb and number of cores.
51053    if test "$memory_gb" -lt "$NUM_CORES"; then
51054      JOBS="$memory_gb"
51055    else
51056      JOBS="$NUM_CORES"
51057      # On bigger machines, leave some room for other processes to run
51058      if test "$JOBS" -gt "4"; then
51059        JOBS=`expr $JOBS '*' 90 / 100`
51060      fi
51061    fi
51062    # Cap number of jobs to 16
51063    if test "$JOBS" -gt "16"; then
51064      JOBS=16
51065    fi
51066    if test "$JOBS" -eq "0"; then
51067      JOBS=1
51068    fi
51069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51070$as_echo "$JOBS" >&6; }
51071  else
51072    JOBS=$with_jobs
51073  fi
51074
51075
51076
51077# Setup arguments for the boot jdk (after cores and memory have been setup)
51078
51079  ##############################################################################
51080  #
51081  # Specify jvm options for anything that is run with the Boot JDK.
51082  # Not all JVM:s accept the same arguments on the command line.
51083  #
51084
51085# Check whether --with-boot-jdk-jvmargs was given.
51086if test "${with_boot_jdk_jvmargs+set}" = set; then :
51087  withval=$with_boot_jdk_jvmargs;
51088fi
51089
51090
51091  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51092$as_echo_n "checking flags for boot jdk java command ... " >&6; }
51093
51094  # Disable special log output when a debug build is used as Boot JDK...
51095
51096  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51097  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51098  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51099  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51100  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51101  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51102    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51103    JVM_ARG_OK=true
51104  else
51105    $ECHO "Arg failed:" >&5
51106    $ECHO "$OUTPUT" >&5
51107    JVM_ARG_OK=false
51108  fi
51109
51110
51111  # Apply user provided options.
51112
51113  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51114  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51115  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51116  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51117  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51118  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51119    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51120    JVM_ARG_OK=true
51121  else
51122    $ECHO "Arg failed:" >&5
51123    $ECHO "$OUTPUT" >&5
51124    JVM_ARG_OK=false
51125  fi
51126
51127
51128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51129$as_echo "$boot_jdk_jvmargs" >&6; }
51130
51131  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51132  JAVA_FLAGS=$boot_jdk_jvmargs
51133
51134
51135
51136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51137$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51138
51139  # Starting amount of heap memory.
51140
51141  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51142  $ECHO "Command: $JAVA -Xms64M -version" >&5
51143  OUTPUT=`$JAVA -Xms64M -version 2>&1`
51144  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51145  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51146  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51147    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51148    JVM_ARG_OK=true
51149  else
51150    $ECHO "Arg failed:" >&5
51151    $ECHO "$OUTPUT" >&5
51152    JVM_ARG_OK=false
51153  fi
51154
51155
51156  # Maximum amount of heap memory.
51157  # Maximum stack size.
51158  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51159  if test "x$BUILD_NUM_BITS" = x32; then
51160    if test "$JVM_MAX_HEAP" -gt "1100"; then
51161      JVM_MAX_HEAP=1100
51162    elif test "$JVM_MAX_HEAP" -lt "512"; then
51163      JVM_MAX_HEAP=512
51164    fi
51165    STACK_SIZE=768
51166  else
51167    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51168    # pointers are used. Apparently, we need to increase the heap and stack
51169    # space for the jvm. More specifically, when running javac to build huge
51170    # jdk batch
51171    if test "$JVM_MAX_HEAP" -gt "1600"; then
51172      JVM_MAX_HEAP=1600
51173    elif test "$JVM_MAX_HEAP" -lt "512"; then
51174      JVM_MAX_HEAP=512
51175    fi
51176    STACK_SIZE=1536
51177  fi
51178
51179  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51180  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51181  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51182  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51183  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51184  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51185    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51186    JVM_ARG_OK=true
51187  else
51188    $ECHO "Arg failed:" >&5
51189    $ECHO "$OUTPUT" >&5
51190    JVM_ARG_OK=false
51191  fi
51192
51193
51194  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51195  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51196  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51197  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51198  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51199  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51200    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51201    JVM_ARG_OK=true
51202  else
51203    $ECHO "Arg failed:" >&5
51204    $ECHO "$OUTPUT" >&5
51205    JVM_ARG_OK=false
51206  fi
51207
51208
51209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51210$as_echo "$boot_jdk_jvmargs_big" >&6; }
51211
51212  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51213
51214
51215
51216  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51217$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51218
51219  # Use serial gc for small short lived tools if possible
51220
51221  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51222  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51223  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51224  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51225  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51226  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51227    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51228    JVM_ARG_OK=true
51229  else
51230    $ECHO "Arg failed:" >&5
51231    $ECHO "$OUTPUT" >&5
51232    JVM_ARG_OK=false
51233  fi
51234
51235
51236  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51237  $ECHO "Command: $JAVA -Xms32M -version" >&5
51238  OUTPUT=`$JAVA -Xms32M -version 2>&1`
51239  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51240  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51241  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51242    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51243    JVM_ARG_OK=true
51244  else
51245    $ECHO "Arg failed:" >&5
51246    $ECHO "$OUTPUT" >&5
51247    JVM_ARG_OK=false
51248  fi
51249
51250
51251  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51252  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51253  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51254  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51255  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51256  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51257    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51258    JVM_ARG_OK=true
51259  else
51260    $ECHO "Arg failed:" >&5
51261    $ECHO "$OUTPUT" >&5
51262    JVM_ARG_OK=false
51263  fi
51264
51265
51266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51267$as_echo "$boot_jdk_jvmargs_small" >&6; }
51268
51269  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51270
51271
51272  JAVA_TOOL_FLAGS_SMALL=""
51273  for f in $JAVA_FLAGS_SMALL; do
51274    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51275  done
51276
51277
51278
51279# Setup smart javac (after cores and memory have been setup)
51280
51281
51282# Check whether --with-sjavac-server-java was given.
51283if test "${with_sjavac_server_java+set}" = set; then :
51284  withval=$with_sjavac_server_java;
51285fi
51286
51287
51288  if test "x$with_sjavac_server_java" != x; then
51289    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51290    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51291    if test "x$FOUND_VERSION" = x; then
51292      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51293    fi
51294  else
51295    SJAVAC_SERVER_JAVA="$JAVA"
51296  fi
51297
51298
51299  if test "$MEMORY_SIZE" -gt "3000"; then
51300
51301  $ECHO "Check if jvm arg is ok: -d64" >&5
51302  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51303  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51304  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51305  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51306  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51307    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51308    JVM_ARG_OK=true
51309  else
51310    $ECHO "Arg failed:" >&5
51311    $ECHO "$OUTPUT" >&5
51312    JVM_ARG_OK=false
51313  fi
51314
51315    if test "$JVM_ARG_OK" = true; then
51316      JVM_64BIT=true
51317      JVM_ARG_OK=false
51318    fi
51319  fi
51320
51321  MX_VALUE=`expr $MEMORY_SIZE / 2`
51322  if test "$JVM_64BIT" = true; then
51323    # Set ms lower than mx since more than one instance of the server might
51324    # get launched at the same time before they figure out which instance won.
51325    MS_VALUE=512
51326    if test "$MX_VALUE" -gt "2048"; then
51327      MX_VALUE=2048
51328    fi
51329  else
51330    MS_VALUE=256
51331    if test "$MX_VALUE" -gt "1500"; then
51332      MX_VALUE=1500
51333    fi
51334  fi
51335  if test "$MX_VALUE" -lt "512"; then
51336    MX_VALUE=512
51337  fi
51338
51339  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51340  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51341  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51342  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51343  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51344  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51345    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51346    JVM_ARG_OK=true
51347  else
51348    $ECHO "Arg failed:" >&5
51349    $ECHO "$OUTPUT" >&5
51350    JVM_ARG_OK=false
51351  fi
51352
51353
51354
51355  # Check whether --enable-sjavac was given.
51356if test "${enable_sjavac+set}" = set; then :
51357  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51358else
51359  ENABLE_SJAVAC='no'
51360fi
51361
51362  if test "x$JVM_ARG_OK" = "xfalse"; then
51363    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51364$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51365    ENABLE_SJAVAC=no;
51366  fi
51367  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51368$as_echo_n "checking whether to use sjavac... " >&6; }
51369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51370$as_echo "$ENABLE_SJAVAC" >&6; }
51371
51372
51373  if test "x$ENABLE_SJAVAC" = xyes; then
51374    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51375  else
51376    SJAVAC_SERVER_DIR=
51377  fi
51378
51379
51380
51381# Can the C/C++ compiler use precompiled headers?
51382
51383
51384  ###############################################################################
51385  #
51386  # Can the C/C++ compiler use precompiled headers?
51387  #
51388  # Check whether --enable-precompiled-headers was given.
51389if test "${enable_precompiled_headers+set}" = set; then :
51390  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51391else
51392  ENABLE_PRECOMPH=yes
51393fi
51394
51395
51396  USE_PRECOMPILED_HEADER=1
51397  if test "x$ENABLE_PRECOMPH" = xno; then
51398    USE_PRECOMPILED_HEADER=0
51399  fi
51400
51401  if test "x$ENABLE_PRECOMPH" = xyes; then
51402    # Check that the compiler actually supports precomp headers.
51403    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51404      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51405$as_echo_n "checking that precompiled headers work... " >&6; }
51406      echo "int alfa();" > conftest.h
51407      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51408      if test ! -f conftest.hpp.gch; then
51409        USE_PRECOMPILED_HEADER=0
51410        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51411$as_echo "no" >&6; }
51412      else
51413        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51414$as_echo "yes" >&6; }
51415      fi
51416      rm -f conftest.h conftest.hpp.gch
51417    fi
51418  fi
51419
51420
51421
51422
51423# Setup use of ccache, if available
51424
51425  # Check whether --enable-ccache was given.
51426if test "${enable_ccache+set}" = set; then :
51427  enableval=$enable_ccache;
51428fi
51429
51430
51431  CCACHE=
51432  CCACHE_STATUS=
51433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51434$as_echo_n "checking is ccache enabled... " >&6; }
51435  if test "x$enable_ccache" = xyes; then
51436    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51437      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51438$as_echo "yes" >&6; }
51439      OLD_PATH="$PATH"
51440      if test "x$TOOLCHAIN_PATH" != x; then
51441        PATH=$TOOLCHAIN_PATH:$PATH
51442      fi
51443
51444
51445
51446  # Publish this variable in the help.
51447
51448
51449  if test "x$CCACHE" = x; then
51450    # The variable is not set by user, try to locate tool using the code snippet
51451    for ac_prog in ccache
51452do
51453  # Extract the first word of "$ac_prog", so it can be a program name with args.
51454set dummy $ac_prog; ac_word=$2
51455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51456$as_echo_n "checking for $ac_word... " >&6; }
51457if ${ac_cv_path_CCACHE+:} false; then :
51458  $as_echo_n "(cached) " >&6
51459else
51460  case $CCACHE in
51461  [\\/]* | ?:[\\/]*)
51462  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51463  ;;
51464  *)
51465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51466for as_dir in $PATH
51467do
51468  IFS=$as_save_IFS
51469  test -z "$as_dir" && as_dir=.
51470    for ac_exec_ext in '' $ac_executable_extensions; do
51471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51472    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51474    break 2
51475  fi
51476done
51477  done
51478IFS=$as_save_IFS
51479
51480  ;;
51481esac
51482fi
51483CCACHE=$ac_cv_path_CCACHE
51484if test -n "$CCACHE"; then
51485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51486$as_echo "$CCACHE" >&6; }
51487else
51488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51489$as_echo "no" >&6; }
51490fi
51491
51492
51493  test -n "$CCACHE" && break
51494done
51495
51496  else
51497    # The variable is set, but is it from the command line or the environment?
51498
51499    # Try to remove the string !CCACHE! from our list.
51500    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51501    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51502      # If it failed, the variable was not from the command line. Ignore it,
51503      # but warn the user (except for BASH, which is always set by the calling BASH).
51504      if test "xCCACHE" != xBASH; then
51505        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51506$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51507      fi
51508      # Try to locate tool using the code snippet
51509      for ac_prog in ccache
51510do
51511  # Extract the first word of "$ac_prog", so it can be a program name with args.
51512set dummy $ac_prog; ac_word=$2
51513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51514$as_echo_n "checking for $ac_word... " >&6; }
51515if ${ac_cv_path_CCACHE+:} false; then :
51516  $as_echo_n "(cached) " >&6
51517else
51518  case $CCACHE in
51519  [\\/]* | ?:[\\/]*)
51520  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51521  ;;
51522  *)
51523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51524for as_dir in $PATH
51525do
51526  IFS=$as_save_IFS
51527  test -z "$as_dir" && as_dir=.
51528    for ac_exec_ext in '' $ac_executable_extensions; do
51529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51530    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51532    break 2
51533  fi
51534done
51535  done
51536IFS=$as_save_IFS
51537
51538  ;;
51539esac
51540fi
51541CCACHE=$ac_cv_path_CCACHE
51542if test -n "$CCACHE"; then
51543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51544$as_echo "$CCACHE" >&6; }
51545else
51546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51547$as_echo "no" >&6; }
51548fi
51549
51550
51551  test -n "$CCACHE" && break
51552done
51553
51554    else
51555      # If it succeeded, then it was overridden by the user. We will use it
51556      # for the tool.
51557
51558      # First remove it from the list of overridden variables, so we can test
51559      # for unknown variables in the end.
51560      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51561
51562      # Check if the provided tool contains a complete path.
51563      tool_specified="$CCACHE"
51564      tool_basename="${tool_specified##*/}"
51565      if test "x$tool_basename" = "x$tool_specified"; then
51566        # A command without a complete path is provided, search $PATH.
51567        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51568$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51569        # Extract the first word of "$tool_basename", so it can be a program name with args.
51570set dummy $tool_basename; ac_word=$2
51571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51572$as_echo_n "checking for $ac_word... " >&6; }
51573if ${ac_cv_path_CCACHE+:} false; then :
51574  $as_echo_n "(cached) " >&6
51575else
51576  case $CCACHE in
51577  [\\/]* | ?:[\\/]*)
51578  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51579  ;;
51580  *)
51581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51582for as_dir in $PATH
51583do
51584  IFS=$as_save_IFS
51585  test -z "$as_dir" && as_dir=.
51586    for ac_exec_ext in '' $ac_executable_extensions; do
51587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51588    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51590    break 2
51591  fi
51592done
51593  done
51594IFS=$as_save_IFS
51595
51596  ;;
51597esac
51598fi
51599CCACHE=$ac_cv_path_CCACHE
51600if test -n "$CCACHE"; then
51601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51602$as_echo "$CCACHE" >&6; }
51603else
51604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51605$as_echo "no" >&6; }
51606fi
51607
51608
51609        if test "x$CCACHE" = x; then
51610          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51611        fi
51612      else
51613        # Otherwise we believe it is a complete path. Use it as it is.
51614        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51615$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51616        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51617$as_echo_n "checking for CCACHE... " >&6; }
51618        if test ! -x "$tool_specified"; then
51619          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51620$as_echo "not found" >&6; }
51621          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51622        fi
51623        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51624$as_echo "$tool_specified" >&6; }
51625      fi
51626    fi
51627  fi
51628
51629
51630
51631  if test "x$CCACHE" = x; then
51632    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51633  fi
51634
51635
51636      PATH="$OLD_PATH"
51637      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
51638      CCACHE_STATUS="Active ($CCACHE_VERSION)"
51639    else
51640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51641$as_echo "no" >&6; }
51642      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
51643$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
51644    fi
51645  elif test "x$enable_ccache" = xno; then
51646    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51647$as_echo "no, explicitly disabled" >&6; }
51648    CCACHE_STATUS="Disabled"
51649  elif test "x$enable_ccache" = x; then
51650    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51651$as_echo "no" >&6; }
51652  else
51653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51654$as_echo "unknown" >&6; }
51655    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51656  fi
51657
51658
51659
51660# Check whether --with-ccache-dir was given.
51661if test "${with_ccache_dir+set}" = set; then :
51662  withval=$with_ccache_dir;
51663fi
51664
51665
51666  if test "x$with_ccache_dir" != x; then
51667    # When using a non home ccache directory, assume the use is to share ccache files
51668    # with other users. Thus change the umask.
51669    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51670    if test "x$CCACHE" = x; then
51671      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51672$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51673    fi
51674  fi
51675
51676  if test "x$CCACHE" != x; then
51677
51678  if test "x$CCACHE" != x; then
51679    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
51680      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
51681          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
51682      if test "x$HAS_BAD_CCACHE" != "x"; then
51683        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
51684      fi
51685      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51686$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51687      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
51688      PUSHED_FLAGS="$CXXFLAGS"
51689      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
51690      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51691/* end confdefs.h.  */
51692
51693int
51694main ()
51695{
51696
51697  ;
51698  return 0;
51699}
51700_ACEOF
51701if ac_fn_cxx_try_compile "$LINENO"; then :
51702  CC_KNOWS_CCACHE_TRICK=yes
51703else
51704  CC_KNOWS_CCACHE_TRICK=no
51705fi
51706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51707      CXXFLAGS="$PUSHED_FLAGS"
51708      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51710$as_echo "yes" >&6; }
51711        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
51712
51713        CCACHE_SLOPPINESS=pch_defines,time_macros
51714      else
51715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51716$as_echo "no" >&6; }
51717        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
51718      fi
51719    fi
51720
51721    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
51722        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
51723
51724    if test "x$SET_CCACHE_DIR" != x; then
51725      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51726      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51727    fi
51728  fi
51729
51730  fi
51731
51732
51733###############################################################################
51734#
51735# And now the finish...
51736#
51737###############################################################################
51738
51739# Check for some common pitfalls
51740
51741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51742    file_to_test="$SRC_ROOT/LICENSE"
51743    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51744      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
51745    fi
51746  fi
51747
51748
51749  # Did user specify any unknown variables?
51750
51751  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51752    # Replace the separating ! with spaces before presenting for end user.
51753    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51754    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51755$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51756  fi
51757
51758
51759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51760$as_echo_n "checking if build directory is on local disk... " >&6; }
51761
51762  # df -l lists only local disks; if the given directory is not found then
51763  # a non-zero exit code is given
51764  if test "x$DF" = x; then
51765    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51766      # msys does not have df; use Windows "net use" instead.
51767      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51768      if test "x$IS_NETWORK_DISK" = x; then
51769        OUTPUT_DIR_IS_LOCAL="yes"
51770      else
51771        OUTPUT_DIR_IS_LOCAL="no"
51772      fi
51773    else
51774      # No df here, say it's local
51775      OUTPUT_DIR_IS_LOCAL="yes"
51776    fi
51777  else
51778    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51779      OUTPUT_DIR_IS_LOCAL="yes"
51780    else
51781      OUTPUT_DIR_IS_LOCAL="no"
51782    fi
51783  fi
51784
51785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51786$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51787
51788
51789
51790  # Check if the user has any old-style ALT_ variables set.
51791  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51792
51793  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51794  # Since we can't properly handle the dependencies for this, warn the user about the situation
51795  if test -e $OUTPUT_ROOT/spec.gmk; then
51796    IS_RECONFIGURE=yes
51797  else
51798    IS_RECONFIGURE=no
51799  fi
51800
51801
51802# At the end, call the custom hook. (Dummy macro if no custom sources available)
51803
51804
51805# We're messing a bit with internal autoconf variables to put the config.status
51806# in the output directory instead of the current directory.
51807CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51808
51809# Create the actual output files. Now the main work of configure is done.
51810cat >confcache <<\_ACEOF
51811# This file is a shell script that caches the results of configure
51812# tests run on this system so they can be shared between configure
51813# scripts and configure runs, see configure's option --config-cache.
51814# It is not useful on other systems.  If it contains results you don't
51815# want to keep, you may remove or edit it.
51816#
51817# config.status only pays attention to the cache file if you give it
51818# the --recheck option to rerun configure.
51819#
51820# `ac_cv_env_foo' variables (set or unset) will be overridden when
51821# loading this file, other *unset* `ac_cv_foo' will be assigned the
51822# following values.
51823
51824_ACEOF
51825
51826# The following way of writing the cache mishandles newlines in values,
51827# but we know of no workaround that is simple, portable, and efficient.
51828# So, we kill variables containing newlines.
51829# Ultrix sh set writes to stderr and can't be redirected directly,
51830# and sets the high bit in the cache file unless we assign to the vars.
51831(
51832  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51833    eval ac_val=\$$ac_var
51834    case $ac_val in #(
51835    *${as_nl}*)
51836      case $ac_var in #(
51837      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51838$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51839      esac
51840      case $ac_var in #(
51841      _ | IFS | as_nl) ;; #(
51842      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51843      *) { eval $ac_var=; unset $ac_var;} ;;
51844      esac ;;
51845    esac
51846  done
51847
51848  (set) 2>&1 |
51849    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51850    *${as_nl}ac_space=\ *)
51851      # `set' does not quote correctly, so add quotes: double-quote
51852      # substitution turns \\\\ into \\, and sed turns \\ into \.
51853      sed -n \
51854	"s/'/'\\\\''/g;
51855	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51856      ;; #(
51857    *)
51858      # `set' quotes correctly as required by POSIX, so do not add quotes.
51859      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51860      ;;
51861    esac |
51862    sort
51863) |
51864  sed '
51865     /^ac_cv_env_/b end
51866     t clear
51867     :clear
51868     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51869     t end
51870     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51871     :end' >>confcache
51872if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51873  if test -w "$cache_file"; then
51874    if test "x$cache_file" != "x/dev/null"; then
51875      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51876$as_echo "$as_me: updating cache $cache_file" >&6;}
51877      if test ! -f "$cache_file" || test -h "$cache_file"; then
51878	cat confcache >"$cache_file"
51879      else
51880        case $cache_file in #(
51881        */* | ?:*)
51882	  mv -f confcache "$cache_file"$$ &&
51883	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51884        *)
51885	  mv -f confcache "$cache_file" ;;
51886	esac
51887      fi
51888    fi
51889  else
51890    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51891$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51892  fi
51893fi
51894rm -f confcache
51895
51896test "x$prefix" = xNONE && prefix=$ac_default_prefix
51897# Let make expand exec_prefix.
51898test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51899
51900# Transform confdefs.h into DEFS.
51901# Protect against shell expansion while executing Makefile rules.
51902# Protect against Makefile macro expansion.
51903#
51904# If the first sed substitution is executed (which looks for macros that
51905# take arguments), then branch to the quote section.  Otherwise,
51906# look for a macro that doesn't take arguments.
51907ac_script='
51908:mline
51909/\\$/{
51910 N
51911 s,\\\n,,
51912 b mline
51913}
51914t clear
51915:clear
51916s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51917t quote
51918s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51919t quote
51920b any
51921:quote
51922s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51923s/\[/\\&/g
51924s/\]/\\&/g
51925s/\$/$$/g
51926H
51927:any
51928${
51929	g
51930	s/^\n//
51931	s/\n/ /g
51932	p
51933}
51934'
51935DEFS=`sed -n "$ac_script" confdefs.h`
51936
51937
51938ac_libobjs=
51939ac_ltlibobjs=
51940U=
51941for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51942  # 1. Remove the extension, and $U if already installed.
51943  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51944  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51945  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51946  #    will be set to the directory where LIBOBJS objects are built.
51947  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51948  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51949done
51950LIBOBJS=$ac_libobjs
51951
51952LTLIBOBJS=$ac_ltlibobjs
51953
51954
51955
51956: "${CONFIG_STATUS=./config.status}"
51957ac_write_fail=0
51958ac_clean_files_save=$ac_clean_files
51959ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51960{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51961$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51962as_write_fail=0
51963cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51964#! $SHELL
51965# Generated by $as_me.
51966# Run this file to recreate the current configuration.
51967# Compiler output produced by configure, useful for debugging
51968# configure, is in config.log if it exists.
51969
51970debug=false
51971ac_cs_recheck=false
51972ac_cs_silent=false
51973
51974SHELL=\${CONFIG_SHELL-$SHELL}
51975export SHELL
51976_ASEOF
51977cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51978## -------------------- ##
51979## M4sh Initialization. ##
51980## -------------------- ##
51981
51982# Be more Bourne compatible
51983DUALCASE=1; export DUALCASE # for MKS sh
51984if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51985  emulate sh
51986  NULLCMD=:
51987  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51988  # is contrary to our usage.  Disable this feature.
51989  alias -g '${1+"$@"}'='"$@"'
51990  setopt NO_GLOB_SUBST
51991else
51992  case `(set -o) 2>/dev/null` in #(
51993  *posix*) :
51994    set -o posix ;; #(
51995  *) :
51996     ;;
51997esac
51998fi
51999
52000
52001as_nl='
52002'
52003export as_nl
52004# Printing a long string crashes Solaris 7 /usr/bin/printf.
52005as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52006as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52007as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52008# Prefer a ksh shell builtin over an external printf program on Solaris,
52009# but without wasting forks for bash or zsh.
52010if test -z "$BASH_VERSION$ZSH_VERSION" \
52011    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52012  as_echo='print -r --'
52013  as_echo_n='print -rn --'
52014elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52015  as_echo='printf %s\n'
52016  as_echo_n='printf %s'
52017else
52018  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52019    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52020    as_echo_n='/usr/ucb/echo -n'
52021  else
52022    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52023    as_echo_n_body='eval
52024      arg=$1;
52025      case $arg in #(
52026      *"$as_nl"*)
52027	expr "X$arg" : "X\\(.*\\)$as_nl";
52028	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52029      esac;
52030      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52031    '
52032    export as_echo_n_body
52033    as_echo_n='sh -c $as_echo_n_body as_echo'
52034  fi
52035  export as_echo_body
52036  as_echo='sh -c $as_echo_body as_echo'
52037fi
52038
52039# The user is always right.
52040if test "${PATH_SEPARATOR+set}" != set; then
52041  PATH_SEPARATOR=:
52042  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52043    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52044      PATH_SEPARATOR=';'
52045  }
52046fi
52047
52048
52049# IFS
52050# We need space, tab and new line, in precisely that order.  Quoting is
52051# there to prevent editors from complaining about space-tab.
52052# (If _AS_PATH_WALK were called with IFS unset, it would disable word
52053# splitting by setting IFS to empty value.)
52054IFS=" ""	$as_nl"
52055
52056# Find who we are.  Look in the path if we contain no directory separator.
52057as_myself=
52058case $0 in #((
52059  *[\\/]* ) as_myself=$0 ;;
52060  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52061for as_dir in $PATH
52062do
52063  IFS=$as_save_IFS
52064  test -z "$as_dir" && as_dir=.
52065    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52066  done
52067IFS=$as_save_IFS
52068
52069     ;;
52070esac
52071# We did not find ourselves, most probably we were run as `sh COMMAND'
52072# in which case we are not to be found in the path.
52073if test "x$as_myself" = x; then
52074  as_myself=$0
52075fi
52076if test ! -f "$as_myself"; then
52077  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52078  exit 1
52079fi
52080
52081# Unset variables that we do not need and which cause bugs (e.g. in
52082# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52083# suppresses any "Segmentation fault" message there.  '((' could
52084# trigger a bug in pdksh 5.2.14.
52085for as_var in BASH_ENV ENV MAIL MAILPATH
52086do eval test x\${$as_var+set} = xset \
52087  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52088done
52089PS1='$ '
52090PS2='> '
52091PS4='+ '
52092
52093# NLS nuisances.
52094LC_ALL=C
52095export LC_ALL
52096LANGUAGE=C
52097export LANGUAGE
52098
52099# CDPATH.
52100(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52101
52102
52103# as_fn_error STATUS ERROR [LINENO LOG_FD]
52104# ----------------------------------------
52105# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52106# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52107# script with STATUS, using 1 if that was 0.
52108as_fn_error ()
52109{
52110  as_status=$1; test $as_status -eq 0 && as_status=1
52111  if test "$4"; then
52112    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52113    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52114  fi
52115  $as_echo "$as_me: error: $2" >&2
52116  as_fn_exit $as_status
52117} # as_fn_error
52118
52119
52120# as_fn_set_status STATUS
52121# -----------------------
52122# Set $? to STATUS, without forking.
52123as_fn_set_status ()
52124{
52125  return $1
52126} # as_fn_set_status
52127
52128# as_fn_exit STATUS
52129# -----------------
52130# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52131as_fn_exit ()
52132{
52133  set +e
52134  as_fn_set_status $1
52135  exit $1
52136} # as_fn_exit
52137
52138# as_fn_unset VAR
52139# ---------------
52140# Portably unset VAR.
52141as_fn_unset ()
52142{
52143  { eval $1=; unset $1;}
52144}
52145as_unset=as_fn_unset
52146# as_fn_append VAR VALUE
52147# ----------------------
52148# Append the text in VALUE to the end of the definition contained in VAR. Take
52149# advantage of any shell optimizations that allow amortized linear growth over
52150# repeated appends, instead of the typical quadratic growth present in naive
52151# implementations.
52152if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52153  eval 'as_fn_append ()
52154  {
52155    eval $1+=\$2
52156  }'
52157else
52158  as_fn_append ()
52159  {
52160    eval $1=\$$1\$2
52161  }
52162fi # as_fn_append
52163
52164# as_fn_arith ARG...
52165# ------------------
52166# Perform arithmetic evaluation on the ARGs, and store the result in the
52167# global $as_val. Take advantage of shells that can avoid forks. The arguments
52168# must be portable across $(()) and expr.
52169if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52170  eval 'as_fn_arith ()
52171  {
52172    as_val=$(( $* ))
52173  }'
52174else
52175  as_fn_arith ()
52176  {
52177    as_val=`expr "$@" || test $? -eq 1`
52178  }
52179fi # as_fn_arith
52180
52181
52182if expr a : '\(a\)' >/dev/null 2>&1 &&
52183   test "X`expr 00001 : '.*\(...\)'`" = X001; then
52184  as_expr=expr
52185else
52186  as_expr=false
52187fi
52188
52189if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52190  as_basename=basename
52191else
52192  as_basename=false
52193fi
52194
52195if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52196  as_dirname=dirname
52197else
52198  as_dirname=false
52199fi
52200
52201as_me=`$as_basename -- "$0" ||
52202$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52203	 X"$0" : 'X\(//\)$' \| \
52204	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52205$as_echo X/"$0" |
52206    sed '/^.*\/\([^/][^/]*\)\/*$/{
52207	    s//\1/
52208	    q
52209	  }
52210	  /^X\/\(\/\/\)$/{
52211	    s//\1/
52212	    q
52213	  }
52214	  /^X\/\(\/\).*/{
52215	    s//\1/
52216	    q
52217	  }
52218	  s/.*/./; q'`
52219
52220# Avoid depending upon Character Ranges.
52221as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52222as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52223as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52224as_cr_digits='0123456789'
52225as_cr_alnum=$as_cr_Letters$as_cr_digits
52226
52227ECHO_C= ECHO_N= ECHO_T=
52228case `echo -n x` in #(((((
52229-n*)
52230  case `echo 'xy\c'` in
52231  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52232  xy)  ECHO_C='\c';;
52233  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52234       ECHO_T='	';;
52235  esac;;
52236*)
52237  ECHO_N='-n';;
52238esac
52239
52240rm -f conf$$ conf$$.exe conf$$.file
52241if test -d conf$$.dir; then
52242  rm -f conf$$.dir/conf$$.file
52243else
52244  rm -f conf$$.dir
52245  mkdir conf$$.dir 2>/dev/null
52246fi
52247if (echo >conf$$.file) 2>/dev/null; then
52248  if ln -s conf$$.file conf$$ 2>/dev/null; then
52249    as_ln_s='ln -s'
52250    # ... but there are two gotchas:
52251    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52252    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52253    # In both cases, we have to default to `cp -pR'.
52254    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52255      as_ln_s='cp -pR'
52256  elif ln conf$$.file conf$$ 2>/dev/null; then
52257    as_ln_s=ln
52258  else
52259    as_ln_s='cp -pR'
52260  fi
52261else
52262  as_ln_s='cp -pR'
52263fi
52264rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52265rmdir conf$$.dir 2>/dev/null
52266
52267
52268# as_fn_mkdir_p
52269# -------------
52270# Create "$as_dir" as a directory, including parents if necessary.
52271as_fn_mkdir_p ()
52272{
52273
52274  case $as_dir in #(
52275  -*) as_dir=./$as_dir;;
52276  esac
52277  test -d "$as_dir" || eval $as_mkdir_p || {
52278    as_dirs=
52279    while :; do
52280      case $as_dir in #(
52281      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52282      *) as_qdir=$as_dir;;
52283      esac
52284      as_dirs="'$as_qdir' $as_dirs"
52285      as_dir=`$as_dirname -- "$as_dir" ||
52286$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52287	 X"$as_dir" : 'X\(//\)[^/]' \| \
52288	 X"$as_dir" : 'X\(//\)$' \| \
52289	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52290$as_echo X"$as_dir" |
52291    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52292	    s//\1/
52293	    q
52294	  }
52295	  /^X\(\/\/\)[^/].*/{
52296	    s//\1/
52297	    q
52298	  }
52299	  /^X\(\/\/\)$/{
52300	    s//\1/
52301	    q
52302	  }
52303	  /^X\(\/\).*/{
52304	    s//\1/
52305	    q
52306	  }
52307	  s/.*/./; q'`
52308      test -d "$as_dir" && break
52309    done
52310    test -z "$as_dirs" || eval "mkdir $as_dirs"
52311  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52312
52313
52314} # as_fn_mkdir_p
52315if mkdir -p . 2>/dev/null; then
52316  as_mkdir_p='mkdir -p "$as_dir"'
52317else
52318  test -d ./-p && rmdir ./-p
52319  as_mkdir_p=false
52320fi
52321
52322
52323# as_fn_executable_p FILE
52324# -----------------------
52325# Test if FILE is an executable regular file.
52326as_fn_executable_p ()
52327{
52328  test -f "$1" && test -x "$1"
52329} # as_fn_executable_p
52330as_test_x='test -x'
52331as_executable_p=as_fn_executable_p
52332
52333# Sed expression to map a string onto a valid CPP name.
52334as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52335
52336# Sed expression to map a string onto a valid variable name.
52337as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52338
52339
52340exec 6>&1
52341## ----------------------------------- ##
52342## Main body of $CONFIG_STATUS script. ##
52343## ----------------------------------- ##
52344_ASEOF
52345test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52346
52347cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52348# Save the log message, to keep $0 and so on meaningful, and to
52349# report actual input values of CONFIG_FILES etc. instead of their
52350# values after options handling.
52351ac_log="
52352This file was extended by OpenJDK $as_me jdk9, which was
52353generated by GNU Autoconf 2.69.  Invocation command line was
52354
52355  CONFIG_FILES    = $CONFIG_FILES
52356  CONFIG_HEADERS  = $CONFIG_HEADERS
52357  CONFIG_LINKS    = $CONFIG_LINKS
52358  CONFIG_COMMANDS = $CONFIG_COMMANDS
52359  $ $0 $@
52360
52361on `(hostname || uname -n) 2>/dev/null | sed 1q`
52362"
52363
52364_ACEOF
52365
52366case $ac_config_files in *"
52367"*) set x $ac_config_files; shift; ac_config_files=$*;;
52368esac
52369
52370
52371
52372cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52373# Files that config.status was made for.
52374config_files="$ac_config_files"
52375
52376_ACEOF
52377
52378cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52379ac_cs_usage="\
52380\`$as_me' instantiates files and other configuration actions
52381from templates according to the current configuration.  Unless the files
52382and actions are specified as TAGs, all are instantiated by default.
52383
52384Usage: $0 [OPTION]... [TAG]...
52385
52386  -h, --help       print this help, then exit
52387  -V, --version    print version number and configuration settings, then exit
52388      --config     print configuration, then exit
52389  -q, --quiet, --silent
52390                   do not print progress messages
52391  -d, --debug      don't remove temporary files
52392      --recheck    update $as_me by reconfiguring in the same conditions
52393      --file=FILE[:TEMPLATE]
52394                   instantiate the configuration file FILE
52395
52396Configuration files:
52397$config_files
52398
52399Report bugs to <build-dev@openjdk.java.net>.
52400OpenJDK home page: <http://openjdk.java.net>."
52401
52402_ACEOF
52403cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52404ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52405ac_cs_version="\\
52406OpenJDK config.status jdk9
52407configured by $0, generated by GNU Autoconf 2.69,
52408  with options \\"\$ac_cs_config\\"
52409
52410Copyright (C) 2012 Free Software Foundation, Inc.
52411This config.status script is free software; the Free Software Foundation
52412gives unlimited permission to copy, distribute and modify it."
52413
52414ac_pwd='$ac_pwd'
52415srcdir='$srcdir'
52416AWK='$AWK'
52417test -n "\$AWK" || AWK=awk
52418_ACEOF
52419
52420cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52421# The default lists apply if the user does not specify any file.
52422ac_need_defaults=:
52423while test $# != 0
52424do
52425  case $1 in
52426  --*=?*)
52427    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52428    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52429    ac_shift=:
52430    ;;
52431  --*=)
52432    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52433    ac_optarg=
52434    ac_shift=:
52435    ;;
52436  *)
52437    ac_option=$1
52438    ac_optarg=$2
52439    ac_shift=shift
52440    ;;
52441  esac
52442
52443  case $ac_option in
52444  # Handling of the options.
52445  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52446    ac_cs_recheck=: ;;
52447  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52448    $as_echo "$ac_cs_version"; exit ;;
52449  --config | --confi | --conf | --con | --co | --c )
52450    $as_echo "$ac_cs_config"; exit ;;
52451  --debug | --debu | --deb | --de | --d | -d )
52452    debug=: ;;
52453  --file | --fil | --fi | --f )
52454    $ac_shift
52455    case $ac_optarg in
52456    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52457    '') as_fn_error $? "missing file argument" ;;
52458    esac
52459    as_fn_append CONFIG_FILES " '$ac_optarg'"
52460    ac_need_defaults=false;;
52461  --he | --h |  --help | --hel | -h )
52462    $as_echo "$ac_cs_usage"; exit ;;
52463  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52464  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52465    ac_cs_silent=: ;;
52466
52467  # This is an error.
52468  -*) as_fn_error $? "unrecognized option: \`$1'
52469Try \`$0 --help' for more information." ;;
52470
52471  *) as_fn_append ac_config_targets " $1"
52472     ac_need_defaults=false ;;
52473
52474  esac
52475  shift
52476done
52477
52478ac_configure_extra_args=
52479
52480if $ac_cs_silent; then
52481  exec 6>/dev/null
52482  ac_configure_extra_args="$ac_configure_extra_args --silent"
52483fi
52484
52485_ACEOF
52486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52487if \$ac_cs_recheck; then
52488  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52489  shift
52490  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52491  CONFIG_SHELL='$SHELL'
52492  export CONFIG_SHELL
52493  exec "\$@"
52494fi
52495
52496_ACEOF
52497cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52498exec 5>>config.log
52499{
52500  echo
52501  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52502## Running $as_me. ##
52503_ASBOX
52504  $as_echo "$ac_log"
52505} >&5
52506
52507_ACEOF
52508cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52509_ACEOF
52510
52511cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52512
52513# Handling of arguments.
52514for ac_config_target in $ac_config_targets
52515do
52516  case $ac_config_target in
52517    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52518    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52519    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52520    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52521    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52522
52523  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52524  esac
52525done
52526
52527
52528# If the user did not use the arguments to specify the items to instantiate,
52529# then the envvar interface is used.  Set only those that are not.
52530# We use the long form for the default assignment because of an extremely
52531# bizarre bug on SunOS 4.1.3.
52532if $ac_need_defaults; then
52533  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52534fi
52535
52536# Have a temporary directory for convenience.  Make it in the build tree
52537# simply because there is no reason against having it here, and in addition,
52538# creating and moving files from /tmp can sometimes cause problems.
52539# Hook for its removal unless debugging.
52540# Note that there is a small window in which the directory will not be cleaned:
52541# after its creation but before its name has been assigned to `$tmp'.
52542$debug ||
52543{
52544  tmp= ac_tmp=
52545  trap 'exit_status=$?
52546  : "${ac_tmp:=$tmp}"
52547  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52548' 0
52549  trap 'as_fn_exit 1' 1 2 13 15
52550}
52551# Create a (secure) tmp directory for tmp files.
52552
52553{
52554  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52555  test -d "$tmp"
52556}  ||
52557{
52558  tmp=./conf$$-$RANDOM
52559  (umask 077 && mkdir "$tmp")
52560} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52561ac_tmp=$tmp
52562
52563# Set up the scripts for CONFIG_FILES section.
52564# No need to generate them if there are no CONFIG_FILES.
52565# This happens for instance with `./config.status config.h'.
52566if test -n "$CONFIG_FILES"; then
52567
52568
52569ac_cr=`echo X | tr X '\015'`
52570# On cygwin, bash can eat \r inside `` if the user requested igncr.
52571# But we know of no other shell where ac_cr would be empty at this
52572# point, so we can use a bashism as a fallback.
52573if test "x$ac_cr" = x; then
52574  eval ac_cr=\$\'\\r\'
52575fi
52576ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52577if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52578  ac_cs_awk_cr='\\r'
52579else
52580  ac_cs_awk_cr=$ac_cr
52581fi
52582
52583echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52584_ACEOF
52585
52586
52587{
52588  echo "cat >conf$$subs.awk <<_ACEOF" &&
52589  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52590  echo "_ACEOF"
52591} >conf$$subs.sh ||
52592  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52593ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52594ac_delim='%!_!# '
52595for ac_last_try in false false false false false :; do
52596  . ./conf$$subs.sh ||
52597    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52598
52599  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52600  if test $ac_delim_n = $ac_delim_num; then
52601    break
52602  elif $ac_last_try; then
52603    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52604  else
52605    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52606  fi
52607done
52608rm -f conf$$subs.sh
52609
52610cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52611cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52612_ACEOF
52613sed -n '
52614h
52615s/^/S["/; s/!.*/"]=/
52616p
52617g
52618s/^[^!]*!//
52619:repl
52620t repl
52621s/'"$ac_delim"'$//
52622t delim
52623:nl
52624h
52625s/\(.\{148\}\)..*/\1/
52626t more1
52627s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52628p
52629n
52630b repl
52631:more1
52632s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52633p
52634g
52635s/.\{148\}//
52636t nl
52637:delim
52638h
52639s/\(.\{148\}\)..*/\1/
52640t more2
52641s/["\\]/\\&/g; s/^/"/; s/$/"/
52642p
52643b
52644:more2
52645s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52646p
52647g
52648s/.\{148\}//
52649t delim
52650' <conf$$subs.awk | sed '
52651/^[^""]/{
52652  N
52653  s/\n//
52654}
52655' >>$CONFIG_STATUS || ac_write_fail=1
52656rm -f conf$$subs.awk
52657cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52658_ACAWK
52659cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52660  for (key in S) S_is_set[key] = 1
52661  FS = ""
52662
52663}
52664{
52665  line = $ 0
52666  nfields = split(line, field, "@")
52667  substed = 0
52668  len = length(field[1])
52669  for (i = 2; i < nfields; i++) {
52670    key = field[i]
52671    keylen = length(key)
52672    if (S_is_set[key]) {
52673      value = S[key]
52674      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52675      len += length(value) + length(field[++i])
52676      substed = 1
52677    } else
52678      len += 1 + keylen
52679  }
52680
52681  print line
52682}
52683
52684_ACAWK
52685_ACEOF
52686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52687if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52688  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52689else
52690  cat
52691fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52692  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52693_ACEOF
52694
52695# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52696# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52697# trailing colons and then remove the whole line if VPATH becomes empty
52698# (actually we leave an empty line to preserve line numbers).
52699if test "x$srcdir" = x.; then
52700  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52701h
52702s///
52703s/^/:/
52704s/[	 ]*$/:/
52705s/:\$(srcdir):/:/g
52706s/:\${srcdir}:/:/g
52707s/:@srcdir@:/:/g
52708s/^:*//
52709s/:*$//
52710x
52711s/\(=[	 ]*\).*/\1/
52712G
52713s/\n//
52714s/^[^=]*=[	 ]*$//
52715}'
52716fi
52717
52718cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52719fi # test -n "$CONFIG_FILES"
52720
52721
52722eval set X "  :F $CONFIG_FILES      "
52723shift
52724for ac_tag
52725do
52726  case $ac_tag in
52727  :[FHLC]) ac_mode=$ac_tag; continue;;
52728  esac
52729  case $ac_mode$ac_tag in
52730  :[FHL]*:*);;
52731  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52732  :[FH]-) ac_tag=-:-;;
52733  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52734  esac
52735  ac_save_IFS=$IFS
52736  IFS=:
52737  set x $ac_tag
52738  IFS=$ac_save_IFS
52739  shift
52740  ac_file=$1
52741  shift
52742
52743  case $ac_mode in
52744  :L) ac_source=$1;;
52745  :[FH])
52746    ac_file_inputs=
52747    for ac_f
52748    do
52749      case $ac_f in
52750      -) ac_f="$ac_tmp/stdin";;
52751      *) # Look for the file first in the build tree, then in the source tree
52752	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52753	 # because $ac_f cannot contain `:'.
52754	 test -f "$ac_f" ||
52755	   case $ac_f in
52756	   [\\/$]*) false;;
52757	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52758	   esac ||
52759	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52760      esac
52761      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52762      as_fn_append ac_file_inputs " '$ac_f'"
52763    done
52764
52765    # Let's still pretend it is `configure' which instantiates (i.e., don't
52766    # use $as_me), people would be surprised to read:
52767    #    /* config.h.  Generated by config.status.  */
52768    configure_input='Generated from '`
52769	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52770	`' by configure.'
52771    if test x"$ac_file" != x-; then
52772      configure_input="$ac_file.  $configure_input"
52773      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52774$as_echo "$as_me: creating $ac_file" >&6;}
52775    fi
52776    # Neutralize special characters interpreted by sed in replacement strings.
52777    case $configure_input in #(
52778    *\&* | *\|* | *\\* )
52779       ac_sed_conf_input=`$as_echo "$configure_input" |
52780       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52781    *) ac_sed_conf_input=$configure_input;;
52782    esac
52783
52784    case $ac_tag in
52785    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52786      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52787    esac
52788    ;;
52789  esac
52790
52791  ac_dir=`$as_dirname -- "$ac_file" ||
52792$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52793	 X"$ac_file" : 'X\(//\)[^/]' \| \
52794	 X"$ac_file" : 'X\(//\)$' \| \
52795	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52796$as_echo X"$ac_file" |
52797    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52798	    s//\1/
52799	    q
52800	  }
52801	  /^X\(\/\/\)[^/].*/{
52802	    s//\1/
52803	    q
52804	  }
52805	  /^X\(\/\/\)$/{
52806	    s//\1/
52807	    q
52808	  }
52809	  /^X\(\/\).*/{
52810	    s//\1/
52811	    q
52812	  }
52813	  s/.*/./; q'`
52814  as_dir="$ac_dir"; as_fn_mkdir_p
52815  ac_builddir=.
52816
52817case "$ac_dir" in
52818.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52819*)
52820  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52821  # A ".." for each directory in $ac_dir_suffix.
52822  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52823  case $ac_top_builddir_sub in
52824  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52825  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52826  esac ;;
52827esac
52828ac_abs_top_builddir=$ac_pwd
52829ac_abs_builddir=$ac_pwd$ac_dir_suffix
52830# for backward compatibility:
52831ac_top_builddir=$ac_top_build_prefix
52832
52833case $srcdir in
52834  .)  # We are building in place.
52835    ac_srcdir=.
52836    ac_top_srcdir=$ac_top_builddir_sub
52837    ac_abs_top_srcdir=$ac_pwd ;;
52838  [\\/]* | ?:[\\/]* )  # Absolute name.
52839    ac_srcdir=$srcdir$ac_dir_suffix;
52840    ac_top_srcdir=$srcdir
52841    ac_abs_top_srcdir=$srcdir ;;
52842  *) # Relative name.
52843    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52844    ac_top_srcdir=$ac_top_build_prefix$srcdir
52845    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52846esac
52847ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52848
52849
52850  case $ac_mode in
52851  :F)
52852  #
52853  # CONFIG_FILE
52854  #
52855
52856_ACEOF
52857
52858cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52859# If the template does not know about datarootdir, expand it.
52860# FIXME: This hack should be removed a few years after 2.60.
52861ac_datarootdir_hack=; ac_datarootdir_seen=
52862ac_sed_dataroot='
52863/datarootdir/ {
52864  p
52865  q
52866}
52867/@datadir@/p
52868/@docdir@/p
52869/@infodir@/p
52870/@localedir@/p
52871/@mandir@/p'
52872case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52873*datarootdir*) ac_datarootdir_seen=yes;;
52874*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52875  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52876$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52877_ACEOF
52878cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52879  ac_datarootdir_hack='
52880  s&@datadir@&$datadir&g
52881  s&@docdir@&$docdir&g
52882  s&@infodir@&$infodir&g
52883  s&@localedir@&$localedir&g
52884  s&@mandir@&$mandir&g
52885  s&\\\${datarootdir}&$datarootdir&g' ;;
52886esac
52887_ACEOF
52888
52889# Neutralize VPATH when `$srcdir' = `.'.
52890# Shell code in configure.ac might set extrasub.
52891# FIXME: do we really want to maintain this feature?
52892cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52893ac_sed_extra="$ac_vpsub
52894$extrasub
52895_ACEOF
52896cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52897:t
52898/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52899s|@configure_input@|$ac_sed_conf_input|;t t
52900s&@top_builddir@&$ac_top_builddir_sub&;t t
52901s&@top_build_prefix@&$ac_top_build_prefix&;t t
52902s&@srcdir@&$ac_srcdir&;t t
52903s&@abs_srcdir@&$ac_abs_srcdir&;t t
52904s&@top_srcdir@&$ac_top_srcdir&;t t
52905s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52906s&@builddir@&$ac_builddir&;t t
52907s&@abs_builddir@&$ac_abs_builddir&;t t
52908s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52909$ac_datarootdir_hack
52910"
52911eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52912  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52913
52914test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52915  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52916  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52917      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52918  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52919which seems to be undefined.  Please make sure it is defined" >&5
52920$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52921which seems to be undefined.  Please make sure it is defined" >&2;}
52922
52923  rm -f "$ac_tmp/stdin"
52924  case $ac_file in
52925  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52926  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52927  esac \
52928  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52929 ;;
52930
52931
52932
52933  esac
52934
52935done # for ac_tag
52936
52937
52938as_fn_exit 0
52939_ACEOF
52940ac_clean_files=$ac_clean_files_save
52941
52942test $ac_write_fail = 0 ||
52943  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52944
52945
52946# configure is writing to config.log, and then calls config.status.
52947# config.status does its own redirection, appending to config.log.
52948# Unfortunately, on DOS this fails, as config.log is still kept open
52949# by configure, so config.status won't be able to write to it; its
52950# output is simply discarded.  So we exec the FD to /dev/null,
52951# effectively closing config.log, so it can be properly (re)opened and
52952# appended to by config.status.  When coming back to configure, we
52953# need to make the FD available again.
52954if test "$no_create" != yes; then
52955  ac_cs_success=:
52956  ac_config_status_args=
52957  test "$silent" = yes &&
52958    ac_config_status_args="$ac_config_status_args --quiet"
52959  exec 5>/dev/null
52960  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52961  exec 5>>config.log
52962  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52963  # would make configure fail if this is the last instruction.
52964  $ac_cs_success || as_fn_exit 1
52965fi
52966if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52967  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52968$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52969fi
52970
52971
52972# Try to move the config.log file to the output directory.
52973if test -e ./config.log; then
52974  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52975fi
52976
52977# Make the compare script executable
52978$CHMOD +x $OUTPUT_ROOT/compare.sh
52979
52980# Finally output some useful information to the user
52981
52982  # Finally output some useful information to the user
52983
52984  printf "\n"
52985  printf "====================================================\n"
52986  if test "x$no_create" != "xyes"; then
52987    if test "x$IS_RECONFIGURE" != "xyes"; then
52988      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52989    else
52990      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52991    fi
52992  else
52993    if test "x$IS_RECONFIGURE" != "xyes"; then
52994      printf "A configuration has been successfully checked but not created\n"
52995    else
52996      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52997    fi
52998  fi
52999  if test "x$CONFIGURE_COMMAND_LINE" != x; then
53000    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53001  else
53002    printf "using default settings.\n"
53003  fi
53004
53005  printf "\n"
53006  printf "Configuration summary:\n"
53007  printf "* Debug level:    $DEBUG_LEVEL\n"
53008  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53009  printf "* JDK variant:    $JDK_VARIANT\n"
53010  printf "* JVM variants:   $with_jvm_variants\n"
53011  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53012
53013  printf "\n"
53014  printf "Tools summary:\n"
53015  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53016    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53017  fi
53018  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53019  if test "x$TOOLCHAIN_VERSION" != "x"; then
53020    print_version=" $TOOLCHAIN_VERSION"
53021  fi
53022  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53023  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53024  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53025
53026  printf "\n"
53027  printf "Build performance summary:\n"
53028  printf "* Cores to use:   $JOBS\n"
53029  printf "* Memory limit:   $MEMORY_SIZE MB\n"
53030  if test "x$CCACHE_STATUS" != "x"; then
53031    printf "* ccache status:  $CCACHE_STATUS\n"
53032  fi
53033  printf "\n"
53034
53035  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53036    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53037    printf "will result in longer build times.\n"
53038    printf "\n"
53039  fi
53040
53041  if test "x$FOUND_ALT_VARIABLES" != "x"; then
53042    printf "WARNING: You have old-style ALT_ environment variables set.\n"
53043    printf "These are not respected, and will be ignored. It is recommended\n"
53044    printf "that you clean your environment. The following variables are set:\n"
53045    printf "$FOUND_ALT_VARIABLES\n"
53046    printf "\n"
53047  fi
53048
53049  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53050    printf "WARNING: Your build output directory is not on a local disk.\n"
53051    printf "This will severely degrade build performance!\n"
53052    printf "It is recommended that you create an output directory on a local disk,\n"
53053    printf "and run the configure script again from that directory.\n"
53054    printf "\n"
53055  fi
53056
53057  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53058    printf "WARNING: The result of this configuration has overridden an older\n"
53059    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53060    printf "proper build. Failure to do so might result in strange build problems.\n"
53061    printf "\n"
53062  fi
53063
53064  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53065    printf "WARNING: The result of this configuration was not saved.\n"
53066    printf "You should run without '--no-create | -n' to create the configuration.\n"
53067    printf "\n"
53068  fi
53069
53070
53071
53072if test -e "$OUTPUT_ROOT/config.log"; then
53073  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53074  if test $? -eq 0; then
53075    printf "The following warnings were produced. Repeated here for convenience:\n"
53076    # We must quote sed expression (using []) to stop m4 from eating the [].
53077    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53078    printf "\n"
53079  fi
53080fi
53081
53082
53083