generated-configure.sh revision 1397:5c624e587f07
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
4366# This line needs to be here, verbatim, after all includes and the dummy hook
4367# definitions. It is replaced with custom functionality when building
4368# custom sources.
4369#CUSTOM_AUTOCONF_INCLUDE
4370
4371# Do not change or remove the following line, it is needed for consistency checks:
4372DATE_WHEN_GENERATED=1426763441
4373
4374###############################################################################
4375#
4376# Initialization / Boot-strapping
4377#
4378# The bootstrapping process needs to solve the "chicken or the egg" problem,
4379# thus it jumps back and forth, each time gaining something needed later on.
4380#
4381###############################################################################
4382
4383# If we are requested to print additional help, do that and then exit.
4384# This must be the very first call.
4385
4386  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4387    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4388    $PRINTF "Which are valid to use depends on the build platform.\n"
4389    for toolchain in $VALID_TOOLCHAINS_all; do
4390      # Use indirect variable referencing
4391      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4392      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4393      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4394    done
4395
4396    # And now exit directly
4397    exit 0
4398  fi
4399
4400
4401# Basic initialization that must happen first of all in the normal process.
4402
4403  # Save the original command line. This is passed to us by the wrapper configure script.
4404
4405  # Save the path variable before it gets changed
4406  ORIGINAL_PATH="$PATH"
4407
4408  DATE_WHEN_CONFIGURED=`LANG=C date`
4409
4410  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4411$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4412  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4413$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4414
4415
4416  # Start with tools that do not need have cross compilation support
4417  # and can be expected to be found in the default PATH. These tools are
4418  # used by configure. Nor are these tools expected to be found in the
4419  # devkit from the builddeps server either, since they are
4420  # needed to download the devkit.
4421
4422  # First are all the simple required tools.
4423
4424
4425
4426  # Publish this variable in the help.
4427
4428
4429  if test "x$BASENAME" = x; then
4430    # The variable is not set by user, try to locate tool using the code snippet
4431    for ac_prog in basename
4432do
4433  # Extract the first word of "$ac_prog", so it can be a program name with args.
4434set dummy $ac_prog; ac_word=$2
4435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4436$as_echo_n "checking for $ac_word... " >&6; }
4437if ${ac_cv_path_BASENAME+:} false; then :
4438  $as_echo_n "(cached) " >&6
4439else
4440  case $BASENAME in
4441  [\\/]* | ?:[\\/]*)
4442  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4443  ;;
4444  *)
4445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4446for as_dir in $PATH
4447do
4448  IFS=$as_save_IFS
4449  test -z "$as_dir" && as_dir=.
4450    for ac_exec_ext in '' $ac_executable_extensions; do
4451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4452    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4454    break 2
4455  fi
4456done
4457  done
4458IFS=$as_save_IFS
4459
4460  ;;
4461esac
4462fi
4463BASENAME=$ac_cv_path_BASENAME
4464if test -n "$BASENAME"; then
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4466$as_echo "$BASENAME" >&6; }
4467else
4468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4469$as_echo "no" >&6; }
4470fi
4471
4472
4473  test -n "$BASENAME" && break
4474done
4475
4476  else
4477    # The variable is set, but is it from the command line or the environment?
4478
4479    # Try to remove the string !BASENAME! from our list.
4480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4482      # If it failed, the variable was not from the command line. Ignore it,
4483      # but warn the user (except for BASH, which is always set by the calling BASH).
4484      if test "xBASENAME" != xBASH; then
4485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4486$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4487      fi
4488      # Try to locate tool using the code snippet
4489      for ac_prog in basename
4490do
4491  # Extract the first word of "$ac_prog", so it can be a program name with args.
4492set dummy $ac_prog; ac_word=$2
4493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4494$as_echo_n "checking for $ac_word... " >&6; }
4495if ${ac_cv_path_BASENAME+:} false; then :
4496  $as_echo_n "(cached) " >&6
4497else
4498  case $BASENAME in
4499  [\\/]* | ?:[\\/]*)
4500  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4501  ;;
4502  *)
4503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4504for as_dir in $PATH
4505do
4506  IFS=$as_save_IFS
4507  test -z "$as_dir" && as_dir=.
4508    for ac_exec_ext in '' $ac_executable_extensions; do
4509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4510    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4512    break 2
4513  fi
4514done
4515  done
4516IFS=$as_save_IFS
4517
4518  ;;
4519esac
4520fi
4521BASENAME=$ac_cv_path_BASENAME
4522if test -n "$BASENAME"; then
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4524$as_echo "$BASENAME" >&6; }
4525else
4526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4527$as_echo "no" >&6; }
4528fi
4529
4530
4531  test -n "$BASENAME" && break
4532done
4533
4534    else
4535      # If it succeeded, then it was overridden by the user. We will use it
4536      # for the tool.
4537
4538      # First remove it from the list of overridden variables, so we can test
4539      # for unknown variables in the end.
4540      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4541
4542      # Check if the provided tool contains a complete path.
4543      tool_specified="$BASENAME"
4544      tool_basename="${tool_specified##*/}"
4545      if test "x$tool_basename" = "x$tool_specified"; then
4546        # A command without a complete path is provided, search $PATH.
4547        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4548$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4549        # Extract the first word of "$tool_basename", so it can be a program name with args.
4550set dummy $tool_basename; ac_word=$2
4551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4552$as_echo_n "checking for $ac_word... " >&6; }
4553if ${ac_cv_path_BASENAME+:} false; then :
4554  $as_echo_n "(cached) " >&6
4555else
4556  case $BASENAME in
4557  [\\/]* | ?:[\\/]*)
4558  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4559  ;;
4560  *)
4561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4562for as_dir in $PATH
4563do
4564  IFS=$as_save_IFS
4565  test -z "$as_dir" && as_dir=.
4566    for ac_exec_ext in '' $ac_executable_extensions; do
4567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4568    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4570    break 2
4571  fi
4572done
4573  done
4574IFS=$as_save_IFS
4575
4576  ;;
4577esac
4578fi
4579BASENAME=$ac_cv_path_BASENAME
4580if test -n "$BASENAME"; then
4581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4582$as_echo "$BASENAME" >&6; }
4583else
4584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4585$as_echo "no" >&6; }
4586fi
4587
4588
4589        if test "x$BASENAME" = x; then
4590          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4591        fi
4592      else
4593        # Otherwise we believe it is a complete path. Use it as it is.
4594        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4595$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4596        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4597$as_echo_n "checking for BASENAME... " >&6; }
4598        if test ! -x "$tool_specified"; then
4599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4600$as_echo "not found" >&6; }
4601          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4602        fi
4603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4604$as_echo "$tool_specified" >&6; }
4605      fi
4606    fi
4607  fi
4608
4609
4610
4611  if test "x$BASENAME" = x; then
4612    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4613  fi
4614
4615
4616
4617
4618
4619  # Publish this variable in the help.
4620
4621
4622  if test "x$BASH" = x; then
4623    # The variable is not set by user, try to locate tool using the code snippet
4624    for ac_prog in bash
4625do
4626  # Extract the first word of "$ac_prog", so it can be a program name with args.
4627set dummy $ac_prog; ac_word=$2
4628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4629$as_echo_n "checking for $ac_word... " >&6; }
4630if ${ac_cv_path_BASH+:} false; then :
4631  $as_echo_n "(cached) " >&6
4632else
4633  case $BASH in
4634  [\\/]* | ?:[\\/]*)
4635  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4636  ;;
4637  *)
4638  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4639for as_dir in $PATH
4640do
4641  IFS=$as_save_IFS
4642  test -z "$as_dir" && as_dir=.
4643    for ac_exec_ext in '' $ac_executable_extensions; do
4644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4645    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4647    break 2
4648  fi
4649done
4650  done
4651IFS=$as_save_IFS
4652
4653  ;;
4654esac
4655fi
4656BASH=$ac_cv_path_BASH
4657if test -n "$BASH"; then
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4659$as_echo "$BASH" >&6; }
4660else
4661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4662$as_echo "no" >&6; }
4663fi
4664
4665
4666  test -n "$BASH" && break
4667done
4668
4669  else
4670    # The variable is set, but is it from the command line or the environment?
4671
4672    # Try to remove the string !BASH! from our list.
4673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4675      # If it failed, the variable was not from the command line. Ignore it,
4676      # but warn the user (except for BASH, which is always set by the calling BASH).
4677      if test "xBASH" != xBASH; then
4678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4679$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4680      fi
4681      # Try to locate tool using the code snippet
4682      for ac_prog in bash
4683do
4684  # Extract the first word of "$ac_prog", so it can be a program name with args.
4685set dummy $ac_prog; ac_word=$2
4686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4687$as_echo_n "checking for $ac_word... " >&6; }
4688if ${ac_cv_path_BASH+:} false; then :
4689  $as_echo_n "(cached) " >&6
4690else
4691  case $BASH in
4692  [\\/]* | ?:[\\/]*)
4693  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4694  ;;
4695  *)
4696  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4697for as_dir in $PATH
4698do
4699  IFS=$as_save_IFS
4700  test -z "$as_dir" && as_dir=.
4701    for ac_exec_ext in '' $ac_executable_extensions; do
4702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4703    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4705    break 2
4706  fi
4707done
4708  done
4709IFS=$as_save_IFS
4710
4711  ;;
4712esac
4713fi
4714BASH=$ac_cv_path_BASH
4715if test -n "$BASH"; then
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4717$as_echo "$BASH" >&6; }
4718else
4719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4720$as_echo "no" >&6; }
4721fi
4722
4723
4724  test -n "$BASH" && break
4725done
4726
4727    else
4728      # If it succeeded, then it was overridden by the user. We will use it
4729      # for the tool.
4730
4731      # First remove it from the list of overridden variables, so we can test
4732      # for unknown variables in the end.
4733      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4734
4735      # Check if the provided tool contains a complete path.
4736      tool_specified="$BASH"
4737      tool_basename="${tool_specified##*/}"
4738      if test "x$tool_basename" = "x$tool_specified"; then
4739        # A command without a complete path is provided, search $PATH.
4740        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4741$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4742        # Extract the first word of "$tool_basename", so it can be a program name with args.
4743set dummy $tool_basename; ac_word=$2
4744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4745$as_echo_n "checking for $ac_word... " >&6; }
4746if ${ac_cv_path_BASH+:} false; then :
4747  $as_echo_n "(cached) " >&6
4748else
4749  case $BASH in
4750  [\\/]* | ?:[\\/]*)
4751  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4752  ;;
4753  *)
4754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4755for as_dir in $PATH
4756do
4757  IFS=$as_save_IFS
4758  test -z "$as_dir" && as_dir=.
4759    for ac_exec_ext in '' $ac_executable_extensions; do
4760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4761    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4763    break 2
4764  fi
4765done
4766  done
4767IFS=$as_save_IFS
4768
4769  ;;
4770esac
4771fi
4772BASH=$ac_cv_path_BASH
4773if test -n "$BASH"; then
4774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4775$as_echo "$BASH" >&6; }
4776else
4777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4778$as_echo "no" >&6; }
4779fi
4780
4781
4782        if test "x$BASH" = x; then
4783          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4784        fi
4785      else
4786        # Otherwise we believe it is a complete path. Use it as it is.
4787        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4788$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4789        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4790$as_echo_n "checking for BASH... " >&6; }
4791        if test ! -x "$tool_specified"; then
4792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4793$as_echo "not found" >&6; }
4794          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4795        fi
4796        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4797$as_echo "$tool_specified" >&6; }
4798      fi
4799    fi
4800  fi
4801
4802
4803
4804  if test "x$BASH" = x; then
4805    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4806  fi
4807
4808
4809
4810
4811
4812  # Publish this variable in the help.
4813
4814
4815  if test "x$CAT" = x; then
4816    # The variable is not set by user, try to locate tool using the code snippet
4817    for ac_prog in cat
4818do
4819  # Extract the first word of "$ac_prog", so it can be a program name with args.
4820set dummy $ac_prog; ac_word=$2
4821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4822$as_echo_n "checking for $ac_word... " >&6; }
4823if ${ac_cv_path_CAT+:} false; then :
4824  $as_echo_n "(cached) " >&6
4825else
4826  case $CAT in
4827  [\\/]* | ?:[\\/]*)
4828  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4829  ;;
4830  *)
4831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4832for as_dir in $PATH
4833do
4834  IFS=$as_save_IFS
4835  test -z "$as_dir" && as_dir=.
4836    for ac_exec_ext in '' $ac_executable_extensions; do
4837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4838    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4840    break 2
4841  fi
4842done
4843  done
4844IFS=$as_save_IFS
4845
4846  ;;
4847esac
4848fi
4849CAT=$ac_cv_path_CAT
4850if test -n "$CAT"; then
4851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4852$as_echo "$CAT" >&6; }
4853else
4854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4855$as_echo "no" >&6; }
4856fi
4857
4858
4859  test -n "$CAT" && break
4860done
4861
4862  else
4863    # The variable is set, but is it from the command line or the environment?
4864
4865    # Try to remove the string !CAT! from our list.
4866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4868      # If it failed, the variable was not from the command line. Ignore it,
4869      # but warn the user (except for BASH, which is always set by the calling BASH).
4870      if test "xCAT" != xBASH; then
4871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4872$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4873      fi
4874      # Try to locate tool using the code snippet
4875      for ac_prog in cat
4876do
4877  # Extract the first word of "$ac_prog", so it can be a program name with args.
4878set dummy $ac_prog; ac_word=$2
4879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4880$as_echo_n "checking for $ac_word... " >&6; }
4881if ${ac_cv_path_CAT+:} false; then :
4882  $as_echo_n "(cached) " >&6
4883else
4884  case $CAT in
4885  [\\/]* | ?:[\\/]*)
4886  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4887  ;;
4888  *)
4889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890for as_dir in $PATH
4891do
4892  IFS=$as_save_IFS
4893  test -z "$as_dir" && as_dir=.
4894    for ac_exec_ext in '' $ac_executable_extensions; do
4895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4896    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898    break 2
4899  fi
4900done
4901  done
4902IFS=$as_save_IFS
4903
4904  ;;
4905esac
4906fi
4907CAT=$ac_cv_path_CAT
4908if test -n "$CAT"; then
4909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4910$as_echo "$CAT" >&6; }
4911else
4912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913$as_echo "no" >&6; }
4914fi
4915
4916
4917  test -n "$CAT" && break
4918done
4919
4920    else
4921      # If it succeeded, then it was overridden by the user. We will use it
4922      # for the tool.
4923
4924      # First remove it from the list of overridden variables, so we can test
4925      # for unknown variables in the end.
4926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4927
4928      # Check if the provided tool contains a complete path.
4929      tool_specified="$CAT"
4930      tool_basename="${tool_specified##*/}"
4931      if test "x$tool_basename" = "x$tool_specified"; then
4932        # A command without a complete path is provided, search $PATH.
4933        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4934$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4935        # Extract the first word of "$tool_basename", so it can be a program name with args.
4936set dummy $tool_basename; ac_word=$2
4937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4938$as_echo_n "checking for $ac_word... " >&6; }
4939if ${ac_cv_path_CAT+:} false; then :
4940  $as_echo_n "(cached) " >&6
4941else
4942  case $CAT in
4943  [\\/]* | ?:[\\/]*)
4944  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4945  ;;
4946  *)
4947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4948for as_dir in $PATH
4949do
4950  IFS=$as_save_IFS
4951  test -z "$as_dir" && as_dir=.
4952    for ac_exec_ext in '' $ac_executable_extensions; do
4953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4954    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4956    break 2
4957  fi
4958done
4959  done
4960IFS=$as_save_IFS
4961
4962  ;;
4963esac
4964fi
4965CAT=$ac_cv_path_CAT
4966if test -n "$CAT"; then
4967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4968$as_echo "$CAT" >&6; }
4969else
4970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4971$as_echo "no" >&6; }
4972fi
4973
4974
4975        if test "x$CAT" = x; then
4976          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4977        fi
4978      else
4979        # Otherwise we believe it is a complete path. Use it as it is.
4980        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4981$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4982        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4983$as_echo_n "checking for CAT... " >&6; }
4984        if test ! -x "$tool_specified"; then
4985          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4986$as_echo "not found" >&6; }
4987          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4988        fi
4989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4990$as_echo "$tool_specified" >&6; }
4991      fi
4992    fi
4993  fi
4994
4995
4996
4997  if test "x$CAT" = x; then
4998    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4999  fi
5000
5001
5002
5003
5004
5005  # Publish this variable in the help.
5006
5007
5008  if test "x$CHMOD" = x; then
5009    # The variable is not set by user, try to locate tool using the code snippet
5010    for ac_prog in chmod
5011do
5012  # Extract the first word of "$ac_prog", so it can be a program name with args.
5013set dummy $ac_prog; ac_word=$2
5014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5015$as_echo_n "checking for $ac_word... " >&6; }
5016if ${ac_cv_path_CHMOD+:} false; then :
5017  $as_echo_n "(cached) " >&6
5018else
5019  case $CHMOD in
5020  [\\/]* | ?:[\\/]*)
5021  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5022  ;;
5023  *)
5024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5025for as_dir in $PATH
5026do
5027  IFS=$as_save_IFS
5028  test -z "$as_dir" && as_dir=.
5029    for ac_exec_ext in '' $ac_executable_extensions; do
5030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5031    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5033    break 2
5034  fi
5035done
5036  done
5037IFS=$as_save_IFS
5038
5039  ;;
5040esac
5041fi
5042CHMOD=$ac_cv_path_CHMOD
5043if test -n "$CHMOD"; then
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5045$as_echo "$CHMOD" >&6; }
5046else
5047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5048$as_echo "no" >&6; }
5049fi
5050
5051
5052  test -n "$CHMOD" && break
5053done
5054
5055  else
5056    # The variable is set, but is it from the command line or the environment?
5057
5058    # Try to remove the string !CHMOD! from our list.
5059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5061      # If it failed, the variable was not from the command line. Ignore it,
5062      # but warn the user (except for BASH, which is always set by the calling BASH).
5063      if test "xCHMOD" != xBASH; then
5064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5065$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5066      fi
5067      # Try to locate tool using the code snippet
5068      for ac_prog in chmod
5069do
5070  # Extract the first word of "$ac_prog", so it can be a program name with args.
5071set dummy $ac_prog; ac_word=$2
5072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5073$as_echo_n "checking for $ac_word... " >&6; }
5074if ${ac_cv_path_CHMOD+:} false; then :
5075  $as_echo_n "(cached) " >&6
5076else
5077  case $CHMOD in
5078  [\\/]* | ?:[\\/]*)
5079  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5080  ;;
5081  *)
5082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5083for as_dir in $PATH
5084do
5085  IFS=$as_save_IFS
5086  test -z "$as_dir" && as_dir=.
5087    for ac_exec_ext in '' $ac_executable_extensions; do
5088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5089    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5091    break 2
5092  fi
5093done
5094  done
5095IFS=$as_save_IFS
5096
5097  ;;
5098esac
5099fi
5100CHMOD=$ac_cv_path_CHMOD
5101if test -n "$CHMOD"; then
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5103$as_echo "$CHMOD" >&6; }
5104else
5105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5106$as_echo "no" >&6; }
5107fi
5108
5109
5110  test -n "$CHMOD" && break
5111done
5112
5113    else
5114      # If it succeeded, then it was overridden by the user. We will use it
5115      # for the tool.
5116
5117      # First remove it from the list of overridden variables, so we can test
5118      # for unknown variables in the end.
5119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5120
5121      # Check if the provided tool contains a complete path.
5122      tool_specified="$CHMOD"
5123      tool_basename="${tool_specified##*/}"
5124      if test "x$tool_basename" = "x$tool_specified"; then
5125        # A command without a complete path is provided, search $PATH.
5126        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5127$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5128        # Extract the first word of "$tool_basename", so it can be a program name with args.
5129set dummy $tool_basename; ac_word=$2
5130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5131$as_echo_n "checking for $ac_word... " >&6; }
5132if ${ac_cv_path_CHMOD+:} false; then :
5133  $as_echo_n "(cached) " >&6
5134else
5135  case $CHMOD in
5136  [\\/]* | ?:[\\/]*)
5137  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5138  ;;
5139  *)
5140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5141for as_dir in $PATH
5142do
5143  IFS=$as_save_IFS
5144  test -z "$as_dir" && as_dir=.
5145    for ac_exec_ext in '' $ac_executable_extensions; do
5146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5147    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5149    break 2
5150  fi
5151done
5152  done
5153IFS=$as_save_IFS
5154
5155  ;;
5156esac
5157fi
5158CHMOD=$ac_cv_path_CHMOD
5159if test -n "$CHMOD"; then
5160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5161$as_echo "$CHMOD" >&6; }
5162else
5163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5164$as_echo "no" >&6; }
5165fi
5166
5167
5168        if test "x$CHMOD" = x; then
5169          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5170        fi
5171      else
5172        # Otherwise we believe it is a complete path. Use it as it is.
5173        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5174$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5176$as_echo_n "checking for CHMOD... " >&6; }
5177        if test ! -x "$tool_specified"; then
5178          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5179$as_echo "not found" >&6; }
5180          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5181        fi
5182        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5183$as_echo "$tool_specified" >&6; }
5184      fi
5185    fi
5186  fi
5187
5188
5189
5190  if test "x$CHMOD" = x; then
5191    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5192  fi
5193
5194
5195
5196
5197
5198  # Publish this variable in the help.
5199
5200
5201  if test "x$CMP" = x; then
5202    # The variable is not set by user, try to locate tool using the code snippet
5203    for ac_prog in cmp
5204do
5205  # Extract the first word of "$ac_prog", so it can be a program name with args.
5206set dummy $ac_prog; ac_word=$2
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208$as_echo_n "checking for $ac_word... " >&6; }
5209if ${ac_cv_path_CMP+:} false; then :
5210  $as_echo_n "(cached) " >&6
5211else
5212  case $CMP in
5213  [\\/]* | ?:[\\/]*)
5214  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5215  ;;
5216  *)
5217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in $PATH
5219do
5220  IFS=$as_save_IFS
5221  test -z "$as_dir" && as_dir=.
5222    for ac_exec_ext in '' $ac_executable_extensions; do
5223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5224    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226    break 2
5227  fi
5228done
5229  done
5230IFS=$as_save_IFS
5231
5232  ;;
5233esac
5234fi
5235CMP=$ac_cv_path_CMP
5236if test -n "$CMP"; then
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5238$as_echo "$CMP" >&6; }
5239else
5240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
5242fi
5243
5244
5245  test -n "$CMP" && break
5246done
5247
5248  else
5249    # The variable is set, but is it from the command line or the environment?
5250
5251    # Try to remove the string !CMP! from our list.
5252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5254      # If it failed, the variable was not from the command line. Ignore it,
5255      # but warn the user (except for BASH, which is always set by the calling BASH).
5256      if test "xCMP" != xBASH; then
5257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5258$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5259      fi
5260      # Try to locate tool using the code snippet
5261      for ac_prog in cmp
5262do
5263  # Extract the first word of "$ac_prog", so it can be a program name with args.
5264set dummy $ac_prog; ac_word=$2
5265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5266$as_echo_n "checking for $ac_word... " >&6; }
5267if ${ac_cv_path_CMP+:} false; then :
5268  $as_echo_n "(cached) " >&6
5269else
5270  case $CMP in
5271  [\\/]* | ?:[\\/]*)
5272  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5273  ;;
5274  *)
5275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5276for as_dir in $PATH
5277do
5278  IFS=$as_save_IFS
5279  test -z "$as_dir" && as_dir=.
5280    for ac_exec_ext in '' $ac_executable_extensions; do
5281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5282    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5284    break 2
5285  fi
5286done
5287  done
5288IFS=$as_save_IFS
5289
5290  ;;
5291esac
5292fi
5293CMP=$ac_cv_path_CMP
5294if test -n "$CMP"; then
5295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5296$as_echo "$CMP" >&6; }
5297else
5298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5299$as_echo "no" >&6; }
5300fi
5301
5302
5303  test -n "$CMP" && break
5304done
5305
5306    else
5307      # If it succeeded, then it was overridden by the user. We will use it
5308      # for the tool.
5309
5310      # First remove it from the list of overridden variables, so we can test
5311      # for unknown variables in the end.
5312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5313
5314      # Check if the provided tool contains a complete path.
5315      tool_specified="$CMP"
5316      tool_basename="${tool_specified##*/}"
5317      if test "x$tool_basename" = "x$tool_specified"; then
5318        # A command without a complete path is provided, search $PATH.
5319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5320$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5321        # Extract the first word of "$tool_basename", so it can be a program name with args.
5322set dummy $tool_basename; ac_word=$2
5323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5324$as_echo_n "checking for $ac_word... " >&6; }
5325if ${ac_cv_path_CMP+:} false; then :
5326  $as_echo_n "(cached) " >&6
5327else
5328  case $CMP in
5329  [\\/]* | ?:[\\/]*)
5330  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5331  ;;
5332  *)
5333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5334for as_dir in $PATH
5335do
5336  IFS=$as_save_IFS
5337  test -z "$as_dir" && as_dir=.
5338    for ac_exec_ext in '' $ac_executable_extensions; do
5339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5340    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5342    break 2
5343  fi
5344done
5345  done
5346IFS=$as_save_IFS
5347
5348  ;;
5349esac
5350fi
5351CMP=$ac_cv_path_CMP
5352if test -n "$CMP"; then
5353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5354$as_echo "$CMP" >&6; }
5355else
5356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5357$as_echo "no" >&6; }
5358fi
5359
5360
5361        if test "x$CMP" = x; then
5362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5363        fi
5364      else
5365        # Otherwise we believe it is a complete path. Use it as it is.
5366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5367$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5369$as_echo_n "checking for CMP... " >&6; }
5370        if test ! -x "$tool_specified"; then
5371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5372$as_echo "not found" >&6; }
5373          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5374        fi
5375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5376$as_echo "$tool_specified" >&6; }
5377      fi
5378    fi
5379  fi
5380
5381
5382
5383  if test "x$CMP" = x; then
5384    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5385  fi
5386
5387
5388
5389
5390
5391  # Publish this variable in the help.
5392
5393
5394  if test "x$COMM" = x; then
5395    # The variable is not set by user, try to locate tool using the code snippet
5396    for ac_prog in comm
5397do
5398  # Extract the first word of "$ac_prog", so it can be a program name with args.
5399set dummy $ac_prog; ac_word=$2
5400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5401$as_echo_n "checking for $ac_word... " >&6; }
5402if ${ac_cv_path_COMM+:} false; then :
5403  $as_echo_n "(cached) " >&6
5404else
5405  case $COMM in
5406  [\\/]* | ?:[\\/]*)
5407  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5408  ;;
5409  *)
5410  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5411for as_dir in $PATH
5412do
5413  IFS=$as_save_IFS
5414  test -z "$as_dir" && as_dir=.
5415    for ac_exec_ext in '' $ac_executable_extensions; do
5416  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5417    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5418    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5419    break 2
5420  fi
5421done
5422  done
5423IFS=$as_save_IFS
5424
5425  ;;
5426esac
5427fi
5428COMM=$ac_cv_path_COMM
5429if test -n "$COMM"; then
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5431$as_echo "$COMM" >&6; }
5432else
5433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5434$as_echo "no" >&6; }
5435fi
5436
5437
5438  test -n "$COMM" && break
5439done
5440
5441  else
5442    # The variable is set, but is it from the command line or the environment?
5443
5444    # Try to remove the string !COMM! from our list.
5445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5447      # If it failed, the variable was not from the command line. Ignore it,
5448      # but warn the user (except for BASH, which is always set by the calling BASH).
5449      if test "xCOMM" != xBASH; then
5450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5451$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5452      fi
5453      # Try to locate tool using the code snippet
5454      for ac_prog in comm
5455do
5456  # Extract the first word of "$ac_prog", so it can be a program name with args.
5457set dummy $ac_prog; ac_word=$2
5458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5459$as_echo_n "checking for $ac_word... " >&6; }
5460if ${ac_cv_path_COMM+:} false; then :
5461  $as_echo_n "(cached) " >&6
5462else
5463  case $COMM in
5464  [\\/]* | ?:[\\/]*)
5465  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5466  ;;
5467  *)
5468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5469for as_dir in $PATH
5470do
5471  IFS=$as_save_IFS
5472  test -z "$as_dir" && as_dir=.
5473    for ac_exec_ext in '' $ac_executable_extensions; do
5474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5475    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5477    break 2
5478  fi
5479done
5480  done
5481IFS=$as_save_IFS
5482
5483  ;;
5484esac
5485fi
5486COMM=$ac_cv_path_COMM
5487if test -n "$COMM"; then
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5489$as_echo "$COMM" >&6; }
5490else
5491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5492$as_echo "no" >&6; }
5493fi
5494
5495
5496  test -n "$COMM" && break
5497done
5498
5499    else
5500      # If it succeeded, then it was overridden by the user. We will use it
5501      # for the tool.
5502
5503      # First remove it from the list of overridden variables, so we can test
5504      # for unknown variables in the end.
5505      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5506
5507      # Check if the provided tool contains a complete path.
5508      tool_specified="$COMM"
5509      tool_basename="${tool_specified##*/}"
5510      if test "x$tool_basename" = "x$tool_specified"; then
5511        # A command without a complete path is provided, search $PATH.
5512        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5513$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5514        # Extract the first word of "$tool_basename", so it can be a program name with args.
5515set dummy $tool_basename; ac_word=$2
5516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5517$as_echo_n "checking for $ac_word... " >&6; }
5518if ${ac_cv_path_COMM+:} false; then :
5519  $as_echo_n "(cached) " >&6
5520else
5521  case $COMM in
5522  [\\/]* | ?:[\\/]*)
5523  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5524  ;;
5525  *)
5526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5527for as_dir in $PATH
5528do
5529  IFS=$as_save_IFS
5530  test -z "$as_dir" && as_dir=.
5531    for ac_exec_ext in '' $ac_executable_extensions; do
5532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5533    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5535    break 2
5536  fi
5537done
5538  done
5539IFS=$as_save_IFS
5540
5541  ;;
5542esac
5543fi
5544COMM=$ac_cv_path_COMM
5545if test -n "$COMM"; then
5546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5547$as_echo "$COMM" >&6; }
5548else
5549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5550$as_echo "no" >&6; }
5551fi
5552
5553
5554        if test "x$COMM" = x; then
5555          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5556        fi
5557      else
5558        # Otherwise we believe it is a complete path. Use it as it is.
5559        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5560$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5561        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5562$as_echo_n "checking for COMM... " >&6; }
5563        if test ! -x "$tool_specified"; then
5564          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5565$as_echo "not found" >&6; }
5566          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5567        fi
5568        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5569$as_echo "$tool_specified" >&6; }
5570      fi
5571    fi
5572  fi
5573
5574
5575
5576  if test "x$COMM" = x; then
5577    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5578  fi
5579
5580
5581
5582
5583
5584  # Publish this variable in the help.
5585
5586
5587  if test "x$CP" = x; then
5588    # The variable is not set by user, try to locate tool using the code snippet
5589    for ac_prog in cp
5590do
5591  # Extract the first word of "$ac_prog", so it can be a program name with args.
5592set dummy $ac_prog; ac_word=$2
5593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5594$as_echo_n "checking for $ac_word... " >&6; }
5595if ${ac_cv_path_CP+:} false; then :
5596  $as_echo_n "(cached) " >&6
5597else
5598  case $CP in
5599  [\\/]* | ?:[\\/]*)
5600  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5601  ;;
5602  *)
5603  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5604for as_dir in $PATH
5605do
5606  IFS=$as_save_IFS
5607  test -z "$as_dir" && as_dir=.
5608    for ac_exec_ext in '' $ac_executable_extensions; do
5609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5610    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5612    break 2
5613  fi
5614done
5615  done
5616IFS=$as_save_IFS
5617
5618  ;;
5619esac
5620fi
5621CP=$ac_cv_path_CP
5622if test -n "$CP"; then
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5624$as_echo "$CP" >&6; }
5625else
5626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5627$as_echo "no" >&6; }
5628fi
5629
5630
5631  test -n "$CP" && break
5632done
5633
5634  else
5635    # The variable is set, but is it from the command line or the environment?
5636
5637    # Try to remove the string !CP! from our list.
5638    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5639    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5640      # If it failed, the variable was not from the command line. Ignore it,
5641      # but warn the user (except for BASH, which is always set by the calling BASH).
5642      if test "xCP" != xBASH; then
5643        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5644$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5645      fi
5646      # Try to locate tool using the code snippet
5647      for ac_prog in cp
5648do
5649  # Extract the first word of "$ac_prog", so it can be a program name with args.
5650set dummy $ac_prog; ac_word=$2
5651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5652$as_echo_n "checking for $ac_word... " >&6; }
5653if ${ac_cv_path_CP+:} false; then :
5654  $as_echo_n "(cached) " >&6
5655else
5656  case $CP in
5657  [\\/]* | ?:[\\/]*)
5658  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5659  ;;
5660  *)
5661  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5662for as_dir in $PATH
5663do
5664  IFS=$as_save_IFS
5665  test -z "$as_dir" && as_dir=.
5666    for ac_exec_ext in '' $ac_executable_extensions; do
5667  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5668    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5669    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5670    break 2
5671  fi
5672done
5673  done
5674IFS=$as_save_IFS
5675
5676  ;;
5677esac
5678fi
5679CP=$ac_cv_path_CP
5680if test -n "$CP"; then
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5682$as_echo "$CP" >&6; }
5683else
5684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5685$as_echo "no" >&6; }
5686fi
5687
5688
5689  test -n "$CP" && break
5690done
5691
5692    else
5693      # If it succeeded, then it was overridden by the user. We will use it
5694      # for the tool.
5695
5696      # First remove it from the list of overridden variables, so we can test
5697      # for unknown variables in the end.
5698      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5699
5700      # Check if the provided tool contains a complete path.
5701      tool_specified="$CP"
5702      tool_basename="${tool_specified##*/}"
5703      if test "x$tool_basename" = "x$tool_specified"; then
5704        # A command without a complete path is provided, search $PATH.
5705        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5706$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5707        # Extract the first word of "$tool_basename", so it can be a program name with args.
5708set dummy $tool_basename; ac_word=$2
5709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5710$as_echo_n "checking for $ac_word... " >&6; }
5711if ${ac_cv_path_CP+:} false; then :
5712  $as_echo_n "(cached) " >&6
5713else
5714  case $CP in
5715  [\\/]* | ?:[\\/]*)
5716  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5717  ;;
5718  *)
5719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5720for as_dir in $PATH
5721do
5722  IFS=$as_save_IFS
5723  test -z "$as_dir" && as_dir=.
5724    for ac_exec_ext in '' $ac_executable_extensions; do
5725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5726    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5728    break 2
5729  fi
5730done
5731  done
5732IFS=$as_save_IFS
5733
5734  ;;
5735esac
5736fi
5737CP=$ac_cv_path_CP
5738if test -n "$CP"; then
5739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5740$as_echo "$CP" >&6; }
5741else
5742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5743$as_echo "no" >&6; }
5744fi
5745
5746
5747        if test "x$CP" = x; then
5748          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5749        fi
5750      else
5751        # Otherwise we believe it is a complete path. Use it as it is.
5752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5753$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5755$as_echo_n "checking for CP... " >&6; }
5756        if test ! -x "$tool_specified"; then
5757          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5758$as_echo "not found" >&6; }
5759          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5760        fi
5761        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5762$as_echo "$tool_specified" >&6; }
5763      fi
5764    fi
5765  fi
5766
5767
5768
5769  if test "x$CP" = x; then
5770    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5771  fi
5772
5773
5774
5775
5776
5777  # Publish this variable in the help.
5778
5779
5780  if test "x$CUT" = x; then
5781    # The variable is not set by user, try to locate tool using the code snippet
5782    for ac_prog in cut
5783do
5784  # Extract the first word of "$ac_prog", so it can be a program name with args.
5785set dummy $ac_prog; ac_word=$2
5786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5787$as_echo_n "checking for $ac_word... " >&6; }
5788if ${ac_cv_path_CUT+:} false; then :
5789  $as_echo_n "(cached) " >&6
5790else
5791  case $CUT in
5792  [\\/]* | ?:[\\/]*)
5793  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5794  ;;
5795  *)
5796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5797for as_dir in $PATH
5798do
5799  IFS=$as_save_IFS
5800  test -z "$as_dir" && as_dir=.
5801    for ac_exec_ext in '' $ac_executable_extensions; do
5802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5803    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5805    break 2
5806  fi
5807done
5808  done
5809IFS=$as_save_IFS
5810
5811  ;;
5812esac
5813fi
5814CUT=$ac_cv_path_CUT
5815if test -n "$CUT"; then
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5817$as_echo "$CUT" >&6; }
5818else
5819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5820$as_echo "no" >&6; }
5821fi
5822
5823
5824  test -n "$CUT" && break
5825done
5826
5827  else
5828    # The variable is set, but is it from the command line or the environment?
5829
5830    # Try to remove the string !CUT! from our list.
5831    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5832    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5833      # If it failed, the variable was not from the command line. Ignore it,
5834      # but warn the user (except for BASH, which is always set by the calling BASH).
5835      if test "xCUT" != xBASH; then
5836        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5837$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5838      fi
5839      # Try to locate tool using the code snippet
5840      for ac_prog in cut
5841do
5842  # Extract the first word of "$ac_prog", so it can be a program name with args.
5843set dummy $ac_prog; ac_word=$2
5844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5845$as_echo_n "checking for $ac_word... " >&6; }
5846if ${ac_cv_path_CUT+:} false; then :
5847  $as_echo_n "(cached) " >&6
5848else
5849  case $CUT in
5850  [\\/]* | ?:[\\/]*)
5851  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5852  ;;
5853  *)
5854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5855for as_dir in $PATH
5856do
5857  IFS=$as_save_IFS
5858  test -z "$as_dir" && as_dir=.
5859    for ac_exec_ext in '' $ac_executable_extensions; do
5860  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5861    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5862    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5863    break 2
5864  fi
5865done
5866  done
5867IFS=$as_save_IFS
5868
5869  ;;
5870esac
5871fi
5872CUT=$ac_cv_path_CUT
5873if test -n "$CUT"; then
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5875$as_echo "$CUT" >&6; }
5876else
5877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5878$as_echo "no" >&6; }
5879fi
5880
5881
5882  test -n "$CUT" && break
5883done
5884
5885    else
5886      # If it succeeded, then it was overridden by the user. We will use it
5887      # for the tool.
5888
5889      # First remove it from the list of overridden variables, so we can test
5890      # for unknown variables in the end.
5891      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5892
5893      # Check if the provided tool contains a complete path.
5894      tool_specified="$CUT"
5895      tool_basename="${tool_specified##*/}"
5896      if test "x$tool_basename" = "x$tool_specified"; then
5897        # A command without a complete path is provided, search $PATH.
5898        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5899$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5900        # Extract the first word of "$tool_basename", so it can be a program name with args.
5901set dummy $tool_basename; ac_word=$2
5902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5903$as_echo_n "checking for $ac_word... " >&6; }
5904if ${ac_cv_path_CUT+:} false; then :
5905  $as_echo_n "(cached) " >&6
5906else
5907  case $CUT in
5908  [\\/]* | ?:[\\/]*)
5909  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5910  ;;
5911  *)
5912  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5913for as_dir in $PATH
5914do
5915  IFS=$as_save_IFS
5916  test -z "$as_dir" && as_dir=.
5917    for ac_exec_ext in '' $ac_executable_extensions; do
5918  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5919    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5920    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5921    break 2
5922  fi
5923done
5924  done
5925IFS=$as_save_IFS
5926
5927  ;;
5928esac
5929fi
5930CUT=$ac_cv_path_CUT
5931if test -n "$CUT"; then
5932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5933$as_echo "$CUT" >&6; }
5934else
5935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5936$as_echo "no" >&6; }
5937fi
5938
5939
5940        if test "x$CUT" = x; then
5941          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5942        fi
5943      else
5944        # Otherwise we believe it is a complete path. Use it as it is.
5945        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5946$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5947        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5948$as_echo_n "checking for CUT... " >&6; }
5949        if test ! -x "$tool_specified"; then
5950          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5951$as_echo "not found" >&6; }
5952          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5953        fi
5954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5955$as_echo "$tool_specified" >&6; }
5956      fi
5957    fi
5958  fi
5959
5960
5961
5962  if test "x$CUT" = x; then
5963    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
5964  fi
5965
5966
5967
5968
5969
5970  # Publish this variable in the help.
5971
5972
5973  if test "x$DATE" = x; then
5974    # The variable is not set by user, try to locate tool using the code snippet
5975    for ac_prog in date
5976do
5977  # Extract the first word of "$ac_prog", so it can be a program name with args.
5978set dummy $ac_prog; ac_word=$2
5979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5980$as_echo_n "checking for $ac_word... " >&6; }
5981if ${ac_cv_path_DATE+:} false; then :
5982  $as_echo_n "(cached) " >&6
5983else
5984  case $DATE in
5985  [\\/]* | ?:[\\/]*)
5986  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
5987  ;;
5988  *)
5989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5990for as_dir in $PATH
5991do
5992  IFS=$as_save_IFS
5993  test -z "$as_dir" && as_dir=.
5994    for ac_exec_ext in '' $ac_executable_extensions; do
5995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5996    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
5997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5998    break 2
5999  fi
6000done
6001  done
6002IFS=$as_save_IFS
6003
6004  ;;
6005esac
6006fi
6007DATE=$ac_cv_path_DATE
6008if test -n "$DATE"; then
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6010$as_echo "$DATE" >&6; }
6011else
6012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6013$as_echo "no" >&6; }
6014fi
6015
6016
6017  test -n "$DATE" && break
6018done
6019
6020  else
6021    # The variable is set, but is it from the command line or the environment?
6022
6023    # Try to remove the string !DATE! from our list.
6024    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6025    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6026      # If it failed, the variable was not from the command line. Ignore it,
6027      # but warn the user (except for BASH, which is always set by the calling BASH).
6028      if test "xDATE" != xBASH; then
6029        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6030$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6031      fi
6032      # Try to locate tool using the code snippet
6033      for ac_prog in date
6034do
6035  # Extract the first word of "$ac_prog", so it can be a program name with args.
6036set dummy $ac_prog; ac_word=$2
6037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6038$as_echo_n "checking for $ac_word... " >&6; }
6039if ${ac_cv_path_DATE+:} false; then :
6040  $as_echo_n "(cached) " >&6
6041else
6042  case $DATE in
6043  [\\/]* | ?:[\\/]*)
6044  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6045  ;;
6046  *)
6047  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6048for as_dir in $PATH
6049do
6050  IFS=$as_save_IFS
6051  test -z "$as_dir" && as_dir=.
6052    for ac_exec_ext in '' $ac_executable_extensions; do
6053  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6054    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6055    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6056    break 2
6057  fi
6058done
6059  done
6060IFS=$as_save_IFS
6061
6062  ;;
6063esac
6064fi
6065DATE=$ac_cv_path_DATE
6066if test -n "$DATE"; then
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6068$as_echo "$DATE" >&6; }
6069else
6070  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6071$as_echo "no" >&6; }
6072fi
6073
6074
6075  test -n "$DATE" && break
6076done
6077
6078    else
6079      # If it succeeded, then it was overridden by the user. We will use it
6080      # for the tool.
6081
6082      # First remove it from the list of overridden variables, so we can test
6083      # for unknown variables in the end.
6084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6085
6086      # Check if the provided tool contains a complete path.
6087      tool_specified="$DATE"
6088      tool_basename="${tool_specified##*/}"
6089      if test "x$tool_basename" = "x$tool_specified"; then
6090        # A command without a complete path is provided, search $PATH.
6091        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6092$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6093        # Extract the first word of "$tool_basename", so it can be a program name with args.
6094set dummy $tool_basename; ac_word=$2
6095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6096$as_echo_n "checking for $ac_word... " >&6; }
6097if ${ac_cv_path_DATE+:} false; then :
6098  $as_echo_n "(cached) " >&6
6099else
6100  case $DATE in
6101  [\\/]* | ?:[\\/]*)
6102  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6103  ;;
6104  *)
6105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6106for as_dir in $PATH
6107do
6108  IFS=$as_save_IFS
6109  test -z "$as_dir" && as_dir=.
6110    for ac_exec_ext in '' $ac_executable_extensions; do
6111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6112    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6114    break 2
6115  fi
6116done
6117  done
6118IFS=$as_save_IFS
6119
6120  ;;
6121esac
6122fi
6123DATE=$ac_cv_path_DATE
6124if test -n "$DATE"; then
6125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6126$as_echo "$DATE" >&6; }
6127else
6128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129$as_echo "no" >&6; }
6130fi
6131
6132
6133        if test "x$DATE" = x; then
6134          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6135        fi
6136      else
6137        # Otherwise we believe it is a complete path. Use it as it is.
6138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6139$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6141$as_echo_n "checking for DATE... " >&6; }
6142        if test ! -x "$tool_specified"; then
6143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6144$as_echo "not found" >&6; }
6145          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6146        fi
6147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6148$as_echo "$tool_specified" >&6; }
6149      fi
6150    fi
6151  fi
6152
6153
6154
6155  if test "x$DATE" = x; then
6156    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6157  fi
6158
6159
6160
6161
6162
6163  # Publish this variable in the help.
6164
6165
6166  if test "x$DIFF" = x; then
6167    # The variable is not set by user, try to locate tool using the code snippet
6168    for ac_prog in gdiff diff
6169do
6170  # Extract the first word of "$ac_prog", so it can be a program name with args.
6171set dummy $ac_prog; ac_word=$2
6172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6173$as_echo_n "checking for $ac_word... " >&6; }
6174if ${ac_cv_path_DIFF+:} false; then :
6175  $as_echo_n "(cached) " >&6
6176else
6177  case $DIFF in
6178  [\\/]* | ?:[\\/]*)
6179  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6180  ;;
6181  *)
6182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6183for as_dir in $PATH
6184do
6185  IFS=$as_save_IFS
6186  test -z "$as_dir" && as_dir=.
6187    for ac_exec_ext in '' $ac_executable_extensions; do
6188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6189    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6191    break 2
6192  fi
6193done
6194  done
6195IFS=$as_save_IFS
6196
6197  ;;
6198esac
6199fi
6200DIFF=$ac_cv_path_DIFF
6201if test -n "$DIFF"; then
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6203$as_echo "$DIFF" >&6; }
6204else
6205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206$as_echo "no" >&6; }
6207fi
6208
6209
6210  test -n "$DIFF" && break
6211done
6212
6213  else
6214    # The variable is set, but is it from the command line or the environment?
6215
6216    # Try to remove the string !DIFF! from our list.
6217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6219      # If it failed, the variable was not from the command line. Ignore it,
6220      # but warn the user (except for BASH, which is always set by the calling BASH).
6221      if test "xDIFF" != xBASH; then
6222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6223$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6224      fi
6225      # Try to locate tool using the code snippet
6226      for ac_prog in gdiff diff
6227do
6228  # Extract the first word of "$ac_prog", so it can be a program name with args.
6229set dummy $ac_prog; ac_word=$2
6230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6231$as_echo_n "checking for $ac_word... " >&6; }
6232if ${ac_cv_path_DIFF+:} false; then :
6233  $as_echo_n "(cached) " >&6
6234else
6235  case $DIFF in
6236  [\\/]* | ?:[\\/]*)
6237  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6238  ;;
6239  *)
6240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6241for as_dir in $PATH
6242do
6243  IFS=$as_save_IFS
6244  test -z "$as_dir" && as_dir=.
6245    for ac_exec_ext in '' $ac_executable_extensions; do
6246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6247    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6249    break 2
6250  fi
6251done
6252  done
6253IFS=$as_save_IFS
6254
6255  ;;
6256esac
6257fi
6258DIFF=$ac_cv_path_DIFF
6259if test -n "$DIFF"; then
6260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6261$as_echo "$DIFF" >&6; }
6262else
6263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6264$as_echo "no" >&6; }
6265fi
6266
6267
6268  test -n "$DIFF" && break
6269done
6270
6271    else
6272      # If it succeeded, then it was overridden by the user. We will use it
6273      # for the tool.
6274
6275      # First remove it from the list of overridden variables, so we can test
6276      # for unknown variables in the end.
6277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6278
6279      # Check if the provided tool contains a complete path.
6280      tool_specified="$DIFF"
6281      tool_basename="${tool_specified##*/}"
6282      if test "x$tool_basename" = "x$tool_specified"; then
6283        # A command without a complete path is provided, search $PATH.
6284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6285$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6286        # Extract the first word of "$tool_basename", so it can be a program name with args.
6287set dummy $tool_basename; ac_word=$2
6288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6289$as_echo_n "checking for $ac_word... " >&6; }
6290if ${ac_cv_path_DIFF+:} false; then :
6291  $as_echo_n "(cached) " >&6
6292else
6293  case $DIFF in
6294  [\\/]* | ?:[\\/]*)
6295  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6296  ;;
6297  *)
6298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6299for as_dir in $PATH
6300do
6301  IFS=$as_save_IFS
6302  test -z "$as_dir" && as_dir=.
6303    for ac_exec_ext in '' $ac_executable_extensions; do
6304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6305    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6307    break 2
6308  fi
6309done
6310  done
6311IFS=$as_save_IFS
6312
6313  ;;
6314esac
6315fi
6316DIFF=$ac_cv_path_DIFF
6317if test -n "$DIFF"; then
6318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6319$as_echo "$DIFF" >&6; }
6320else
6321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6322$as_echo "no" >&6; }
6323fi
6324
6325
6326        if test "x$DIFF" = x; then
6327          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6328        fi
6329      else
6330        # Otherwise we believe it is a complete path. Use it as it is.
6331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6332$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6333        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6334$as_echo_n "checking for DIFF... " >&6; }
6335        if test ! -x "$tool_specified"; then
6336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6337$as_echo "not found" >&6; }
6338          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6339        fi
6340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6341$as_echo "$tool_specified" >&6; }
6342      fi
6343    fi
6344  fi
6345
6346
6347
6348  if test "x$DIFF" = x; then
6349    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6350  fi
6351
6352
6353
6354
6355
6356  # Publish this variable in the help.
6357
6358
6359  if test "x$DIRNAME" = x; then
6360    # The variable is not set by user, try to locate tool using the code snippet
6361    for ac_prog in dirname
6362do
6363  # Extract the first word of "$ac_prog", so it can be a program name with args.
6364set dummy $ac_prog; ac_word=$2
6365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6366$as_echo_n "checking for $ac_word... " >&6; }
6367if ${ac_cv_path_DIRNAME+:} false; then :
6368  $as_echo_n "(cached) " >&6
6369else
6370  case $DIRNAME in
6371  [\\/]* | ?:[\\/]*)
6372  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6373  ;;
6374  *)
6375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6376for as_dir in $PATH
6377do
6378  IFS=$as_save_IFS
6379  test -z "$as_dir" && as_dir=.
6380    for ac_exec_ext in '' $ac_executable_extensions; do
6381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6382    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6384    break 2
6385  fi
6386done
6387  done
6388IFS=$as_save_IFS
6389
6390  ;;
6391esac
6392fi
6393DIRNAME=$ac_cv_path_DIRNAME
6394if test -n "$DIRNAME"; then
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6396$as_echo "$DIRNAME" >&6; }
6397else
6398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6399$as_echo "no" >&6; }
6400fi
6401
6402
6403  test -n "$DIRNAME" && break
6404done
6405
6406  else
6407    # The variable is set, but is it from the command line or the environment?
6408
6409    # Try to remove the string !DIRNAME! from our list.
6410    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6411    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6412      # If it failed, the variable was not from the command line. Ignore it,
6413      # but warn the user (except for BASH, which is always set by the calling BASH).
6414      if test "xDIRNAME" != xBASH; then
6415        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6416$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6417      fi
6418      # Try to locate tool using the code snippet
6419      for ac_prog in dirname
6420do
6421  # Extract the first word of "$ac_prog", so it can be a program name with args.
6422set dummy $ac_prog; ac_word=$2
6423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6424$as_echo_n "checking for $ac_word... " >&6; }
6425if ${ac_cv_path_DIRNAME+:} false; then :
6426  $as_echo_n "(cached) " >&6
6427else
6428  case $DIRNAME in
6429  [\\/]* | ?:[\\/]*)
6430  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6431  ;;
6432  *)
6433  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6434for as_dir in $PATH
6435do
6436  IFS=$as_save_IFS
6437  test -z "$as_dir" && as_dir=.
6438    for ac_exec_ext in '' $ac_executable_extensions; do
6439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6440    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6442    break 2
6443  fi
6444done
6445  done
6446IFS=$as_save_IFS
6447
6448  ;;
6449esac
6450fi
6451DIRNAME=$ac_cv_path_DIRNAME
6452if test -n "$DIRNAME"; then
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6454$as_echo "$DIRNAME" >&6; }
6455else
6456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6457$as_echo "no" >&6; }
6458fi
6459
6460
6461  test -n "$DIRNAME" && break
6462done
6463
6464    else
6465      # If it succeeded, then it was overridden by the user. We will use it
6466      # for the tool.
6467
6468      # First remove it from the list of overridden variables, so we can test
6469      # for unknown variables in the end.
6470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6471
6472      # Check if the provided tool contains a complete path.
6473      tool_specified="$DIRNAME"
6474      tool_basename="${tool_specified##*/}"
6475      if test "x$tool_basename" = "x$tool_specified"; then
6476        # A command without a complete path is provided, search $PATH.
6477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6478$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6479        # Extract the first word of "$tool_basename", so it can be a program name with args.
6480set dummy $tool_basename; ac_word=$2
6481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6482$as_echo_n "checking for $ac_word... " >&6; }
6483if ${ac_cv_path_DIRNAME+:} false; then :
6484  $as_echo_n "(cached) " >&6
6485else
6486  case $DIRNAME in
6487  [\\/]* | ?:[\\/]*)
6488  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6489  ;;
6490  *)
6491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6492for as_dir in $PATH
6493do
6494  IFS=$as_save_IFS
6495  test -z "$as_dir" && as_dir=.
6496    for ac_exec_ext in '' $ac_executable_extensions; do
6497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6498    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6500    break 2
6501  fi
6502done
6503  done
6504IFS=$as_save_IFS
6505
6506  ;;
6507esac
6508fi
6509DIRNAME=$ac_cv_path_DIRNAME
6510if test -n "$DIRNAME"; then
6511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6512$as_echo "$DIRNAME" >&6; }
6513else
6514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6515$as_echo "no" >&6; }
6516fi
6517
6518
6519        if test "x$DIRNAME" = x; then
6520          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6521        fi
6522      else
6523        # Otherwise we believe it is a complete path. Use it as it is.
6524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6525$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6527$as_echo_n "checking for DIRNAME... " >&6; }
6528        if test ! -x "$tool_specified"; then
6529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6530$as_echo "not found" >&6; }
6531          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6532        fi
6533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6534$as_echo "$tool_specified" >&6; }
6535      fi
6536    fi
6537  fi
6538
6539
6540
6541  if test "x$DIRNAME" = x; then
6542    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6543  fi
6544
6545
6546
6547
6548
6549  # Publish this variable in the help.
6550
6551
6552  if test "x$ECHO" = x; then
6553    # The variable is not set by user, try to locate tool using the code snippet
6554    for ac_prog in echo
6555do
6556  # Extract the first word of "$ac_prog", so it can be a program name with args.
6557set dummy $ac_prog; ac_word=$2
6558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6559$as_echo_n "checking for $ac_word... " >&6; }
6560if ${ac_cv_path_ECHO+:} false; then :
6561  $as_echo_n "(cached) " >&6
6562else
6563  case $ECHO in
6564  [\\/]* | ?:[\\/]*)
6565  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6566  ;;
6567  *)
6568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6569for as_dir in $PATH
6570do
6571  IFS=$as_save_IFS
6572  test -z "$as_dir" && as_dir=.
6573    for ac_exec_ext in '' $ac_executable_extensions; do
6574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6575    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6577    break 2
6578  fi
6579done
6580  done
6581IFS=$as_save_IFS
6582
6583  ;;
6584esac
6585fi
6586ECHO=$ac_cv_path_ECHO
6587if test -n "$ECHO"; then
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6589$as_echo "$ECHO" >&6; }
6590else
6591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6592$as_echo "no" >&6; }
6593fi
6594
6595
6596  test -n "$ECHO" && break
6597done
6598
6599  else
6600    # The variable is set, but is it from the command line or the environment?
6601
6602    # Try to remove the string !ECHO! from our list.
6603    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6604    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6605      # If it failed, the variable was not from the command line. Ignore it,
6606      # but warn the user (except for BASH, which is always set by the calling BASH).
6607      if test "xECHO" != xBASH; then
6608        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6609$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6610      fi
6611      # Try to locate tool using the code snippet
6612      for ac_prog in echo
6613do
6614  # Extract the first word of "$ac_prog", so it can be a program name with args.
6615set dummy $ac_prog; ac_word=$2
6616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6617$as_echo_n "checking for $ac_word... " >&6; }
6618if ${ac_cv_path_ECHO+:} false; then :
6619  $as_echo_n "(cached) " >&6
6620else
6621  case $ECHO in
6622  [\\/]* | ?:[\\/]*)
6623  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6624  ;;
6625  *)
6626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6627for as_dir in $PATH
6628do
6629  IFS=$as_save_IFS
6630  test -z "$as_dir" && as_dir=.
6631    for ac_exec_ext in '' $ac_executable_extensions; do
6632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6633    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6635    break 2
6636  fi
6637done
6638  done
6639IFS=$as_save_IFS
6640
6641  ;;
6642esac
6643fi
6644ECHO=$ac_cv_path_ECHO
6645if test -n "$ECHO"; then
6646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6647$as_echo "$ECHO" >&6; }
6648else
6649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6650$as_echo "no" >&6; }
6651fi
6652
6653
6654  test -n "$ECHO" && break
6655done
6656
6657    else
6658      # If it succeeded, then it was overridden by the user. We will use it
6659      # for the tool.
6660
6661      # First remove it from the list of overridden variables, so we can test
6662      # for unknown variables in the end.
6663      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6664
6665      # Check if the provided tool contains a complete path.
6666      tool_specified="$ECHO"
6667      tool_basename="${tool_specified##*/}"
6668      if test "x$tool_basename" = "x$tool_specified"; then
6669        # A command without a complete path is provided, search $PATH.
6670        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6671$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6672        # Extract the first word of "$tool_basename", so it can be a program name with args.
6673set dummy $tool_basename; ac_word=$2
6674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6675$as_echo_n "checking for $ac_word... " >&6; }
6676if ${ac_cv_path_ECHO+:} false; then :
6677  $as_echo_n "(cached) " >&6
6678else
6679  case $ECHO in
6680  [\\/]* | ?:[\\/]*)
6681  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6682  ;;
6683  *)
6684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6685for as_dir in $PATH
6686do
6687  IFS=$as_save_IFS
6688  test -z "$as_dir" && as_dir=.
6689    for ac_exec_ext in '' $ac_executable_extensions; do
6690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6691    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6693    break 2
6694  fi
6695done
6696  done
6697IFS=$as_save_IFS
6698
6699  ;;
6700esac
6701fi
6702ECHO=$ac_cv_path_ECHO
6703if test -n "$ECHO"; then
6704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6705$as_echo "$ECHO" >&6; }
6706else
6707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6708$as_echo "no" >&6; }
6709fi
6710
6711
6712        if test "x$ECHO" = x; then
6713          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6714        fi
6715      else
6716        # Otherwise we believe it is a complete path. Use it as it is.
6717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6718$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6719        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6720$as_echo_n "checking for ECHO... " >&6; }
6721        if test ! -x "$tool_specified"; then
6722          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6723$as_echo "not found" >&6; }
6724          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6725        fi
6726        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6727$as_echo "$tool_specified" >&6; }
6728      fi
6729    fi
6730  fi
6731
6732
6733
6734  if test "x$ECHO" = x; then
6735    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6736  fi
6737
6738
6739
6740
6741
6742  # Publish this variable in the help.
6743
6744
6745  if test "x$EXPR" = x; then
6746    # The variable is not set by user, try to locate tool using the code snippet
6747    for ac_prog in expr
6748do
6749  # Extract the first word of "$ac_prog", so it can be a program name with args.
6750set dummy $ac_prog; ac_word=$2
6751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6752$as_echo_n "checking for $ac_word... " >&6; }
6753if ${ac_cv_path_EXPR+:} false; then :
6754  $as_echo_n "(cached) " >&6
6755else
6756  case $EXPR in
6757  [\\/]* | ?:[\\/]*)
6758  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6759  ;;
6760  *)
6761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6762for as_dir in $PATH
6763do
6764  IFS=$as_save_IFS
6765  test -z "$as_dir" && as_dir=.
6766    for ac_exec_ext in '' $ac_executable_extensions; do
6767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6768    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6770    break 2
6771  fi
6772done
6773  done
6774IFS=$as_save_IFS
6775
6776  ;;
6777esac
6778fi
6779EXPR=$ac_cv_path_EXPR
6780if test -n "$EXPR"; then
6781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6782$as_echo "$EXPR" >&6; }
6783else
6784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6785$as_echo "no" >&6; }
6786fi
6787
6788
6789  test -n "$EXPR" && break
6790done
6791
6792  else
6793    # The variable is set, but is it from the command line or the environment?
6794
6795    # Try to remove the string !EXPR! from our list.
6796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6798      # If it failed, the variable was not from the command line. Ignore it,
6799      # but warn the user (except for BASH, which is always set by the calling BASH).
6800      if test "xEXPR" != xBASH; then
6801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6802$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6803      fi
6804      # Try to locate tool using the code snippet
6805      for ac_prog in expr
6806do
6807  # Extract the first word of "$ac_prog", so it can be a program name with args.
6808set dummy $ac_prog; ac_word=$2
6809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6810$as_echo_n "checking for $ac_word... " >&6; }
6811if ${ac_cv_path_EXPR+:} false; then :
6812  $as_echo_n "(cached) " >&6
6813else
6814  case $EXPR in
6815  [\\/]* | ?:[\\/]*)
6816  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6817  ;;
6818  *)
6819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6820for as_dir in $PATH
6821do
6822  IFS=$as_save_IFS
6823  test -z "$as_dir" && as_dir=.
6824    for ac_exec_ext in '' $ac_executable_extensions; do
6825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6826    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6828    break 2
6829  fi
6830done
6831  done
6832IFS=$as_save_IFS
6833
6834  ;;
6835esac
6836fi
6837EXPR=$ac_cv_path_EXPR
6838if test -n "$EXPR"; then
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6840$as_echo "$EXPR" >&6; }
6841else
6842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6843$as_echo "no" >&6; }
6844fi
6845
6846
6847  test -n "$EXPR" && break
6848done
6849
6850    else
6851      # If it succeeded, then it was overridden by the user. We will use it
6852      # for the tool.
6853
6854      # First remove it from the list of overridden variables, so we can test
6855      # for unknown variables in the end.
6856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6857
6858      # Check if the provided tool contains a complete path.
6859      tool_specified="$EXPR"
6860      tool_basename="${tool_specified##*/}"
6861      if test "x$tool_basename" = "x$tool_specified"; then
6862        # A command without a complete path is provided, search $PATH.
6863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6864$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6865        # Extract the first word of "$tool_basename", so it can be a program name with args.
6866set dummy $tool_basename; ac_word=$2
6867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6868$as_echo_n "checking for $ac_word... " >&6; }
6869if ${ac_cv_path_EXPR+:} false; then :
6870  $as_echo_n "(cached) " >&6
6871else
6872  case $EXPR in
6873  [\\/]* | ?:[\\/]*)
6874  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6875  ;;
6876  *)
6877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6878for as_dir in $PATH
6879do
6880  IFS=$as_save_IFS
6881  test -z "$as_dir" && as_dir=.
6882    for ac_exec_ext in '' $ac_executable_extensions; do
6883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6884    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6886    break 2
6887  fi
6888done
6889  done
6890IFS=$as_save_IFS
6891
6892  ;;
6893esac
6894fi
6895EXPR=$ac_cv_path_EXPR
6896if test -n "$EXPR"; then
6897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6898$as_echo "$EXPR" >&6; }
6899else
6900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6901$as_echo "no" >&6; }
6902fi
6903
6904
6905        if test "x$EXPR" = x; then
6906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6907        fi
6908      else
6909        # Otherwise we believe it is a complete path. Use it as it is.
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6911$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6913$as_echo_n "checking for EXPR... " >&6; }
6914        if test ! -x "$tool_specified"; then
6915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6916$as_echo "not found" >&6; }
6917          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6918        fi
6919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6920$as_echo "$tool_specified" >&6; }
6921      fi
6922    fi
6923  fi
6924
6925
6926
6927  if test "x$EXPR" = x; then
6928    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6929  fi
6930
6931
6932
6933
6934
6935  # Publish this variable in the help.
6936
6937
6938  if test "x$FILE" = x; then
6939    # The variable is not set by user, try to locate tool using the code snippet
6940    for ac_prog in file
6941do
6942  # Extract the first word of "$ac_prog", so it can be a program name with args.
6943set dummy $ac_prog; ac_word=$2
6944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6945$as_echo_n "checking for $ac_word... " >&6; }
6946if ${ac_cv_path_FILE+:} false; then :
6947  $as_echo_n "(cached) " >&6
6948else
6949  case $FILE in
6950  [\\/]* | ?:[\\/]*)
6951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6952  ;;
6953  *)
6954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6955for as_dir in $PATH
6956do
6957  IFS=$as_save_IFS
6958  test -z "$as_dir" && as_dir=.
6959    for ac_exec_ext in '' $ac_executable_extensions; do
6960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
6962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6963    break 2
6964  fi
6965done
6966  done
6967IFS=$as_save_IFS
6968
6969  ;;
6970esac
6971fi
6972FILE=$ac_cv_path_FILE
6973if test -n "$FILE"; then
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
6975$as_echo "$FILE" >&6; }
6976else
6977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6978$as_echo "no" >&6; }
6979fi
6980
6981
6982  test -n "$FILE" && break
6983done
6984
6985  else
6986    # The variable is set, but is it from the command line or the environment?
6987
6988    # Try to remove the string !FILE! from our list.
6989    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
6990    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6991      # If it failed, the variable was not from the command line. Ignore it,
6992      # but warn the user (except for BASH, which is always set by the calling BASH).
6993      if test "xFILE" != xBASH; then
6994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
6995$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
6996      fi
6997      # Try to locate tool using the code snippet
6998      for ac_prog in file
6999do
7000  # Extract the first word of "$ac_prog", so it can be a program name with args.
7001set dummy $ac_prog; ac_word=$2
7002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7003$as_echo_n "checking for $ac_word... " >&6; }
7004if ${ac_cv_path_FILE+:} false; then :
7005  $as_echo_n "(cached) " >&6
7006else
7007  case $FILE in
7008  [\\/]* | ?:[\\/]*)
7009  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7010  ;;
7011  *)
7012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7013for as_dir in $PATH
7014do
7015  IFS=$as_save_IFS
7016  test -z "$as_dir" && as_dir=.
7017    for ac_exec_ext in '' $ac_executable_extensions; do
7018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7019    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7021    break 2
7022  fi
7023done
7024  done
7025IFS=$as_save_IFS
7026
7027  ;;
7028esac
7029fi
7030FILE=$ac_cv_path_FILE
7031if test -n "$FILE"; then
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7033$as_echo "$FILE" >&6; }
7034else
7035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7036$as_echo "no" >&6; }
7037fi
7038
7039
7040  test -n "$FILE" && break
7041done
7042
7043    else
7044      # If it succeeded, then it was overridden by the user. We will use it
7045      # for the tool.
7046
7047      # First remove it from the list of overridden variables, so we can test
7048      # for unknown variables in the end.
7049      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7050
7051      # Check if the provided tool contains a complete path.
7052      tool_specified="$FILE"
7053      tool_basename="${tool_specified##*/}"
7054      if test "x$tool_basename" = "x$tool_specified"; then
7055        # A command without a complete path is provided, search $PATH.
7056        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7057$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7058        # Extract the first word of "$tool_basename", so it can be a program name with args.
7059set dummy $tool_basename; ac_word=$2
7060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7061$as_echo_n "checking for $ac_word... " >&6; }
7062if ${ac_cv_path_FILE+:} false; then :
7063  $as_echo_n "(cached) " >&6
7064else
7065  case $FILE in
7066  [\\/]* | ?:[\\/]*)
7067  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7068  ;;
7069  *)
7070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7071for as_dir in $PATH
7072do
7073  IFS=$as_save_IFS
7074  test -z "$as_dir" && as_dir=.
7075    for ac_exec_ext in '' $ac_executable_extensions; do
7076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7077    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7079    break 2
7080  fi
7081done
7082  done
7083IFS=$as_save_IFS
7084
7085  ;;
7086esac
7087fi
7088FILE=$ac_cv_path_FILE
7089if test -n "$FILE"; then
7090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7091$as_echo "$FILE" >&6; }
7092else
7093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7094$as_echo "no" >&6; }
7095fi
7096
7097
7098        if test "x$FILE" = x; then
7099          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7100        fi
7101      else
7102        # Otherwise we believe it is a complete path. Use it as it is.
7103        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7104$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7106$as_echo_n "checking for FILE... " >&6; }
7107        if test ! -x "$tool_specified"; then
7108          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7109$as_echo "not found" >&6; }
7110          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7111        fi
7112        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7113$as_echo "$tool_specified" >&6; }
7114      fi
7115    fi
7116  fi
7117
7118
7119
7120  if test "x$FILE" = x; then
7121    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7122  fi
7123
7124
7125
7126
7127
7128  # Publish this variable in the help.
7129
7130
7131  if test "x$FIND" = x; then
7132    # The variable is not set by user, try to locate tool using the code snippet
7133    for ac_prog in find
7134do
7135  # Extract the first word of "$ac_prog", so it can be a program name with args.
7136set dummy $ac_prog; ac_word=$2
7137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7138$as_echo_n "checking for $ac_word... " >&6; }
7139if ${ac_cv_path_FIND+:} false; then :
7140  $as_echo_n "(cached) " >&6
7141else
7142  case $FIND in
7143  [\\/]* | ?:[\\/]*)
7144  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7145  ;;
7146  *)
7147  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7148for as_dir in $PATH
7149do
7150  IFS=$as_save_IFS
7151  test -z "$as_dir" && as_dir=.
7152    for ac_exec_ext in '' $ac_executable_extensions; do
7153  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7154    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7155    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7156    break 2
7157  fi
7158done
7159  done
7160IFS=$as_save_IFS
7161
7162  ;;
7163esac
7164fi
7165FIND=$ac_cv_path_FIND
7166if test -n "$FIND"; then
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7168$as_echo "$FIND" >&6; }
7169else
7170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7171$as_echo "no" >&6; }
7172fi
7173
7174
7175  test -n "$FIND" && break
7176done
7177
7178  else
7179    # The variable is set, but is it from the command line or the environment?
7180
7181    # Try to remove the string !FIND! from our list.
7182    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7183    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7184      # If it failed, the variable was not from the command line. Ignore it,
7185      # but warn the user (except for BASH, which is always set by the calling BASH).
7186      if test "xFIND" != xBASH; then
7187        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7188$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7189      fi
7190      # Try to locate tool using the code snippet
7191      for ac_prog in find
7192do
7193  # Extract the first word of "$ac_prog", so it can be a program name with args.
7194set dummy $ac_prog; ac_word=$2
7195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7196$as_echo_n "checking for $ac_word... " >&6; }
7197if ${ac_cv_path_FIND+:} false; then :
7198  $as_echo_n "(cached) " >&6
7199else
7200  case $FIND in
7201  [\\/]* | ?:[\\/]*)
7202  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7203  ;;
7204  *)
7205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7206for as_dir in $PATH
7207do
7208  IFS=$as_save_IFS
7209  test -z "$as_dir" && as_dir=.
7210    for ac_exec_ext in '' $ac_executable_extensions; do
7211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7212    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7214    break 2
7215  fi
7216done
7217  done
7218IFS=$as_save_IFS
7219
7220  ;;
7221esac
7222fi
7223FIND=$ac_cv_path_FIND
7224if test -n "$FIND"; then
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7226$as_echo "$FIND" >&6; }
7227else
7228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7229$as_echo "no" >&6; }
7230fi
7231
7232
7233  test -n "$FIND" && break
7234done
7235
7236    else
7237      # If it succeeded, then it was overridden by the user. We will use it
7238      # for the tool.
7239
7240      # First remove it from the list of overridden variables, so we can test
7241      # for unknown variables in the end.
7242      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7243
7244      # Check if the provided tool contains a complete path.
7245      tool_specified="$FIND"
7246      tool_basename="${tool_specified##*/}"
7247      if test "x$tool_basename" = "x$tool_specified"; then
7248        # A command without a complete path is provided, search $PATH.
7249        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7250$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7251        # Extract the first word of "$tool_basename", so it can be a program name with args.
7252set dummy $tool_basename; ac_word=$2
7253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7254$as_echo_n "checking for $ac_word... " >&6; }
7255if ${ac_cv_path_FIND+:} false; then :
7256  $as_echo_n "(cached) " >&6
7257else
7258  case $FIND in
7259  [\\/]* | ?:[\\/]*)
7260  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7261  ;;
7262  *)
7263  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7264for as_dir in $PATH
7265do
7266  IFS=$as_save_IFS
7267  test -z "$as_dir" && as_dir=.
7268    for ac_exec_ext in '' $ac_executable_extensions; do
7269  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7270    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7271    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7272    break 2
7273  fi
7274done
7275  done
7276IFS=$as_save_IFS
7277
7278  ;;
7279esac
7280fi
7281FIND=$ac_cv_path_FIND
7282if test -n "$FIND"; then
7283  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7284$as_echo "$FIND" >&6; }
7285else
7286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7287$as_echo "no" >&6; }
7288fi
7289
7290
7291        if test "x$FIND" = x; then
7292          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7293        fi
7294      else
7295        # Otherwise we believe it is a complete path. Use it as it is.
7296        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7297$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7299$as_echo_n "checking for FIND... " >&6; }
7300        if test ! -x "$tool_specified"; then
7301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7302$as_echo "not found" >&6; }
7303          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7304        fi
7305        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7306$as_echo "$tool_specified" >&6; }
7307      fi
7308    fi
7309  fi
7310
7311
7312
7313  if test "x$FIND" = x; then
7314    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7315  fi
7316
7317
7318
7319
7320
7321  # Publish this variable in the help.
7322
7323
7324  if test "x$HEAD" = x; then
7325    # The variable is not set by user, try to locate tool using the code snippet
7326    for ac_prog in head
7327do
7328  # Extract the first word of "$ac_prog", so it can be a program name with args.
7329set dummy $ac_prog; ac_word=$2
7330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7331$as_echo_n "checking for $ac_word... " >&6; }
7332if ${ac_cv_path_HEAD+:} false; then :
7333  $as_echo_n "(cached) " >&6
7334else
7335  case $HEAD in
7336  [\\/]* | ?:[\\/]*)
7337  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7338  ;;
7339  *)
7340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7341for as_dir in $PATH
7342do
7343  IFS=$as_save_IFS
7344  test -z "$as_dir" && as_dir=.
7345    for ac_exec_ext in '' $ac_executable_extensions; do
7346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7347    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7349    break 2
7350  fi
7351done
7352  done
7353IFS=$as_save_IFS
7354
7355  ;;
7356esac
7357fi
7358HEAD=$ac_cv_path_HEAD
7359if test -n "$HEAD"; then
7360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7361$as_echo "$HEAD" >&6; }
7362else
7363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7364$as_echo "no" >&6; }
7365fi
7366
7367
7368  test -n "$HEAD" && break
7369done
7370
7371  else
7372    # The variable is set, but is it from the command line or the environment?
7373
7374    # Try to remove the string !HEAD! from our list.
7375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7377      # If it failed, the variable was not from the command line. Ignore it,
7378      # but warn the user (except for BASH, which is always set by the calling BASH).
7379      if test "xHEAD" != xBASH; then
7380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7381$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7382      fi
7383      # Try to locate tool using the code snippet
7384      for ac_prog in head
7385do
7386  # Extract the first word of "$ac_prog", so it can be a program name with args.
7387set dummy $ac_prog; ac_word=$2
7388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7389$as_echo_n "checking for $ac_word... " >&6; }
7390if ${ac_cv_path_HEAD+:} false; then :
7391  $as_echo_n "(cached) " >&6
7392else
7393  case $HEAD in
7394  [\\/]* | ?:[\\/]*)
7395  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7396  ;;
7397  *)
7398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7399for as_dir in $PATH
7400do
7401  IFS=$as_save_IFS
7402  test -z "$as_dir" && as_dir=.
7403    for ac_exec_ext in '' $ac_executable_extensions; do
7404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7405    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7407    break 2
7408  fi
7409done
7410  done
7411IFS=$as_save_IFS
7412
7413  ;;
7414esac
7415fi
7416HEAD=$ac_cv_path_HEAD
7417if test -n "$HEAD"; then
7418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7419$as_echo "$HEAD" >&6; }
7420else
7421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7422$as_echo "no" >&6; }
7423fi
7424
7425
7426  test -n "$HEAD" && break
7427done
7428
7429    else
7430      # If it succeeded, then it was overridden by the user. We will use it
7431      # for the tool.
7432
7433      # First remove it from the list of overridden variables, so we can test
7434      # for unknown variables in the end.
7435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7436
7437      # Check if the provided tool contains a complete path.
7438      tool_specified="$HEAD"
7439      tool_basename="${tool_specified##*/}"
7440      if test "x$tool_basename" = "x$tool_specified"; then
7441        # A command without a complete path is provided, search $PATH.
7442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7443$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7444        # Extract the first word of "$tool_basename", so it can be a program name with args.
7445set dummy $tool_basename; ac_word=$2
7446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7447$as_echo_n "checking for $ac_word... " >&6; }
7448if ${ac_cv_path_HEAD+:} false; then :
7449  $as_echo_n "(cached) " >&6
7450else
7451  case $HEAD in
7452  [\\/]* | ?:[\\/]*)
7453  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7454  ;;
7455  *)
7456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7457for as_dir in $PATH
7458do
7459  IFS=$as_save_IFS
7460  test -z "$as_dir" && as_dir=.
7461    for ac_exec_ext in '' $ac_executable_extensions; do
7462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7463    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7465    break 2
7466  fi
7467done
7468  done
7469IFS=$as_save_IFS
7470
7471  ;;
7472esac
7473fi
7474HEAD=$ac_cv_path_HEAD
7475if test -n "$HEAD"; then
7476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7477$as_echo "$HEAD" >&6; }
7478else
7479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7480$as_echo "no" >&6; }
7481fi
7482
7483
7484        if test "x$HEAD" = x; then
7485          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7486        fi
7487      else
7488        # Otherwise we believe it is a complete path. Use it as it is.
7489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7490$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7492$as_echo_n "checking for HEAD... " >&6; }
7493        if test ! -x "$tool_specified"; then
7494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7495$as_echo "not found" >&6; }
7496          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7497        fi
7498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7499$as_echo "$tool_specified" >&6; }
7500      fi
7501    fi
7502  fi
7503
7504
7505
7506  if test "x$HEAD" = x; then
7507    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7508  fi
7509
7510
7511
7512
7513
7514  # Publish this variable in the help.
7515
7516
7517  if test "x$LN" = x; then
7518    # The variable is not set by user, try to locate tool using the code snippet
7519    for ac_prog in ln
7520do
7521  # Extract the first word of "$ac_prog", so it can be a program name with args.
7522set dummy $ac_prog; ac_word=$2
7523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7524$as_echo_n "checking for $ac_word... " >&6; }
7525if ${ac_cv_path_LN+:} false; then :
7526  $as_echo_n "(cached) " >&6
7527else
7528  case $LN in
7529  [\\/]* | ?:[\\/]*)
7530  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7531  ;;
7532  *)
7533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7534for as_dir in $PATH
7535do
7536  IFS=$as_save_IFS
7537  test -z "$as_dir" && as_dir=.
7538    for ac_exec_ext in '' $ac_executable_extensions; do
7539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7540    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7542    break 2
7543  fi
7544done
7545  done
7546IFS=$as_save_IFS
7547
7548  ;;
7549esac
7550fi
7551LN=$ac_cv_path_LN
7552if test -n "$LN"; then
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7554$as_echo "$LN" >&6; }
7555else
7556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7557$as_echo "no" >&6; }
7558fi
7559
7560
7561  test -n "$LN" && break
7562done
7563
7564  else
7565    # The variable is set, but is it from the command line or the environment?
7566
7567    # Try to remove the string !LN! from our list.
7568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7570      # If it failed, the variable was not from the command line. Ignore it,
7571      # but warn the user (except for BASH, which is always set by the calling BASH).
7572      if test "xLN" != xBASH; then
7573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7574$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7575      fi
7576      # Try to locate tool using the code snippet
7577      for ac_prog in ln
7578do
7579  # Extract the first word of "$ac_prog", so it can be a program name with args.
7580set dummy $ac_prog; ac_word=$2
7581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7582$as_echo_n "checking for $ac_word... " >&6; }
7583if ${ac_cv_path_LN+:} false; then :
7584  $as_echo_n "(cached) " >&6
7585else
7586  case $LN in
7587  [\\/]* | ?:[\\/]*)
7588  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7589  ;;
7590  *)
7591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7592for as_dir in $PATH
7593do
7594  IFS=$as_save_IFS
7595  test -z "$as_dir" && as_dir=.
7596    for ac_exec_ext in '' $ac_executable_extensions; do
7597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7598    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7600    break 2
7601  fi
7602done
7603  done
7604IFS=$as_save_IFS
7605
7606  ;;
7607esac
7608fi
7609LN=$ac_cv_path_LN
7610if test -n "$LN"; then
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7612$as_echo "$LN" >&6; }
7613else
7614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7615$as_echo "no" >&6; }
7616fi
7617
7618
7619  test -n "$LN" && break
7620done
7621
7622    else
7623      # If it succeeded, then it was overridden by the user. We will use it
7624      # for the tool.
7625
7626      # First remove it from the list of overridden variables, so we can test
7627      # for unknown variables in the end.
7628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7629
7630      # Check if the provided tool contains a complete path.
7631      tool_specified="$LN"
7632      tool_basename="${tool_specified##*/}"
7633      if test "x$tool_basename" = "x$tool_specified"; then
7634        # A command without a complete path is provided, search $PATH.
7635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7636$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7637        # Extract the first word of "$tool_basename", so it can be a program name with args.
7638set dummy $tool_basename; ac_word=$2
7639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7640$as_echo_n "checking for $ac_word... " >&6; }
7641if ${ac_cv_path_LN+:} false; then :
7642  $as_echo_n "(cached) " >&6
7643else
7644  case $LN in
7645  [\\/]* | ?:[\\/]*)
7646  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7647  ;;
7648  *)
7649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7650for as_dir in $PATH
7651do
7652  IFS=$as_save_IFS
7653  test -z "$as_dir" && as_dir=.
7654    for ac_exec_ext in '' $ac_executable_extensions; do
7655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7656    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7658    break 2
7659  fi
7660done
7661  done
7662IFS=$as_save_IFS
7663
7664  ;;
7665esac
7666fi
7667LN=$ac_cv_path_LN
7668if test -n "$LN"; then
7669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7670$as_echo "$LN" >&6; }
7671else
7672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7673$as_echo "no" >&6; }
7674fi
7675
7676
7677        if test "x$LN" = x; then
7678          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7679        fi
7680      else
7681        # Otherwise we believe it is a complete path. Use it as it is.
7682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7683$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7685$as_echo_n "checking for LN... " >&6; }
7686        if test ! -x "$tool_specified"; then
7687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7688$as_echo "not found" >&6; }
7689          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7690        fi
7691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7692$as_echo "$tool_specified" >&6; }
7693      fi
7694    fi
7695  fi
7696
7697
7698
7699  if test "x$LN" = x; then
7700    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7701  fi
7702
7703
7704
7705
7706
7707  # Publish this variable in the help.
7708
7709
7710  if test "x$LS" = x; then
7711    # The variable is not set by user, try to locate tool using the code snippet
7712    for ac_prog in ls
7713do
7714  # Extract the first word of "$ac_prog", so it can be a program name with args.
7715set dummy $ac_prog; ac_word=$2
7716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7717$as_echo_n "checking for $ac_word... " >&6; }
7718if ${ac_cv_path_LS+:} false; then :
7719  $as_echo_n "(cached) " >&6
7720else
7721  case $LS in
7722  [\\/]* | ?:[\\/]*)
7723  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7724  ;;
7725  *)
7726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7727for as_dir in $PATH
7728do
7729  IFS=$as_save_IFS
7730  test -z "$as_dir" && as_dir=.
7731    for ac_exec_ext in '' $ac_executable_extensions; do
7732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7733    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7735    break 2
7736  fi
7737done
7738  done
7739IFS=$as_save_IFS
7740
7741  ;;
7742esac
7743fi
7744LS=$ac_cv_path_LS
7745if test -n "$LS"; then
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7747$as_echo "$LS" >&6; }
7748else
7749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7750$as_echo "no" >&6; }
7751fi
7752
7753
7754  test -n "$LS" && break
7755done
7756
7757  else
7758    # The variable is set, but is it from the command line or the environment?
7759
7760    # Try to remove the string !LS! from our list.
7761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7763      # If it failed, the variable was not from the command line. Ignore it,
7764      # but warn the user (except for BASH, which is always set by the calling BASH).
7765      if test "xLS" != xBASH; then
7766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7767$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7768      fi
7769      # Try to locate tool using the code snippet
7770      for ac_prog in ls
7771do
7772  # Extract the first word of "$ac_prog", so it can be a program name with args.
7773set dummy $ac_prog; ac_word=$2
7774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7775$as_echo_n "checking for $ac_word... " >&6; }
7776if ${ac_cv_path_LS+:} false; then :
7777  $as_echo_n "(cached) " >&6
7778else
7779  case $LS in
7780  [\\/]* | ?:[\\/]*)
7781  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7782  ;;
7783  *)
7784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7785for as_dir in $PATH
7786do
7787  IFS=$as_save_IFS
7788  test -z "$as_dir" && as_dir=.
7789    for ac_exec_ext in '' $ac_executable_extensions; do
7790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7791    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7793    break 2
7794  fi
7795done
7796  done
7797IFS=$as_save_IFS
7798
7799  ;;
7800esac
7801fi
7802LS=$ac_cv_path_LS
7803if test -n "$LS"; then
7804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7805$as_echo "$LS" >&6; }
7806else
7807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7808$as_echo "no" >&6; }
7809fi
7810
7811
7812  test -n "$LS" && break
7813done
7814
7815    else
7816      # If it succeeded, then it was overridden by the user. We will use it
7817      # for the tool.
7818
7819      # First remove it from the list of overridden variables, so we can test
7820      # for unknown variables in the end.
7821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7822
7823      # Check if the provided tool contains a complete path.
7824      tool_specified="$LS"
7825      tool_basename="${tool_specified##*/}"
7826      if test "x$tool_basename" = "x$tool_specified"; then
7827        # A command without a complete path is provided, search $PATH.
7828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7829$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7830        # Extract the first word of "$tool_basename", so it can be a program name with args.
7831set dummy $tool_basename; ac_word=$2
7832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7833$as_echo_n "checking for $ac_word... " >&6; }
7834if ${ac_cv_path_LS+:} false; then :
7835  $as_echo_n "(cached) " >&6
7836else
7837  case $LS in
7838  [\\/]* | ?:[\\/]*)
7839  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7840  ;;
7841  *)
7842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7843for as_dir in $PATH
7844do
7845  IFS=$as_save_IFS
7846  test -z "$as_dir" && as_dir=.
7847    for ac_exec_ext in '' $ac_executable_extensions; do
7848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7849    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7851    break 2
7852  fi
7853done
7854  done
7855IFS=$as_save_IFS
7856
7857  ;;
7858esac
7859fi
7860LS=$ac_cv_path_LS
7861if test -n "$LS"; then
7862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7863$as_echo "$LS" >&6; }
7864else
7865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7866$as_echo "no" >&6; }
7867fi
7868
7869
7870        if test "x$LS" = x; then
7871          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7872        fi
7873      else
7874        # Otherwise we believe it is a complete path. Use it as it is.
7875        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7876$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7877        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7878$as_echo_n "checking for LS... " >&6; }
7879        if test ! -x "$tool_specified"; then
7880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7881$as_echo "not found" >&6; }
7882          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7883        fi
7884        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7885$as_echo "$tool_specified" >&6; }
7886      fi
7887    fi
7888  fi
7889
7890
7891
7892  if test "x$LS" = x; then
7893    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7894  fi
7895
7896
7897
7898
7899
7900  # Publish this variable in the help.
7901
7902
7903  if test "x$MKDIR" = x; then
7904    # The variable is not set by user, try to locate tool using the code snippet
7905    for ac_prog in mkdir
7906do
7907  # Extract the first word of "$ac_prog", so it can be a program name with args.
7908set dummy $ac_prog; ac_word=$2
7909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7910$as_echo_n "checking for $ac_word... " >&6; }
7911if ${ac_cv_path_MKDIR+:} false; then :
7912  $as_echo_n "(cached) " >&6
7913else
7914  case $MKDIR in
7915  [\\/]* | ?:[\\/]*)
7916  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7917  ;;
7918  *)
7919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7920for as_dir in $PATH
7921do
7922  IFS=$as_save_IFS
7923  test -z "$as_dir" && as_dir=.
7924    for ac_exec_ext in '' $ac_executable_extensions; do
7925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7926    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7928    break 2
7929  fi
7930done
7931  done
7932IFS=$as_save_IFS
7933
7934  ;;
7935esac
7936fi
7937MKDIR=$ac_cv_path_MKDIR
7938if test -n "$MKDIR"; then
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7940$as_echo "$MKDIR" >&6; }
7941else
7942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7943$as_echo "no" >&6; }
7944fi
7945
7946
7947  test -n "$MKDIR" && break
7948done
7949
7950  else
7951    # The variable is set, but is it from the command line or the environment?
7952
7953    # Try to remove the string !MKDIR! from our list.
7954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7956      # If it failed, the variable was not from the command line. Ignore it,
7957      # but warn the user (except for BASH, which is always set by the calling BASH).
7958      if test "xMKDIR" != xBASH; then
7959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
7960$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
7961      fi
7962      # Try to locate tool using the code snippet
7963      for ac_prog in mkdir
7964do
7965  # Extract the first word of "$ac_prog", so it can be a program name with args.
7966set dummy $ac_prog; ac_word=$2
7967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7968$as_echo_n "checking for $ac_word... " >&6; }
7969if ${ac_cv_path_MKDIR+:} false; then :
7970  $as_echo_n "(cached) " >&6
7971else
7972  case $MKDIR in
7973  [\\/]* | ?:[\\/]*)
7974  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7975  ;;
7976  *)
7977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7978for as_dir in $PATH
7979do
7980  IFS=$as_save_IFS
7981  test -z "$as_dir" && as_dir=.
7982    for ac_exec_ext in '' $ac_executable_extensions; do
7983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7984    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7986    break 2
7987  fi
7988done
7989  done
7990IFS=$as_save_IFS
7991
7992  ;;
7993esac
7994fi
7995MKDIR=$ac_cv_path_MKDIR
7996if test -n "$MKDIR"; then
7997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7998$as_echo "$MKDIR" >&6; }
7999else
8000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8001$as_echo "no" >&6; }
8002fi
8003
8004
8005  test -n "$MKDIR" && break
8006done
8007
8008    else
8009      # If it succeeded, then it was overridden by the user. We will use it
8010      # for the tool.
8011
8012      # First remove it from the list of overridden variables, so we can test
8013      # for unknown variables in the end.
8014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8015
8016      # Check if the provided tool contains a complete path.
8017      tool_specified="$MKDIR"
8018      tool_basename="${tool_specified##*/}"
8019      if test "x$tool_basename" = "x$tool_specified"; then
8020        # A command without a complete path is provided, search $PATH.
8021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8022$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8023        # Extract the first word of "$tool_basename", so it can be a program name with args.
8024set dummy $tool_basename; ac_word=$2
8025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8026$as_echo_n "checking for $ac_word... " >&6; }
8027if ${ac_cv_path_MKDIR+:} false; then :
8028  $as_echo_n "(cached) " >&6
8029else
8030  case $MKDIR in
8031  [\\/]* | ?:[\\/]*)
8032  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8033  ;;
8034  *)
8035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8036for as_dir in $PATH
8037do
8038  IFS=$as_save_IFS
8039  test -z "$as_dir" && as_dir=.
8040    for ac_exec_ext in '' $ac_executable_extensions; do
8041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8042    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8044    break 2
8045  fi
8046done
8047  done
8048IFS=$as_save_IFS
8049
8050  ;;
8051esac
8052fi
8053MKDIR=$ac_cv_path_MKDIR
8054if test -n "$MKDIR"; then
8055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8056$as_echo "$MKDIR" >&6; }
8057else
8058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8059$as_echo "no" >&6; }
8060fi
8061
8062
8063        if test "x$MKDIR" = x; then
8064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8065        fi
8066      else
8067        # Otherwise we believe it is a complete path. Use it as it is.
8068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8069$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8071$as_echo_n "checking for MKDIR... " >&6; }
8072        if test ! -x "$tool_specified"; then
8073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8074$as_echo "not found" >&6; }
8075          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8076        fi
8077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8078$as_echo "$tool_specified" >&6; }
8079      fi
8080    fi
8081  fi
8082
8083
8084
8085  if test "x$MKDIR" = x; then
8086    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8087  fi
8088
8089
8090
8091
8092
8093  # Publish this variable in the help.
8094
8095
8096  if test "x$MKTEMP" = x; then
8097    # The variable is not set by user, try to locate tool using the code snippet
8098    for ac_prog in mktemp
8099do
8100  # Extract the first word of "$ac_prog", so it can be a program name with args.
8101set dummy $ac_prog; ac_word=$2
8102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8103$as_echo_n "checking for $ac_word... " >&6; }
8104if ${ac_cv_path_MKTEMP+:} false; then :
8105  $as_echo_n "(cached) " >&6
8106else
8107  case $MKTEMP in
8108  [\\/]* | ?:[\\/]*)
8109  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8110  ;;
8111  *)
8112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8113for as_dir in $PATH
8114do
8115  IFS=$as_save_IFS
8116  test -z "$as_dir" && as_dir=.
8117    for ac_exec_ext in '' $ac_executable_extensions; do
8118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8119    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8121    break 2
8122  fi
8123done
8124  done
8125IFS=$as_save_IFS
8126
8127  ;;
8128esac
8129fi
8130MKTEMP=$ac_cv_path_MKTEMP
8131if test -n "$MKTEMP"; then
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8133$as_echo "$MKTEMP" >&6; }
8134else
8135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8136$as_echo "no" >&6; }
8137fi
8138
8139
8140  test -n "$MKTEMP" && break
8141done
8142
8143  else
8144    # The variable is set, but is it from the command line or the environment?
8145
8146    # Try to remove the string !MKTEMP! from our list.
8147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8149      # If it failed, the variable was not from the command line. Ignore it,
8150      # but warn the user (except for BASH, which is always set by the calling BASH).
8151      if test "xMKTEMP" != xBASH; then
8152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8153$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8154      fi
8155      # Try to locate tool using the code snippet
8156      for ac_prog in mktemp
8157do
8158  # Extract the first word of "$ac_prog", so it can be a program name with args.
8159set dummy $ac_prog; ac_word=$2
8160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8161$as_echo_n "checking for $ac_word... " >&6; }
8162if ${ac_cv_path_MKTEMP+:} false; then :
8163  $as_echo_n "(cached) " >&6
8164else
8165  case $MKTEMP in
8166  [\\/]* | ?:[\\/]*)
8167  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8168  ;;
8169  *)
8170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8171for as_dir in $PATH
8172do
8173  IFS=$as_save_IFS
8174  test -z "$as_dir" && as_dir=.
8175    for ac_exec_ext in '' $ac_executable_extensions; do
8176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8177    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8179    break 2
8180  fi
8181done
8182  done
8183IFS=$as_save_IFS
8184
8185  ;;
8186esac
8187fi
8188MKTEMP=$ac_cv_path_MKTEMP
8189if test -n "$MKTEMP"; then
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8191$as_echo "$MKTEMP" >&6; }
8192else
8193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8194$as_echo "no" >&6; }
8195fi
8196
8197
8198  test -n "$MKTEMP" && break
8199done
8200
8201    else
8202      # If it succeeded, then it was overridden by the user. We will use it
8203      # for the tool.
8204
8205      # First remove it from the list of overridden variables, so we can test
8206      # for unknown variables in the end.
8207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8208
8209      # Check if the provided tool contains a complete path.
8210      tool_specified="$MKTEMP"
8211      tool_basename="${tool_specified##*/}"
8212      if test "x$tool_basename" = "x$tool_specified"; then
8213        # A command without a complete path is provided, search $PATH.
8214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8215$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8216        # Extract the first word of "$tool_basename", so it can be a program name with args.
8217set dummy $tool_basename; ac_word=$2
8218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8219$as_echo_n "checking for $ac_word... " >&6; }
8220if ${ac_cv_path_MKTEMP+:} false; then :
8221  $as_echo_n "(cached) " >&6
8222else
8223  case $MKTEMP in
8224  [\\/]* | ?:[\\/]*)
8225  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8226  ;;
8227  *)
8228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8229for as_dir in $PATH
8230do
8231  IFS=$as_save_IFS
8232  test -z "$as_dir" && as_dir=.
8233    for ac_exec_ext in '' $ac_executable_extensions; do
8234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8235    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8237    break 2
8238  fi
8239done
8240  done
8241IFS=$as_save_IFS
8242
8243  ;;
8244esac
8245fi
8246MKTEMP=$ac_cv_path_MKTEMP
8247if test -n "$MKTEMP"; then
8248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8249$as_echo "$MKTEMP" >&6; }
8250else
8251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8252$as_echo "no" >&6; }
8253fi
8254
8255
8256        if test "x$MKTEMP" = x; then
8257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8258        fi
8259      else
8260        # Otherwise we believe it is a complete path. Use it as it is.
8261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8262$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8264$as_echo_n "checking for MKTEMP... " >&6; }
8265        if test ! -x "$tool_specified"; then
8266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8267$as_echo "not found" >&6; }
8268          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8269        fi
8270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8271$as_echo "$tool_specified" >&6; }
8272      fi
8273    fi
8274  fi
8275
8276
8277
8278  if test "x$MKTEMP" = x; then
8279    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8280  fi
8281
8282
8283
8284
8285
8286  # Publish this variable in the help.
8287
8288
8289  if test "x$MV" = x; then
8290    # The variable is not set by user, try to locate tool using the code snippet
8291    for ac_prog in mv
8292do
8293  # Extract the first word of "$ac_prog", so it can be a program name with args.
8294set dummy $ac_prog; ac_word=$2
8295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8296$as_echo_n "checking for $ac_word... " >&6; }
8297if ${ac_cv_path_MV+:} false; then :
8298  $as_echo_n "(cached) " >&6
8299else
8300  case $MV in
8301  [\\/]* | ?:[\\/]*)
8302  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8303  ;;
8304  *)
8305  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8306for as_dir in $PATH
8307do
8308  IFS=$as_save_IFS
8309  test -z "$as_dir" && as_dir=.
8310    for ac_exec_ext in '' $ac_executable_extensions; do
8311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8312    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8314    break 2
8315  fi
8316done
8317  done
8318IFS=$as_save_IFS
8319
8320  ;;
8321esac
8322fi
8323MV=$ac_cv_path_MV
8324if test -n "$MV"; then
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8326$as_echo "$MV" >&6; }
8327else
8328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8329$as_echo "no" >&6; }
8330fi
8331
8332
8333  test -n "$MV" && break
8334done
8335
8336  else
8337    # The variable is set, but is it from the command line or the environment?
8338
8339    # Try to remove the string !MV! from our list.
8340    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8341    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8342      # If it failed, the variable was not from the command line. Ignore it,
8343      # but warn the user (except for BASH, which is always set by the calling BASH).
8344      if test "xMV" != xBASH; then
8345        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8346$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8347      fi
8348      # Try to locate tool using the code snippet
8349      for ac_prog in mv
8350do
8351  # Extract the first word of "$ac_prog", so it can be a program name with args.
8352set dummy $ac_prog; ac_word=$2
8353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8354$as_echo_n "checking for $ac_word... " >&6; }
8355if ${ac_cv_path_MV+:} false; then :
8356  $as_echo_n "(cached) " >&6
8357else
8358  case $MV in
8359  [\\/]* | ?:[\\/]*)
8360  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8361  ;;
8362  *)
8363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8364for as_dir in $PATH
8365do
8366  IFS=$as_save_IFS
8367  test -z "$as_dir" && as_dir=.
8368    for ac_exec_ext in '' $ac_executable_extensions; do
8369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8370    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8372    break 2
8373  fi
8374done
8375  done
8376IFS=$as_save_IFS
8377
8378  ;;
8379esac
8380fi
8381MV=$ac_cv_path_MV
8382if test -n "$MV"; then
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8384$as_echo "$MV" >&6; }
8385else
8386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8387$as_echo "no" >&6; }
8388fi
8389
8390
8391  test -n "$MV" && break
8392done
8393
8394    else
8395      # If it succeeded, then it was overridden by the user. We will use it
8396      # for the tool.
8397
8398      # First remove it from the list of overridden variables, so we can test
8399      # for unknown variables in the end.
8400      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8401
8402      # Check if the provided tool contains a complete path.
8403      tool_specified="$MV"
8404      tool_basename="${tool_specified##*/}"
8405      if test "x$tool_basename" = "x$tool_specified"; then
8406        # A command without a complete path is provided, search $PATH.
8407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8408$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8409        # Extract the first word of "$tool_basename", so it can be a program name with args.
8410set dummy $tool_basename; ac_word=$2
8411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8412$as_echo_n "checking for $ac_word... " >&6; }
8413if ${ac_cv_path_MV+:} false; then :
8414  $as_echo_n "(cached) " >&6
8415else
8416  case $MV in
8417  [\\/]* | ?:[\\/]*)
8418  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8419  ;;
8420  *)
8421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8422for as_dir in $PATH
8423do
8424  IFS=$as_save_IFS
8425  test -z "$as_dir" && as_dir=.
8426    for ac_exec_ext in '' $ac_executable_extensions; do
8427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8428    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8430    break 2
8431  fi
8432done
8433  done
8434IFS=$as_save_IFS
8435
8436  ;;
8437esac
8438fi
8439MV=$ac_cv_path_MV
8440if test -n "$MV"; then
8441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8442$as_echo "$MV" >&6; }
8443else
8444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8445$as_echo "no" >&6; }
8446fi
8447
8448
8449        if test "x$MV" = x; then
8450          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8451        fi
8452      else
8453        # Otherwise we believe it is a complete path. Use it as it is.
8454        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8455$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8456        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8457$as_echo_n "checking for MV... " >&6; }
8458        if test ! -x "$tool_specified"; then
8459          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8460$as_echo "not found" >&6; }
8461          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8462        fi
8463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8464$as_echo "$tool_specified" >&6; }
8465      fi
8466    fi
8467  fi
8468
8469
8470
8471  if test "x$MV" = x; then
8472    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8473  fi
8474
8475
8476
8477
8478
8479  # Publish this variable in the help.
8480
8481
8482  if test "x$NAWK" = x; then
8483    # The variable is not set by user, try to locate tool using the code snippet
8484    for ac_prog in nawk gawk awk
8485do
8486  # Extract the first word of "$ac_prog", so it can be a program name with args.
8487set dummy $ac_prog; ac_word=$2
8488{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8489$as_echo_n "checking for $ac_word... " >&6; }
8490if ${ac_cv_path_NAWK+:} false; then :
8491  $as_echo_n "(cached) " >&6
8492else
8493  case $NAWK in
8494  [\\/]* | ?:[\\/]*)
8495  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8496  ;;
8497  *)
8498  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8499for as_dir in $PATH
8500do
8501  IFS=$as_save_IFS
8502  test -z "$as_dir" && as_dir=.
8503    for ac_exec_ext in '' $ac_executable_extensions; do
8504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8505    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8507    break 2
8508  fi
8509done
8510  done
8511IFS=$as_save_IFS
8512
8513  ;;
8514esac
8515fi
8516NAWK=$ac_cv_path_NAWK
8517if test -n "$NAWK"; then
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8519$as_echo "$NAWK" >&6; }
8520else
8521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8522$as_echo "no" >&6; }
8523fi
8524
8525
8526  test -n "$NAWK" && break
8527done
8528
8529  else
8530    # The variable is set, but is it from the command line or the environment?
8531
8532    # Try to remove the string !NAWK! from our list.
8533    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8534    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8535      # If it failed, the variable was not from the command line. Ignore it,
8536      # but warn the user (except for BASH, which is always set by the calling BASH).
8537      if test "xNAWK" != xBASH; then
8538        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8539$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8540      fi
8541      # Try to locate tool using the code snippet
8542      for ac_prog in nawk gawk awk
8543do
8544  # Extract the first word of "$ac_prog", so it can be a program name with args.
8545set dummy $ac_prog; ac_word=$2
8546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8547$as_echo_n "checking for $ac_word... " >&6; }
8548if ${ac_cv_path_NAWK+:} false; then :
8549  $as_echo_n "(cached) " >&6
8550else
8551  case $NAWK in
8552  [\\/]* | ?:[\\/]*)
8553  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8554  ;;
8555  *)
8556  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8557for as_dir in $PATH
8558do
8559  IFS=$as_save_IFS
8560  test -z "$as_dir" && as_dir=.
8561    for ac_exec_ext in '' $ac_executable_extensions; do
8562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8563    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8565    break 2
8566  fi
8567done
8568  done
8569IFS=$as_save_IFS
8570
8571  ;;
8572esac
8573fi
8574NAWK=$ac_cv_path_NAWK
8575if test -n "$NAWK"; then
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8577$as_echo "$NAWK" >&6; }
8578else
8579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8580$as_echo "no" >&6; }
8581fi
8582
8583
8584  test -n "$NAWK" && break
8585done
8586
8587    else
8588      # If it succeeded, then it was overridden by the user. We will use it
8589      # for the tool.
8590
8591      # First remove it from the list of overridden variables, so we can test
8592      # for unknown variables in the end.
8593      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8594
8595      # Check if the provided tool contains a complete path.
8596      tool_specified="$NAWK"
8597      tool_basename="${tool_specified##*/}"
8598      if test "x$tool_basename" = "x$tool_specified"; then
8599        # A command without a complete path is provided, search $PATH.
8600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8601$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8602        # Extract the first word of "$tool_basename", so it can be a program name with args.
8603set dummy $tool_basename; ac_word=$2
8604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8605$as_echo_n "checking for $ac_word... " >&6; }
8606if ${ac_cv_path_NAWK+:} false; then :
8607  $as_echo_n "(cached) " >&6
8608else
8609  case $NAWK in
8610  [\\/]* | ?:[\\/]*)
8611  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8612  ;;
8613  *)
8614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8615for as_dir in $PATH
8616do
8617  IFS=$as_save_IFS
8618  test -z "$as_dir" && as_dir=.
8619    for ac_exec_ext in '' $ac_executable_extensions; do
8620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8621    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8623    break 2
8624  fi
8625done
8626  done
8627IFS=$as_save_IFS
8628
8629  ;;
8630esac
8631fi
8632NAWK=$ac_cv_path_NAWK
8633if test -n "$NAWK"; then
8634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8635$as_echo "$NAWK" >&6; }
8636else
8637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8638$as_echo "no" >&6; }
8639fi
8640
8641
8642        if test "x$NAWK" = x; then
8643          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8644        fi
8645      else
8646        # Otherwise we believe it is a complete path. Use it as it is.
8647        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8648$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8649        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8650$as_echo_n "checking for NAWK... " >&6; }
8651        if test ! -x "$tool_specified"; then
8652          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8653$as_echo "not found" >&6; }
8654          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8655        fi
8656        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8657$as_echo "$tool_specified" >&6; }
8658      fi
8659    fi
8660  fi
8661
8662
8663
8664  if test "x$NAWK" = x; then
8665    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8666  fi
8667
8668
8669
8670
8671
8672  # Publish this variable in the help.
8673
8674
8675  if test "x$PRINTF" = x; then
8676    # The variable is not set by user, try to locate tool using the code snippet
8677    for ac_prog in printf
8678do
8679  # Extract the first word of "$ac_prog", so it can be a program name with args.
8680set dummy $ac_prog; ac_word=$2
8681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8682$as_echo_n "checking for $ac_word... " >&6; }
8683if ${ac_cv_path_PRINTF+:} false; then :
8684  $as_echo_n "(cached) " >&6
8685else
8686  case $PRINTF in
8687  [\\/]* | ?:[\\/]*)
8688  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8689  ;;
8690  *)
8691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8692for as_dir in $PATH
8693do
8694  IFS=$as_save_IFS
8695  test -z "$as_dir" && as_dir=.
8696    for ac_exec_ext in '' $ac_executable_extensions; do
8697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8698    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8700    break 2
8701  fi
8702done
8703  done
8704IFS=$as_save_IFS
8705
8706  ;;
8707esac
8708fi
8709PRINTF=$ac_cv_path_PRINTF
8710if test -n "$PRINTF"; then
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8712$as_echo "$PRINTF" >&6; }
8713else
8714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8715$as_echo "no" >&6; }
8716fi
8717
8718
8719  test -n "$PRINTF" && break
8720done
8721
8722  else
8723    # The variable is set, but is it from the command line or the environment?
8724
8725    # Try to remove the string !PRINTF! from our list.
8726    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8727    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8728      # If it failed, the variable was not from the command line. Ignore it,
8729      # but warn the user (except for BASH, which is always set by the calling BASH).
8730      if test "xPRINTF" != xBASH; then
8731        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8732$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8733      fi
8734      # Try to locate tool using the code snippet
8735      for ac_prog in printf
8736do
8737  # Extract the first word of "$ac_prog", so it can be a program name with args.
8738set dummy $ac_prog; ac_word=$2
8739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8740$as_echo_n "checking for $ac_word... " >&6; }
8741if ${ac_cv_path_PRINTF+:} false; then :
8742  $as_echo_n "(cached) " >&6
8743else
8744  case $PRINTF in
8745  [\\/]* | ?:[\\/]*)
8746  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8747  ;;
8748  *)
8749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8750for as_dir in $PATH
8751do
8752  IFS=$as_save_IFS
8753  test -z "$as_dir" && as_dir=.
8754    for ac_exec_ext in '' $ac_executable_extensions; do
8755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8756    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8758    break 2
8759  fi
8760done
8761  done
8762IFS=$as_save_IFS
8763
8764  ;;
8765esac
8766fi
8767PRINTF=$ac_cv_path_PRINTF
8768if test -n "$PRINTF"; then
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8770$as_echo "$PRINTF" >&6; }
8771else
8772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8773$as_echo "no" >&6; }
8774fi
8775
8776
8777  test -n "$PRINTF" && break
8778done
8779
8780    else
8781      # If it succeeded, then it was overridden by the user. We will use it
8782      # for the tool.
8783
8784      # First remove it from the list of overridden variables, so we can test
8785      # for unknown variables in the end.
8786      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8787
8788      # Check if the provided tool contains a complete path.
8789      tool_specified="$PRINTF"
8790      tool_basename="${tool_specified##*/}"
8791      if test "x$tool_basename" = "x$tool_specified"; then
8792        # A command without a complete path is provided, search $PATH.
8793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8794$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8795        # Extract the first word of "$tool_basename", so it can be a program name with args.
8796set dummy $tool_basename; ac_word=$2
8797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8798$as_echo_n "checking for $ac_word... " >&6; }
8799if ${ac_cv_path_PRINTF+:} false; then :
8800  $as_echo_n "(cached) " >&6
8801else
8802  case $PRINTF in
8803  [\\/]* | ?:[\\/]*)
8804  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8805  ;;
8806  *)
8807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8808for as_dir in $PATH
8809do
8810  IFS=$as_save_IFS
8811  test -z "$as_dir" && as_dir=.
8812    for ac_exec_ext in '' $ac_executable_extensions; do
8813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8814    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8816    break 2
8817  fi
8818done
8819  done
8820IFS=$as_save_IFS
8821
8822  ;;
8823esac
8824fi
8825PRINTF=$ac_cv_path_PRINTF
8826if test -n "$PRINTF"; then
8827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8828$as_echo "$PRINTF" >&6; }
8829else
8830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8831$as_echo "no" >&6; }
8832fi
8833
8834
8835        if test "x$PRINTF" = x; then
8836          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8837        fi
8838      else
8839        # Otherwise we believe it is a complete path. Use it as it is.
8840        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8841$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8842        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8843$as_echo_n "checking for PRINTF... " >&6; }
8844        if test ! -x "$tool_specified"; then
8845          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8846$as_echo "not found" >&6; }
8847          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8848        fi
8849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8850$as_echo "$tool_specified" >&6; }
8851      fi
8852    fi
8853  fi
8854
8855
8856
8857  if test "x$PRINTF" = x; then
8858    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8859  fi
8860
8861
8862
8863
8864
8865  # Publish this variable in the help.
8866
8867
8868  if test "x$RM" = x; then
8869    # The variable is not set by user, try to locate tool using the code snippet
8870    for ac_prog in rm
8871do
8872  # Extract the first word of "$ac_prog", so it can be a program name with args.
8873set dummy $ac_prog; ac_word=$2
8874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8875$as_echo_n "checking for $ac_word... " >&6; }
8876if ${ac_cv_path_RM+:} false; then :
8877  $as_echo_n "(cached) " >&6
8878else
8879  case $RM in
8880  [\\/]* | ?:[\\/]*)
8881  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8882  ;;
8883  *)
8884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8885for as_dir in $PATH
8886do
8887  IFS=$as_save_IFS
8888  test -z "$as_dir" && as_dir=.
8889    for ac_exec_ext in '' $ac_executable_extensions; do
8890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8891    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8893    break 2
8894  fi
8895done
8896  done
8897IFS=$as_save_IFS
8898
8899  ;;
8900esac
8901fi
8902RM=$ac_cv_path_RM
8903if test -n "$RM"; then
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8905$as_echo "$RM" >&6; }
8906else
8907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8908$as_echo "no" >&6; }
8909fi
8910
8911
8912  test -n "$RM" && break
8913done
8914
8915  else
8916    # The variable is set, but is it from the command line or the environment?
8917
8918    # Try to remove the string !RM! from our list.
8919    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8920    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8921      # If it failed, the variable was not from the command line. Ignore it,
8922      # but warn the user (except for BASH, which is always set by the calling BASH).
8923      if test "xRM" != xBASH; then
8924        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8925$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8926      fi
8927      # Try to locate tool using the code snippet
8928      for ac_prog in rm
8929do
8930  # Extract the first word of "$ac_prog", so it can be a program name with args.
8931set dummy $ac_prog; ac_word=$2
8932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8933$as_echo_n "checking for $ac_word... " >&6; }
8934if ${ac_cv_path_RM+:} false; then :
8935  $as_echo_n "(cached) " >&6
8936else
8937  case $RM in
8938  [\\/]* | ?:[\\/]*)
8939  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8940  ;;
8941  *)
8942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8943for as_dir in $PATH
8944do
8945  IFS=$as_save_IFS
8946  test -z "$as_dir" && as_dir=.
8947    for ac_exec_ext in '' $ac_executable_extensions; do
8948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8949    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8951    break 2
8952  fi
8953done
8954  done
8955IFS=$as_save_IFS
8956
8957  ;;
8958esac
8959fi
8960RM=$ac_cv_path_RM
8961if test -n "$RM"; then
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8963$as_echo "$RM" >&6; }
8964else
8965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8966$as_echo "no" >&6; }
8967fi
8968
8969
8970  test -n "$RM" && break
8971done
8972
8973    else
8974      # If it succeeded, then it was overridden by the user. We will use it
8975      # for the tool.
8976
8977      # First remove it from the list of overridden variables, so we can test
8978      # for unknown variables in the end.
8979      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8980
8981      # Check if the provided tool contains a complete path.
8982      tool_specified="$RM"
8983      tool_basename="${tool_specified##*/}"
8984      if test "x$tool_basename" = "x$tool_specified"; then
8985        # A command without a complete path is provided, search $PATH.
8986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
8987$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
8988        # Extract the first word of "$tool_basename", so it can be a program name with args.
8989set dummy $tool_basename; ac_word=$2
8990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8991$as_echo_n "checking for $ac_word... " >&6; }
8992if ${ac_cv_path_RM+:} false; then :
8993  $as_echo_n "(cached) " >&6
8994else
8995  case $RM in
8996  [\\/]* | ?:[\\/]*)
8997  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8998  ;;
8999  *)
9000  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9001for as_dir in $PATH
9002do
9003  IFS=$as_save_IFS
9004  test -z "$as_dir" && as_dir=.
9005    for ac_exec_ext in '' $ac_executable_extensions; do
9006  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9007    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9008    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9009    break 2
9010  fi
9011done
9012  done
9013IFS=$as_save_IFS
9014
9015  ;;
9016esac
9017fi
9018RM=$ac_cv_path_RM
9019if test -n "$RM"; then
9020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9021$as_echo "$RM" >&6; }
9022else
9023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9024$as_echo "no" >&6; }
9025fi
9026
9027
9028        if test "x$RM" = x; then
9029          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9030        fi
9031      else
9032        # Otherwise we believe it is a complete path. Use it as it is.
9033        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9034$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9035        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9036$as_echo_n "checking for RM... " >&6; }
9037        if test ! -x "$tool_specified"; then
9038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9039$as_echo "not found" >&6; }
9040          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9041        fi
9042        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9043$as_echo "$tool_specified" >&6; }
9044      fi
9045    fi
9046  fi
9047
9048
9049
9050  if test "x$RM" = x; then
9051    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9052  fi
9053
9054
9055
9056
9057
9058  # Publish this variable in the help.
9059
9060
9061  if test "x$SH" = x; then
9062    # The variable is not set by user, try to locate tool using the code snippet
9063    for ac_prog in sh
9064do
9065  # Extract the first word of "$ac_prog", so it can be a program name with args.
9066set dummy $ac_prog; ac_word=$2
9067{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9068$as_echo_n "checking for $ac_word... " >&6; }
9069if ${ac_cv_path_SH+:} false; then :
9070  $as_echo_n "(cached) " >&6
9071else
9072  case $SH in
9073  [\\/]* | ?:[\\/]*)
9074  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9075  ;;
9076  *)
9077  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9078for as_dir in $PATH
9079do
9080  IFS=$as_save_IFS
9081  test -z "$as_dir" && as_dir=.
9082    for ac_exec_ext in '' $ac_executable_extensions; do
9083  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9084    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9085    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9086    break 2
9087  fi
9088done
9089  done
9090IFS=$as_save_IFS
9091
9092  ;;
9093esac
9094fi
9095SH=$ac_cv_path_SH
9096if test -n "$SH"; then
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9098$as_echo "$SH" >&6; }
9099else
9100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9101$as_echo "no" >&6; }
9102fi
9103
9104
9105  test -n "$SH" && break
9106done
9107
9108  else
9109    # The variable is set, but is it from the command line or the environment?
9110
9111    # Try to remove the string !SH! from our list.
9112    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9113    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9114      # If it failed, the variable was not from the command line. Ignore it,
9115      # but warn the user (except for BASH, which is always set by the calling BASH).
9116      if test "xSH" != xBASH; then
9117        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9118$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9119      fi
9120      # Try to locate tool using the code snippet
9121      for ac_prog in sh
9122do
9123  # Extract the first word of "$ac_prog", so it can be a program name with args.
9124set dummy $ac_prog; ac_word=$2
9125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9126$as_echo_n "checking for $ac_word... " >&6; }
9127if ${ac_cv_path_SH+:} false; then :
9128  $as_echo_n "(cached) " >&6
9129else
9130  case $SH in
9131  [\\/]* | ?:[\\/]*)
9132  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9133  ;;
9134  *)
9135  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9136for as_dir in $PATH
9137do
9138  IFS=$as_save_IFS
9139  test -z "$as_dir" && as_dir=.
9140    for ac_exec_ext in '' $ac_executable_extensions; do
9141  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9142    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9143    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9144    break 2
9145  fi
9146done
9147  done
9148IFS=$as_save_IFS
9149
9150  ;;
9151esac
9152fi
9153SH=$ac_cv_path_SH
9154if test -n "$SH"; then
9155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9156$as_echo "$SH" >&6; }
9157else
9158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9159$as_echo "no" >&6; }
9160fi
9161
9162
9163  test -n "$SH" && break
9164done
9165
9166    else
9167      # If it succeeded, then it was overridden by the user. We will use it
9168      # for the tool.
9169
9170      # First remove it from the list of overridden variables, so we can test
9171      # for unknown variables in the end.
9172      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9173
9174      # Check if the provided tool contains a complete path.
9175      tool_specified="$SH"
9176      tool_basename="${tool_specified##*/}"
9177      if test "x$tool_basename" = "x$tool_specified"; then
9178        # A command without a complete path is provided, search $PATH.
9179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9180$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9181        # Extract the first word of "$tool_basename", so it can be a program name with args.
9182set dummy $tool_basename; ac_word=$2
9183{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9184$as_echo_n "checking for $ac_word... " >&6; }
9185if ${ac_cv_path_SH+:} false; then :
9186  $as_echo_n "(cached) " >&6
9187else
9188  case $SH in
9189  [\\/]* | ?:[\\/]*)
9190  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9191  ;;
9192  *)
9193  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9194for as_dir in $PATH
9195do
9196  IFS=$as_save_IFS
9197  test -z "$as_dir" && as_dir=.
9198    for ac_exec_ext in '' $ac_executable_extensions; do
9199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9200    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9202    break 2
9203  fi
9204done
9205  done
9206IFS=$as_save_IFS
9207
9208  ;;
9209esac
9210fi
9211SH=$ac_cv_path_SH
9212if test -n "$SH"; then
9213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9214$as_echo "$SH" >&6; }
9215else
9216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9217$as_echo "no" >&6; }
9218fi
9219
9220
9221        if test "x$SH" = x; then
9222          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9223        fi
9224      else
9225        # Otherwise we believe it is a complete path. Use it as it is.
9226        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9227$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9228        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9229$as_echo_n "checking for SH... " >&6; }
9230        if test ! -x "$tool_specified"; then
9231          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9232$as_echo "not found" >&6; }
9233          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9234        fi
9235        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9236$as_echo "$tool_specified" >&6; }
9237      fi
9238    fi
9239  fi
9240
9241
9242
9243  if test "x$SH" = x; then
9244    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9245  fi
9246
9247
9248
9249
9250
9251  # Publish this variable in the help.
9252
9253
9254  if test "x$SORT" = x; then
9255    # The variable is not set by user, try to locate tool using the code snippet
9256    for ac_prog in sort
9257do
9258  # Extract the first word of "$ac_prog", so it can be a program name with args.
9259set dummy $ac_prog; ac_word=$2
9260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9261$as_echo_n "checking for $ac_word... " >&6; }
9262if ${ac_cv_path_SORT+:} false; then :
9263  $as_echo_n "(cached) " >&6
9264else
9265  case $SORT in
9266  [\\/]* | ?:[\\/]*)
9267  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9268  ;;
9269  *)
9270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9271for as_dir in $PATH
9272do
9273  IFS=$as_save_IFS
9274  test -z "$as_dir" && as_dir=.
9275    for ac_exec_ext in '' $ac_executable_extensions; do
9276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9277    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9279    break 2
9280  fi
9281done
9282  done
9283IFS=$as_save_IFS
9284
9285  ;;
9286esac
9287fi
9288SORT=$ac_cv_path_SORT
9289if test -n "$SORT"; then
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9291$as_echo "$SORT" >&6; }
9292else
9293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9294$as_echo "no" >&6; }
9295fi
9296
9297
9298  test -n "$SORT" && break
9299done
9300
9301  else
9302    # The variable is set, but is it from the command line or the environment?
9303
9304    # Try to remove the string !SORT! from our list.
9305    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9306    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9307      # If it failed, the variable was not from the command line. Ignore it,
9308      # but warn the user (except for BASH, which is always set by the calling BASH).
9309      if test "xSORT" != xBASH; then
9310        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9311$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9312      fi
9313      # Try to locate tool using the code snippet
9314      for ac_prog in sort
9315do
9316  # Extract the first word of "$ac_prog", so it can be a program name with args.
9317set dummy $ac_prog; ac_word=$2
9318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9319$as_echo_n "checking for $ac_word... " >&6; }
9320if ${ac_cv_path_SORT+:} false; then :
9321  $as_echo_n "(cached) " >&6
9322else
9323  case $SORT in
9324  [\\/]* | ?:[\\/]*)
9325  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9326  ;;
9327  *)
9328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9329for as_dir in $PATH
9330do
9331  IFS=$as_save_IFS
9332  test -z "$as_dir" && as_dir=.
9333    for ac_exec_ext in '' $ac_executable_extensions; do
9334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9335    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9337    break 2
9338  fi
9339done
9340  done
9341IFS=$as_save_IFS
9342
9343  ;;
9344esac
9345fi
9346SORT=$ac_cv_path_SORT
9347if test -n "$SORT"; then
9348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9349$as_echo "$SORT" >&6; }
9350else
9351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9352$as_echo "no" >&6; }
9353fi
9354
9355
9356  test -n "$SORT" && break
9357done
9358
9359    else
9360      # If it succeeded, then it was overridden by the user. We will use it
9361      # for the tool.
9362
9363      # First remove it from the list of overridden variables, so we can test
9364      # for unknown variables in the end.
9365      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9366
9367      # Check if the provided tool contains a complete path.
9368      tool_specified="$SORT"
9369      tool_basename="${tool_specified##*/}"
9370      if test "x$tool_basename" = "x$tool_specified"; then
9371        # A command without a complete path is provided, search $PATH.
9372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9373$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9374        # Extract the first word of "$tool_basename", so it can be a program name with args.
9375set dummy $tool_basename; ac_word=$2
9376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9377$as_echo_n "checking for $ac_word... " >&6; }
9378if ${ac_cv_path_SORT+:} false; then :
9379  $as_echo_n "(cached) " >&6
9380else
9381  case $SORT in
9382  [\\/]* | ?:[\\/]*)
9383  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9384  ;;
9385  *)
9386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9387for as_dir in $PATH
9388do
9389  IFS=$as_save_IFS
9390  test -z "$as_dir" && as_dir=.
9391    for ac_exec_ext in '' $ac_executable_extensions; do
9392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9393    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9395    break 2
9396  fi
9397done
9398  done
9399IFS=$as_save_IFS
9400
9401  ;;
9402esac
9403fi
9404SORT=$ac_cv_path_SORT
9405if test -n "$SORT"; then
9406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9407$as_echo "$SORT" >&6; }
9408else
9409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9410$as_echo "no" >&6; }
9411fi
9412
9413
9414        if test "x$SORT" = x; then
9415          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9416        fi
9417      else
9418        # Otherwise we believe it is a complete path. Use it as it is.
9419        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9420$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9421        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9422$as_echo_n "checking for SORT... " >&6; }
9423        if test ! -x "$tool_specified"; then
9424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9425$as_echo "not found" >&6; }
9426          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9427        fi
9428        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9429$as_echo "$tool_specified" >&6; }
9430      fi
9431    fi
9432  fi
9433
9434
9435
9436  if test "x$SORT" = x; then
9437    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9438  fi
9439
9440
9441
9442
9443
9444  # Publish this variable in the help.
9445
9446
9447  if test "x$TAIL" = x; then
9448    # The variable is not set by user, try to locate tool using the code snippet
9449    for ac_prog in tail
9450do
9451  # Extract the first word of "$ac_prog", so it can be a program name with args.
9452set dummy $ac_prog; ac_word=$2
9453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9454$as_echo_n "checking for $ac_word... " >&6; }
9455if ${ac_cv_path_TAIL+:} false; then :
9456  $as_echo_n "(cached) " >&6
9457else
9458  case $TAIL in
9459  [\\/]* | ?:[\\/]*)
9460  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9461  ;;
9462  *)
9463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9464for as_dir in $PATH
9465do
9466  IFS=$as_save_IFS
9467  test -z "$as_dir" && as_dir=.
9468    for ac_exec_ext in '' $ac_executable_extensions; do
9469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9470    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9472    break 2
9473  fi
9474done
9475  done
9476IFS=$as_save_IFS
9477
9478  ;;
9479esac
9480fi
9481TAIL=$ac_cv_path_TAIL
9482if test -n "$TAIL"; then
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9484$as_echo "$TAIL" >&6; }
9485else
9486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9487$as_echo "no" >&6; }
9488fi
9489
9490
9491  test -n "$TAIL" && break
9492done
9493
9494  else
9495    # The variable is set, but is it from the command line or the environment?
9496
9497    # Try to remove the string !TAIL! from our list.
9498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9500      # If it failed, the variable was not from the command line. Ignore it,
9501      # but warn the user (except for BASH, which is always set by the calling BASH).
9502      if test "xTAIL" != xBASH; then
9503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9504$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9505      fi
9506      # Try to locate tool using the code snippet
9507      for ac_prog in tail
9508do
9509  # Extract the first word of "$ac_prog", so it can be a program name with args.
9510set dummy $ac_prog; ac_word=$2
9511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9512$as_echo_n "checking for $ac_word... " >&6; }
9513if ${ac_cv_path_TAIL+:} false; then :
9514  $as_echo_n "(cached) " >&6
9515else
9516  case $TAIL in
9517  [\\/]* | ?:[\\/]*)
9518  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9519  ;;
9520  *)
9521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9522for as_dir in $PATH
9523do
9524  IFS=$as_save_IFS
9525  test -z "$as_dir" && as_dir=.
9526    for ac_exec_ext in '' $ac_executable_extensions; do
9527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9528    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9530    break 2
9531  fi
9532done
9533  done
9534IFS=$as_save_IFS
9535
9536  ;;
9537esac
9538fi
9539TAIL=$ac_cv_path_TAIL
9540if test -n "$TAIL"; then
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9542$as_echo "$TAIL" >&6; }
9543else
9544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9545$as_echo "no" >&6; }
9546fi
9547
9548
9549  test -n "$TAIL" && break
9550done
9551
9552    else
9553      # If it succeeded, then it was overridden by the user. We will use it
9554      # for the tool.
9555
9556      # First remove it from the list of overridden variables, so we can test
9557      # for unknown variables in the end.
9558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9559
9560      # Check if the provided tool contains a complete path.
9561      tool_specified="$TAIL"
9562      tool_basename="${tool_specified##*/}"
9563      if test "x$tool_basename" = "x$tool_specified"; then
9564        # A command without a complete path is provided, search $PATH.
9565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9566$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9567        # Extract the first word of "$tool_basename", so it can be a program name with args.
9568set dummy $tool_basename; ac_word=$2
9569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9570$as_echo_n "checking for $ac_word... " >&6; }
9571if ${ac_cv_path_TAIL+:} false; then :
9572  $as_echo_n "(cached) " >&6
9573else
9574  case $TAIL in
9575  [\\/]* | ?:[\\/]*)
9576  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9577  ;;
9578  *)
9579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9580for as_dir in $PATH
9581do
9582  IFS=$as_save_IFS
9583  test -z "$as_dir" && as_dir=.
9584    for ac_exec_ext in '' $ac_executable_extensions; do
9585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9586    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9588    break 2
9589  fi
9590done
9591  done
9592IFS=$as_save_IFS
9593
9594  ;;
9595esac
9596fi
9597TAIL=$ac_cv_path_TAIL
9598if test -n "$TAIL"; then
9599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9600$as_echo "$TAIL" >&6; }
9601else
9602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9603$as_echo "no" >&6; }
9604fi
9605
9606
9607        if test "x$TAIL" = x; then
9608          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9609        fi
9610      else
9611        # Otherwise we believe it is a complete path. Use it as it is.
9612        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9613$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9614        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9615$as_echo_n "checking for TAIL... " >&6; }
9616        if test ! -x "$tool_specified"; then
9617          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9618$as_echo "not found" >&6; }
9619          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9620        fi
9621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9622$as_echo "$tool_specified" >&6; }
9623      fi
9624    fi
9625  fi
9626
9627
9628
9629  if test "x$TAIL" = x; then
9630    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9631  fi
9632
9633
9634
9635
9636
9637  # Publish this variable in the help.
9638
9639
9640  if test "x$TAR" = x; then
9641    # The variable is not set by user, try to locate tool using the code snippet
9642    for ac_prog in tar
9643do
9644  # Extract the first word of "$ac_prog", so it can be a program name with args.
9645set dummy $ac_prog; ac_word=$2
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9647$as_echo_n "checking for $ac_word... " >&6; }
9648if ${ac_cv_path_TAR+:} false; then :
9649  $as_echo_n "(cached) " >&6
9650else
9651  case $TAR in
9652  [\\/]* | ?:[\\/]*)
9653  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9654  ;;
9655  *)
9656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9657for as_dir in $PATH
9658do
9659  IFS=$as_save_IFS
9660  test -z "$as_dir" && as_dir=.
9661    for ac_exec_ext in '' $ac_executable_extensions; do
9662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9663    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9665    break 2
9666  fi
9667done
9668  done
9669IFS=$as_save_IFS
9670
9671  ;;
9672esac
9673fi
9674TAR=$ac_cv_path_TAR
9675if test -n "$TAR"; then
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9677$as_echo "$TAR" >&6; }
9678else
9679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9680$as_echo "no" >&6; }
9681fi
9682
9683
9684  test -n "$TAR" && break
9685done
9686
9687  else
9688    # The variable is set, but is it from the command line or the environment?
9689
9690    # Try to remove the string !TAR! from our list.
9691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9693      # If it failed, the variable was not from the command line. Ignore it,
9694      # but warn the user (except for BASH, which is always set by the calling BASH).
9695      if test "xTAR" != xBASH; then
9696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9697$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9698      fi
9699      # Try to locate tool using the code snippet
9700      for ac_prog in tar
9701do
9702  # Extract the first word of "$ac_prog", so it can be a program name with args.
9703set dummy $ac_prog; ac_word=$2
9704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9705$as_echo_n "checking for $ac_word... " >&6; }
9706if ${ac_cv_path_TAR+:} false; then :
9707  $as_echo_n "(cached) " >&6
9708else
9709  case $TAR in
9710  [\\/]* | ?:[\\/]*)
9711  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9712  ;;
9713  *)
9714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9715for as_dir in $PATH
9716do
9717  IFS=$as_save_IFS
9718  test -z "$as_dir" && as_dir=.
9719    for ac_exec_ext in '' $ac_executable_extensions; do
9720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9721    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9723    break 2
9724  fi
9725done
9726  done
9727IFS=$as_save_IFS
9728
9729  ;;
9730esac
9731fi
9732TAR=$ac_cv_path_TAR
9733if test -n "$TAR"; then
9734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9735$as_echo "$TAR" >&6; }
9736else
9737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9738$as_echo "no" >&6; }
9739fi
9740
9741
9742  test -n "$TAR" && break
9743done
9744
9745    else
9746      # If it succeeded, then it was overridden by the user. We will use it
9747      # for the tool.
9748
9749      # First remove it from the list of overridden variables, so we can test
9750      # for unknown variables in the end.
9751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9752
9753      # Check if the provided tool contains a complete path.
9754      tool_specified="$TAR"
9755      tool_basename="${tool_specified##*/}"
9756      if test "x$tool_basename" = "x$tool_specified"; then
9757        # A command without a complete path is provided, search $PATH.
9758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9759$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9760        # Extract the first word of "$tool_basename", so it can be a program name with args.
9761set dummy $tool_basename; ac_word=$2
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9763$as_echo_n "checking for $ac_word... " >&6; }
9764if ${ac_cv_path_TAR+:} false; then :
9765  $as_echo_n "(cached) " >&6
9766else
9767  case $TAR in
9768  [\\/]* | ?:[\\/]*)
9769  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9770  ;;
9771  *)
9772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9773for as_dir in $PATH
9774do
9775  IFS=$as_save_IFS
9776  test -z "$as_dir" && as_dir=.
9777    for ac_exec_ext in '' $ac_executable_extensions; do
9778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9779    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9781    break 2
9782  fi
9783done
9784  done
9785IFS=$as_save_IFS
9786
9787  ;;
9788esac
9789fi
9790TAR=$ac_cv_path_TAR
9791if test -n "$TAR"; then
9792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9793$as_echo "$TAR" >&6; }
9794else
9795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796$as_echo "no" >&6; }
9797fi
9798
9799
9800        if test "x$TAR" = x; then
9801          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9802        fi
9803      else
9804        # Otherwise we believe it is a complete path. Use it as it is.
9805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9806$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9808$as_echo_n "checking for TAR... " >&6; }
9809        if test ! -x "$tool_specified"; then
9810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9811$as_echo "not found" >&6; }
9812          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9813        fi
9814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9815$as_echo "$tool_specified" >&6; }
9816      fi
9817    fi
9818  fi
9819
9820
9821
9822  if test "x$TAR" = x; then
9823    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9824  fi
9825
9826
9827
9828
9829
9830  # Publish this variable in the help.
9831
9832
9833  if test "x$TEE" = x; then
9834    # The variable is not set by user, try to locate tool using the code snippet
9835    for ac_prog in tee
9836do
9837  # Extract the first word of "$ac_prog", so it can be a program name with args.
9838set dummy $ac_prog; ac_word=$2
9839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9840$as_echo_n "checking for $ac_word... " >&6; }
9841if ${ac_cv_path_TEE+:} false; then :
9842  $as_echo_n "(cached) " >&6
9843else
9844  case $TEE in
9845  [\\/]* | ?:[\\/]*)
9846  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9847  ;;
9848  *)
9849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9850for as_dir in $PATH
9851do
9852  IFS=$as_save_IFS
9853  test -z "$as_dir" && as_dir=.
9854    for ac_exec_ext in '' $ac_executable_extensions; do
9855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9856    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9858    break 2
9859  fi
9860done
9861  done
9862IFS=$as_save_IFS
9863
9864  ;;
9865esac
9866fi
9867TEE=$ac_cv_path_TEE
9868if test -n "$TEE"; then
9869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9870$as_echo "$TEE" >&6; }
9871else
9872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9873$as_echo "no" >&6; }
9874fi
9875
9876
9877  test -n "$TEE" && break
9878done
9879
9880  else
9881    # The variable is set, but is it from the command line or the environment?
9882
9883    # Try to remove the string !TEE! from our list.
9884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9886      # If it failed, the variable was not from the command line. Ignore it,
9887      # but warn the user (except for BASH, which is always set by the calling BASH).
9888      if test "xTEE" != xBASH; then
9889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9890$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9891      fi
9892      # Try to locate tool using the code snippet
9893      for ac_prog in tee
9894do
9895  # Extract the first word of "$ac_prog", so it can be a program name with args.
9896set dummy $ac_prog; ac_word=$2
9897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9898$as_echo_n "checking for $ac_word... " >&6; }
9899if ${ac_cv_path_TEE+:} false; then :
9900  $as_echo_n "(cached) " >&6
9901else
9902  case $TEE in
9903  [\\/]* | ?:[\\/]*)
9904  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9905  ;;
9906  *)
9907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9908for as_dir in $PATH
9909do
9910  IFS=$as_save_IFS
9911  test -z "$as_dir" && as_dir=.
9912    for ac_exec_ext in '' $ac_executable_extensions; do
9913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9914    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9916    break 2
9917  fi
9918done
9919  done
9920IFS=$as_save_IFS
9921
9922  ;;
9923esac
9924fi
9925TEE=$ac_cv_path_TEE
9926if test -n "$TEE"; then
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9928$as_echo "$TEE" >&6; }
9929else
9930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9931$as_echo "no" >&6; }
9932fi
9933
9934
9935  test -n "$TEE" && break
9936done
9937
9938    else
9939      # If it succeeded, then it was overridden by the user. We will use it
9940      # for the tool.
9941
9942      # First remove it from the list of overridden variables, so we can test
9943      # for unknown variables in the end.
9944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9945
9946      # Check if the provided tool contains a complete path.
9947      tool_specified="$TEE"
9948      tool_basename="${tool_specified##*/}"
9949      if test "x$tool_basename" = "x$tool_specified"; then
9950        # A command without a complete path is provided, search $PATH.
9951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9952$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9953        # Extract the first word of "$tool_basename", so it can be a program name with args.
9954set dummy $tool_basename; ac_word=$2
9955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9956$as_echo_n "checking for $ac_word... " >&6; }
9957if ${ac_cv_path_TEE+:} false; then :
9958  $as_echo_n "(cached) " >&6
9959else
9960  case $TEE in
9961  [\\/]* | ?:[\\/]*)
9962  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9963  ;;
9964  *)
9965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9966for as_dir in $PATH
9967do
9968  IFS=$as_save_IFS
9969  test -z "$as_dir" && as_dir=.
9970    for ac_exec_ext in '' $ac_executable_extensions; do
9971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9972    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9974    break 2
9975  fi
9976done
9977  done
9978IFS=$as_save_IFS
9979
9980  ;;
9981esac
9982fi
9983TEE=$ac_cv_path_TEE
9984if test -n "$TEE"; then
9985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9986$as_echo "$TEE" >&6; }
9987else
9988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9989$as_echo "no" >&6; }
9990fi
9991
9992
9993        if test "x$TEE" = x; then
9994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9995        fi
9996      else
9997        # Otherwise we believe it is a complete path. Use it as it is.
9998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
9999$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10001$as_echo_n "checking for TEE... " >&6; }
10002        if test ! -x "$tool_specified"; then
10003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10004$as_echo "not found" >&6; }
10005          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10006        fi
10007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10008$as_echo "$tool_specified" >&6; }
10009      fi
10010    fi
10011  fi
10012
10013
10014
10015  if test "x$TEE" = x; then
10016    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10017  fi
10018
10019
10020
10021
10022
10023  # Publish this variable in the help.
10024
10025
10026  if test "x$TOUCH" = x; then
10027    # The variable is not set by user, try to locate tool using the code snippet
10028    for ac_prog in touch
10029do
10030  # Extract the first word of "$ac_prog", so it can be a program name with args.
10031set dummy $ac_prog; ac_word=$2
10032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10033$as_echo_n "checking for $ac_word... " >&6; }
10034if ${ac_cv_path_TOUCH+:} false; then :
10035  $as_echo_n "(cached) " >&6
10036else
10037  case $TOUCH in
10038  [\\/]* | ?:[\\/]*)
10039  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10040  ;;
10041  *)
10042  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10043for as_dir in $PATH
10044do
10045  IFS=$as_save_IFS
10046  test -z "$as_dir" && as_dir=.
10047    for ac_exec_ext in '' $ac_executable_extensions; do
10048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10049    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10051    break 2
10052  fi
10053done
10054  done
10055IFS=$as_save_IFS
10056
10057  ;;
10058esac
10059fi
10060TOUCH=$ac_cv_path_TOUCH
10061if test -n "$TOUCH"; then
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10063$as_echo "$TOUCH" >&6; }
10064else
10065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10066$as_echo "no" >&6; }
10067fi
10068
10069
10070  test -n "$TOUCH" && break
10071done
10072
10073  else
10074    # The variable is set, but is it from the command line or the environment?
10075
10076    # Try to remove the string !TOUCH! from our list.
10077    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10078    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10079      # If it failed, the variable was not from the command line. Ignore it,
10080      # but warn the user (except for BASH, which is always set by the calling BASH).
10081      if test "xTOUCH" != xBASH; then
10082        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10083$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10084      fi
10085      # Try to locate tool using the code snippet
10086      for ac_prog in touch
10087do
10088  # Extract the first word of "$ac_prog", so it can be a program name with args.
10089set dummy $ac_prog; ac_word=$2
10090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10091$as_echo_n "checking for $ac_word... " >&6; }
10092if ${ac_cv_path_TOUCH+:} false; then :
10093  $as_echo_n "(cached) " >&6
10094else
10095  case $TOUCH in
10096  [\\/]* | ?:[\\/]*)
10097  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10098  ;;
10099  *)
10100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10101for as_dir in $PATH
10102do
10103  IFS=$as_save_IFS
10104  test -z "$as_dir" && as_dir=.
10105    for ac_exec_ext in '' $ac_executable_extensions; do
10106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10107    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10109    break 2
10110  fi
10111done
10112  done
10113IFS=$as_save_IFS
10114
10115  ;;
10116esac
10117fi
10118TOUCH=$ac_cv_path_TOUCH
10119if test -n "$TOUCH"; then
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10121$as_echo "$TOUCH" >&6; }
10122else
10123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10124$as_echo "no" >&6; }
10125fi
10126
10127
10128  test -n "$TOUCH" && break
10129done
10130
10131    else
10132      # If it succeeded, then it was overridden by the user. We will use it
10133      # for the tool.
10134
10135      # First remove it from the list of overridden variables, so we can test
10136      # for unknown variables in the end.
10137      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10138
10139      # Check if the provided tool contains a complete path.
10140      tool_specified="$TOUCH"
10141      tool_basename="${tool_specified##*/}"
10142      if test "x$tool_basename" = "x$tool_specified"; then
10143        # A command without a complete path is provided, search $PATH.
10144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10145$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10146        # Extract the first word of "$tool_basename", so it can be a program name with args.
10147set dummy $tool_basename; ac_word=$2
10148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10149$as_echo_n "checking for $ac_word... " >&6; }
10150if ${ac_cv_path_TOUCH+:} false; then :
10151  $as_echo_n "(cached) " >&6
10152else
10153  case $TOUCH in
10154  [\\/]* | ?:[\\/]*)
10155  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10156  ;;
10157  *)
10158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10159for as_dir in $PATH
10160do
10161  IFS=$as_save_IFS
10162  test -z "$as_dir" && as_dir=.
10163    for ac_exec_ext in '' $ac_executable_extensions; do
10164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10165    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10167    break 2
10168  fi
10169done
10170  done
10171IFS=$as_save_IFS
10172
10173  ;;
10174esac
10175fi
10176TOUCH=$ac_cv_path_TOUCH
10177if test -n "$TOUCH"; then
10178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10179$as_echo "$TOUCH" >&6; }
10180else
10181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10182$as_echo "no" >&6; }
10183fi
10184
10185
10186        if test "x$TOUCH" = x; then
10187          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10188        fi
10189      else
10190        # Otherwise we believe it is a complete path. Use it as it is.
10191        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10192$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10194$as_echo_n "checking for TOUCH... " >&6; }
10195        if test ! -x "$tool_specified"; then
10196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10197$as_echo "not found" >&6; }
10198          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10199        fi
10200        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10201$as_echo "$tool_specified" >&6; }
10202      fi
10203    fi
10204  fi
10205
10206
10207
10208  if test "x$TOUCH" = x; then
10209    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10210  fi
10211
10212
10213
10214
10215
10216  # Publish this variable in the help.
10217
10218
10219  if test "x$TR" = x; then
10220    # The variable is not set by user, try to locate tool using the code snippet
10221    for ac_prog in tr
10222do
10223  # Extract the first word of "$ac_prog", so it can be a program name with args.
10224set dummy $ac_prog; ac_word=$2
10225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10226$as_echo_n "checking for $ac_word... " >&6; }
10227if ${ac_cv_path_TR+:} false; then :
10228  $as_echo_n "(cached) " >&6
10229else
10230  case $TR in
10231  [\\/]* | ?:[\\/]*)
10232  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10233  ;;
10234  *)
10235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10236for as_dir in $PATH
10237do
10238  IFS=$as_save_IFS
10239  test -z "$as_dir" && as_dir=.
10240    for ac_exec_ext in '' $ac_executable_extensions; do
10241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10242    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10244    break 2
10245  fi
10246done
10247  done
10248IFS=$as_save_IFS
10249
10250  ;;
10251esac
10252fi
10253TR=$ac_cv_path_TR
10254if test -n "$TR"; then
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10256$as_echo "$TR" >&6; }
10257else
10258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10259$as_echo "no" >&6; }
10260fi
10261
10262
10263  test -n "$TR" && break
10264done
10265
10266  else
10267    # The variable is set, but is it from the command line or the environment?
10268
10269    # Try to remove the string !TR! from our list.
10270    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10271    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10272      # If it failed, the variable was not from the command line. Ignore it,
10273      # but warn the user (except for BASH, which is always set by the calling BASH).
10274      if test "xTR" != xBASH; then
10275        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10276$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10277      fi
10278      # Try to locate tool using the code snippet
10279      for ac_prog in tr
10280do
10281  # Extract the first word of "$ac_prog", so it can be a program name with args.
10282set dummy $ac_prog; ac_word=$2
10283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10284$as_echo_n "checking for $ac_word... " >&6; }
10285if ${ac_cv_path_TR+:} false; then :
10286  $as_echo_n "(cached) " >&6
10287else
10288  case $TR in
10289  [\\/]* | ?:[\\/]*)
10290  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10291  ;;
10292  *)
10293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10294for as_dir in $PATH
10295do
10296  IFS=$as_save_IFS
10297  test -z "$as_dir" && as_dir=.
10298    for ac_exec_ext in '' $ac_executable_extensions; do
10299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10300    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10302    break 2
10303  fi
10304done
10305  done
10306IFS=$as_save_IFS
10307
10308  ;;
10309esac
10310fi
10311TR=$ac_cv_path_TR
10312if test -n "$TR"; then
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10314$as_echo "$TR" >&6; }
10315else
10316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317$as_echo "no" >&6; }
10318fi
10319
10320
10321  test -n "$TR" && break
10322done
10323
10324    else
10325      # If it succeeded, then it was overridden by the user. We will use it
10326      # for the tool.
10327
10328      # First remove it from the list of overridden variables, so we can test
10329      # for unknown variables in the end.
10330      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10331
10332      # Check if the provided tool contains a complete path.
10333      tool_specified="$TR"
10334      tool_basename="${tool_specified##*/}"
10335      if test "x$tool_basename" = "x$tool_specified"; then
10336        # A command without a complete path is provided, search $PATH.
10337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10338$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10339        # Extract the first word of "$tool_basename", so it can be a program name with args.
10340set dummy $tool_basename; ac_word=$2
10341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10342$as_echo_n "checking for $ac_word... " >&6; }
10343if ${ac_cv_path_TR+:} false; then :
10344  $as_echo_n "(cached) " >&6
10345else
10346  case $TR in
10347  [\\/]* | ?:[\\/]*)
10348  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10349  ;;
10350  *)
10351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10352for as_dir in $PATH
10353do
10354  IFS=$as_save_IFS
10355  test -z "$as_dir" && as_dir=.
10356    for ac_exec_ext in '' $ac_executable_extensions; do
10357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10358    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10360    break 2
10361  fi
10362done
10363  done
10364IFS=$as_save_IFS
10365
10366  ;;
10367esac
10368fi
10369TR=$ac_cv_path_TR
10370if test -n "$TR"; then
10371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10372$as_echo "$TR" >&6; }
10373else
10374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10375$as_echo "no" >&6; }
10376fi
10377
10378
10379        if test "x$TR" = x; then
10380          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10381        fi
10382      else
10383        # Otherwise we believe it is a complete path. Use it as it is.
10384        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10385$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10386        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10387$as_echo_n "checking for TR... " >&6; }
10388        if test ! -x "$tool_specified"; then
10389          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10390$as_echo "not found" >&6; }
10391          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10392        fi
10393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10394$as_echo "$tool_specified" >&6; }
10395      fi
10396    fi
10397  fi
10398
10399
10400
10401  if test "x$TR" = x; then
10402    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10403  fi
10404
10405
10406
10407
10408
10409  # Publish this variable in the help.
10410
10411
10412  if test "x$UNAME" = x; then
10413    # The variable is not set by user, try to locate tool using the code snippet
10414    for ac_prog in uname
10415do
10416  # Extract the first word of "$ac_prog", so it can be a program name with args.
10417set dummy $ac_prog; ac_word=$2
10418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10419$as_echo_n "checking for $ac_word... " >&6; }
10420if ${ac_cv_path_UNAME+:} false; then :
10421  $as_echo_n "(cached) " >&6
10422else
10423  case $UNAME in
10424  [\\/]* | ?:[\\/]*)
10425  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10426  ;;
10427  *)
10428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10429for as_dir in $PATH
10430do
10431  IFS=$as_save_IFS
10432  test -z "$as_dir" && as_dir=.
10433    for ac_exec_ext in '' $ac_executable_extensions; do
10434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10435    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10437    break 2
10438  fi
10439done
10440  done
10441IFS=$as_save_IFS
10442
10443  ;;
10444esac
10445fi
10446UNAME=$ac_cv_path_UNAME
10447if test -n "$UNAME"; then
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10449$as_echo "$UNAME" >&6; }
10450else
10451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10452$as_echo "no" >&6; }
10453fi
10454
10455
10456  test -n "$UNAME" && break
10457done
10458
10459  else
10460    # The variable is set, but is it from the command line or the environment?
10461
10462    # Try to remove the string !UNAME! from our list.
10463    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10464    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10465      # If it failed, the variable was not from the command line. Ignore it,
10466      # but warn the user (except for BASH, which is always set by the calling BASH).
10467      if test "xUNAME" != xBASH; then
10468        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10469$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10470      fi
10471      # Try to locate tool using the code snippet
10472      for ac_prog in uname
10473do
10474  # Extract the first word of "$ac_prog", so it can be a program name with args.
10475set dummy $ac_prog; ac_word=$2
10476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10477$as_echo_n "checking for $ac_word... " >&6; }
10478if ${ac_cv_path_UNAME+:} false; then :
10479  $as_echo_n "(cached) " >&6
10480else
10481  case $UNAME in
10482  [\\/]* | ?:[\\/]*)
10483  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10484  ;;
10485  *)
10486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10487for as_dir in $PATH
10488do
10489  IFS=$as_save_IFS
10490  test -z "$as_dir" && as_dir=.
10491    for ac_exec_ext in '' $ac_executable_extensions; do
10492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10493    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10495    break 2
10496  fi
10497done
10498  done
10499IFS=$as_save_IFS
10500
10501  ;;
10502esac
10503fi
10504UNAME=$ac_cv_path_UNAME
10505if test -n "$UNAME"; then
10506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10507$as_echo "$UNAME" >&6; }
10508else
10509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10510$as_echo "no" >&6; }
10511fi
10512
10513
10514  test -n "$UNAME" && break
10515done
10516
10517    else
10518      # If it succeeded, then it was overridden by the user. We will use it
10519      # for the tool.
10520
10521      # First remove it from the list of overridden variables, so we can test
10522      # for unknown variables in the end.
10523      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10524
10525      # Check if the provided tool contains a complete path.
10526      tool_specified="$UNAME"
10527      tool_basename="${tool_specified##*/}"
10528      if test "x$tool_basename" = "x$tool_specified"; then
10529        # A command without a complete path is provided, search $PATH.
10530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10531$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10532        # Extract the first word of "$tool_basename", so it can be a program name with args.
10533set dummy $tool_basename; ac_word=$2
10534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10535$as_echo_n "checking for $ac_word... " >&6; }
10536if ${ac_cv_path_UNAME+:} false; then :
10537  $as_echo_n "(cached) " >&6
10538else
10539  case $UNAME in
10540  [\\/]* | ?:[\\/]*)
10541  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10542  ;;
10543  *)
10544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10545for as_dir in $PATH
10546do
10547  IFS=$as_save_IFS
10548  test -z "$as_dir" && as_dir=.
10549    for ac_exec_ext in '' $ac_executable_extensions; do
10550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10551    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10553    break 2
10554  fi
10555done
10556  done
10557IFS=$as_save_IFS
10558
10559  ;;
10560esac
10561fi
10562UNAME=$ac_cv_path_UNAME
10563if test -n "$UNAME"; then
10564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10565$as_echo "$UNAME" >&6; }
10566else
10567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10568$as_echo "no" >&6; }
10569fi
10570
10571
10572        if test "x$UNAME" = x; then
10573          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10574        fi
10575      else
10576        # Otherwise we believe it is a complete path. Use it as it is.
10577        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10578$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10579        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10580$as_echo_n "checking for UNAME... " >&6; }
10581        if test ! -x "$tool_specified"; then
10582          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10583$as_echo "not found" >&6; }
10584          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10585        fi
10586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10587$as_echo "$tool_specified" >&6; }
10588      fi
10589    fi
10590  fi
10591
10592
10593
10594  if test "x$UNAME" = x; then
10595    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10596  fi
10597
10598
10599
10600
10601
10602  # Publish this variable in the help.
10603
10604
10605  if test "x$UNIQ" = x; then
10606    # The variable is not set by user, try to locate tool using the code snippet
10607    for ac_prog in uniq
10608do
10609  # Extract the first word of "$ac_prog", so it can be a program name with args.
10610set dummy $ac_prog; ac_word=$2
10611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10612$as_echo_n "checking for $ac_word... " >&6; }
10613if ${ac_cv_path_UNIQ+:} false; then :
10614  $as_echo_n "(cached) " >&6
10615else
10616  case $UNIQ in
10617  [\\/]* | ?:[\\/]*)
10618  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10619  ;;
10620  *)
10621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10622for as_dir in $PATH
10623do
10624  IFS=$as_save_IFS
10625  test -z "$as_dir" && as_dir=.
10626    for ac_exec_ext in '' $ac_executable_extensions; do
10627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10628    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10630    break 2
10631  fi
10632done
10633  done
10634IFS=$as_save_IFS
10635
10636  ;;
10637esac
10638fi
10639UNIQ=$ac_cv_path_UNIQ
10640if test -n "$UNIQ"; then
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10642$as_echo "$UNIQ" >&6; }
10643else
10644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10645$as_echo "no" >&6; }
10646fi
10647
10648
10649  test -n "$UNIQ" && break
10650done
10651
10652  else
10653    # The variable is set, but is it from the command line or the environment?
10654
10655    # Try to remove the string !UNIQ! from our list.
10656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10658      # If it failed, the variable was not from the command line. Ignore it,
10659      # but warn the user (except for BASH, which is always set by the calling BASH).
10660      if test "xUNIQ" != xBASH; then
10661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10662$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10663      fi
10664      # Try to locate tool using the code snippet
10665      for ac_prog in uniq
10666do
10667  # Extract the first word of "$ac_prog", so it can be a program name with args.
10668set dummy $ac_prog; ac_word=$2
10669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10670$as_echo_n "checking for $ac_word... " >&6; }
10671if ${ac_cv_path_UNIQ+:} false; then :
10672  $as_echo_n "(cached) " >&6
10673else
10674  case $UNIQ in
10675  [\\/]* | ?:[\\/]*)
10676  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10677  ;;
10678  *)
10679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10680for as_dir in $PATH
10681do
10682  IFS=$as_save_IFS
10683  test -z "$as_dir" && as_dir=.
10684    for ac_exec_ext in '' $ac_executable_extensions; do
10685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10686    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10688    break 2
10689  fi
10690done
10691  done
10692IFS=$as_save_IFS
10693
10694  ;;
10695esac
10696fi
10697UNIQ=$ac_cv_path_UNIQ
10698if test -n "$UNIQ"; then
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10700$as_echo "$UNIQ" >&6; }
10701else
10702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10703$as_echo "no" >&6; }
10704fi
10705
10706
10707  test -n "$UNIQ" && break
10708done
10709
10710    else
10711      # If it succeeded, then it was overridden by the user. We will use it
10712      # for the tool.
10713
10714      # First remove it from the list of overridden variables, so we can test
10715      # for unknown variables in the end.
10716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10717
10718      # Check if the provided tool contains a complete path.
10719      tool_specified="$UNIQ"
10720      tool_basename="${tool_specified##*/}"
10721      if test "x$tool_basename" = "x$tool_specified"; then
10722        # A command without a complete path is provided, search $PATH.
10723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10724$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10725        # Extract the first word of "$tool_basename", so it can be a program name with args.
10726set dummy $tool_basename; ac_word=$2
10727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10728$as_echo_n "checking for $ac_word... " >&6; }
10729if ${ac_cv_path_UNIQ+:} false; then :
10730  $as_echo_n "(cached) " >&6
10731else
10732  case $UNIQ in
10733  [\\/]* | ?:[\\/]*)
10734  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10735  ;;
10736  *)
10737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10738for as_dir in $PATH
10739do
10740  IFS=$as_save_IFS
10741  test -z "$as_dir" && as_dir=.
10742    for ac_exec_ext in '' $ac_executable_extensions; do
10743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10744    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10746    break 2
10747  fi
10748done
10749  done
10750IFS=$as_save_IFS
10751
10752  ;;
10753esac
10754fi
10755UNIQ=$ac_cv_path_UNIQ
10756if test -n "$UNIQ"; then
10757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10758$as_echo "$UNIQ" >&6; }
10759else
10760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10761$as_echo "no" >&6; }
10762fi
10763
10764
10765        if test "x$UNIQ" = x; then
10766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10767        fi
10768      else
10769        # Otherwise we believe it is a complete path. Use it as it is.
10770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10771$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10773$as_echo_n "checking for UNIQ... " >&6; }
10774        if test ! -x "$tool_specified"; then
10775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10776$as_echo "not found" >&6; }
10777          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10778        fi
10779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10780$as_echo "$tool_specified" >&6; }
10781      fi
10782    fi
10783  fi
10784
10785
10786
10787  if test "x$UNIQ" = x; then
10788    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10789  fi
10790
10791
10792
10793
10794
10795  # Publish this variable in the help.
10796
10797
10798  if test "x$WC" = x; then
10799    # The variable is not set by user, try to locate tool using the code snippet
10800    for ac_prog in wc
10801do
10802  # Extract the first word of "$ac_prog", so it can be a program name with args.
10803set dummy $ac_prog; ac_word=$2
10804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10805$as_echo_n "checking for $ac_word... " >&6; }
10806if ${ac_cv_path_WC+:} false; then :
10807  $as_echo_n "(cached) " >&6
10808else
10809  case $WC in
10810  [\\/]* | ?:[\\/]*)
10811  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10812  ;;
10813  *)
10814  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10815for as_dir in $PATH
10816do
10817  IFS=$as_save_IFS
10818  test -z "$as_dir" && as_dir=.
10819    for ac_exec_ext in '' $ac_executable_extensions; do
10820  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10821    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10822    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10823    break 2
10824  fi
10825done
10826  done
10827IFS=$as_save_IFS
10828
10829  ;;
10830esac
10831fi
10832WC=$ac_cv_path_WC
10833if test -n "$WC"; then
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10835$as_echo "$WC" >&6; }
10836else
10837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10838$as_echo "no" >&6; }
10839fi
10840
10841
10842  test -n "$WC" && break
10843done
10844
10845  else
10846    # The variable is set, but is it from the command line or the environment?
10847
10848    # Try to remove the string !WC! from our list.
10849    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10850    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10851      # If it failed, the variable was not from the command line. Ignore it,
10852      # but warn the user (except for BASH, which is always set by the calling BASH).
10853      if test "xWC" != xBASH; then
10854        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10855$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10856      fi
10857      # Try to locate tool using the code snippet
10858      for ac_prog in wc
10859do
10860  # Extract the first word of "$ac_prog", so it can be a program name with args.
10861set dummy $ac_prog; ac_word=$2
10862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10863$as_echo_n "checking for $ac_word... " >&6; }
10864if ${ac_cv_path_WC+:} false; then :
10865  $as_echo_n "(cached) " >&6
10866else
10867  case $WC in
10868  [\\/]* | ?:[\\/]*)
10869  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10870  ;;
10871  *)
10872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10873for as_dir in $PATH
10874do
10875  IFS=$as_save_IFS
10876  test -z "$as_dir" && as_dir=.
10877    for ac_exec_ext in '' $ac_executable_extensions; do
10878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10879    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10881    break 2
10882  fi
10883done
10884  done
10885IFS=$as_save_IFS
10886
10887  ;;
10888esac
10889fi
10890WC=$ac_cv_path_WC
10891if test -n "$WC"; then
10892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10893$as_echo "$WC" >&6; }
10894else
10895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10896$as_echo "no" >&6; }
10897fi
10898
10899
10900  test -n "$WC" && break
10901done
10902
10903    else
10904      # If it succeeded, then it was overridden by the user. We will use it
10905      # for the tool.
10906
10907      # First remove it from the list of overridden variables, so we can test
10908      # for unknown variables in the end.
10909      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10910
10911      # Check if the provided tool contains a complete path.
10912      tool_specified="$WC"
10913      tool_basename="${tool_specified##*/}"
10914      if test "x$tool_basename" = "x$tool_specified"; then
10915        # A command without a complete path is provided, search $PATH.
10916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10917$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10918        # Extract the first word of "$tool_basename", so it can be a program name with args.
10919set dummy $tool_basename; ac_word=$2
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10921$as_echo_n "checking for $ac_word... " >&6; }
10922if ${ac_cv_path_WC+:} false; then :
10923  $as_echo_n "(cached) " >&6
10924else
10925  case $WC in
10926  [\\/]* | ?:[\\/]*)
10927  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10928  ;;
10929  *)
10930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10931for as_dir in $PATH
10932do
10933  IFS=$as_save_IFS
10934  test -z "$as_dir" && as_dir=.
10935    for ac_exec_ext in '' $ac_executable_extensions; do
10936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10937    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10939    break 2
10940  fi
10941done
10942  done
10943IFS=$as_save_IFS
10944
10945  ;;
10946esac
10947fi
10948WC=$ac_cv_path_WC
10949if test -n "$WC"; then
10950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10951$as_echo "$WC" >&6; }
10952else
10953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
10955fi
10956
10957
10958        if test "x$WC" = x; then
10959          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10960        fi
10961      else
10962        # Otherwise we believe it is a complete path. Use it as it is.
10963        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
10964$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
10965        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
10966$as_echo_n "checking for WC... " >&6; }
10967        if test ! -x "$tool_specified"; then
10968          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10969$as_echo "not found" >&6; }
10970          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
10971        fi
10972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10973$as_echo "$tool_specified" >&6; }
10974      fi
10975    fi
10976  fi
10977
10978
10979
10980  if test "x$WC" = x; then
10981    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
10982  fi
10983
10984
10985
10986
10987
10988  # Publish this variable in the help.
10989
10990
10991  if test "x$WHICH" = x; then
10992    # The variable is not set by user, try to locate tool using the code snippet
10993    for ac_prog in which
10994do
10995  # Extract the first word of "$ac_prog", so it can be a program name with args.
10996set dummy $ac_prog; ac_word=$2
10997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10998$as_echo_n "checking for $ac_word... " >&6; }
10999if ${ac_cv_path_WHICH+:} false; then :
11000  $as_echo_n "(cached) " >&6
11001else
11002  case $WHICH in
11003  [\\/]* | ?:[\\/]*)
11004  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11005  ;;
11006  *)
11007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11008for as_dir in $PATH
11009do
11010  IFS=$as_save_IFS
11011  test -z "$as_dir" && as_dir=.
11012    for ac_exec_ext in '' $ac_executable_extensions; do
11013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11014    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11016    break 2
11017  fi
11018done
11019  done
11020IFS=$as_save_IFS
11021
11022  ;;
11023esac
11024fi
11025WHICH=$ac_cv_path_WHICH
11026if test -n "$WHICH"; then
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11028$as_echo "$WHICH" >&6; }
11029else
11030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11031$as_echo "no" >&6; }
11032fi
11033
11034
11035  test -n "$WHICH" && break
11036done
11037
11038  else
11039    # The variable is set, but is it from the command line or the environment?
11040
11041    # Try to remove the string !WHICH! from our list.
11042    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11043    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11044      # If it failed, the variable was not from the command line. Ignore it,
11045      # but warn the user (except for BASH, which is always set by the calling BASH).
11046      if test "xWHICH" != xBASH; then
11047        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11048$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11049      fi
11050      # Try to locate tool using the code snippet
11051      for ac_prog in which
11052do
11053  # Extract the first word of "$ac_prog", so it can be a program name with args.
11054set dummy $ac_prog; ac_word=$2
11055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11056$as_echo_n "checking for $ac_word... " >&6; }
11057if ${ac_cv_path_WHICH+:} false; then :
11058  $as_echo_n "(cached) " >&6
11059else
11060  case $WHICH in
11061  [\\/]* | ?:[\\/]*)
11062  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11063  ;;
11064  *)
11065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11066for as_dir in $PATH
11067do
11068  IFS=$as_save_IFS
11069  test -z "$as_dir" && as_dir=.
11070    for ac_exec_ext in '' $ac_executable_extensions; do
11071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11072    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11074    break 2
11075  fi
11076done
11077  done
11078IFS=$as_save_IFS
11079
11080  ;;
11081esac
11082fi
11083WHICH=$ac_cv_path_WHICH
11084if test -n "$WHICH"; then
11085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11086$as_echo "$WHICH" >&6; }
11087else
11088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11089$as_echo "no" >&6; }
11090fi
11091
11092
11093  test -n "$WHICH" && break
11094done
11095
11096    else
11097      # If it succeeded, then it was overridden by the user. We will use it
11098      # for the tool.
11099
11100      # First remove it from the list of overridden variables, so we can test
11101      # for unknown variables in the end.
11102      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11103
11104      # Check if the provided tool contains a complete path.
11105      tool_specified="$WHICH"
11106      tool_basename="${tool_specified##*/}"
11107      if test "x$tool_basename" = "x$tool_specified"; then
11108        # A command without a complete path is provided, search $PATH.
11109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11110$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11111        # Extract the first word of "$tool_basename", so it can be a program name with args.
11112set dummy $tool_basename; ac_word=$2
11113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11114$as_echo_n "checking for $ac_word... " >&6; }
11115if ${ac_cv_path_WHICH+:} false; then :
11116  $as_echo_n "(cached) " >&6
11117else
11118  case $WHICH in
11119  [\\/]* | ?:[\\/]*)
11120  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11121  ;;
11122  *)
11123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11124for as_dir in $PATH
11125do
11126  IFS=$as_save_IFS
11127  test -z "$as_dir" && as_dir=.
11128    for ac_exec_ext in '' $ac_executable_extensions; do
11129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11130    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11132    break 2
11133  fi
11134done
11135  done
11136IFS=$as_save_IFS
11137
11138  ;;
11139esac
11140fi
11141WHICH=$ac_cv_path_WHICH
11142if test -n "$WHICH"; then
11143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11144$as_echo "$WHICH" >&6; }
11145else
11146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11147$as_echo "no" >&6; }
11148fi
11149
11150
11151        if test "x$WHICH" = x; then
11152          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11153        fi
11154      else
11155        # Otherwise we believe it is a complete path. Use it as it is.
11156        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11157$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11158        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11159$as_echo_n "checking for WHICH... " >&6; }
11160        if test ! -x "$tool_specified"; then
11161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11162$as_echo "not found" >&6; }
11163          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11164        fi
11165        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11166$as_echo "$tool_specified" >&6; }
11167      fi
11168    fi
11169  fi
11170
11171
11172
11173  if test "x$WHICH" = x; then
11174    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11175  fi
11176
11177
11178
11179
11180
11181  # Publish this variable in the help.
11182
11183
11184  if test "x$XARGS" = x; then
11185    # The variable is not set by user, try to locate tool using the code snippet
11186    for ac_prog in xargs
11187do
11188  # Extract the first word of "$ac_prog", so it can be a program name with args.
11189set dummy $ac_prog; ac_word=$2
11190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11191$as_echo_n "checking for $ac_word... " >&6; }
11192if ${ac_cv_path_XARGS+:} false; then :
11193  $as_echo_n "(cached) " >&6
11194else
11195  case $XARGS in
11196  [\\/]* | ?:[\\/]*)
11197  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11198  ;;
11199  *)
11200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11201for as_dir in $PATH
11202do
11203  IFS=$as_save_IFS
11204  test -z "$as_dir" && as_dir=.
11205    for ac_exec_ext in '' $ac_executable_extensions; do
11206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11207    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11209    break 2
11210  fi
11211done
11212  done
11213IFS=$as_save_IFS
11214
11215  ;;
11216esac
11217fi
11218XARGS=$ac_cv_path_XARGS
11219if test -n "$XARGS"; then
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11221$as_echo "$XARGS" >&6; }
11222else
11223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11224$as_echo "no" >&6; }
11225fi
11226
11227
11228  test -n "$XARGS" && break
11229done
11230
11231  else
11232    # The variable is set, but is it from the command line or the environment?
11233
11234    # Try to remove the string !XARGS! from our list.
11235    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11236    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11237      # If it failed, the variable was not from the command line. Ignore it,
11238      # but warn the user (except for BASH, which is always set by the calling BASH).
11239      if test "xXARGS" != xBASH; then
11240        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11241$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11242      fi
11243      # Try to locate tool using the code snippet
11244      for ac_prog in xargs
11245do
11246  # Extract the first word of "$ac_prog", so it can be a program name with args.
11247set dummy $ac_prog; ac_word=$2
11248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11249$as_echo_n "checking for $ac_word... " >&6; }
11250if ${ac_cv_path_XARGS+:} false; then :
11251  $as_echo_n "(cached) " >&6
11252else
11253  case $XARGS in
11254  [\\/]* | ?:[\\/]*)
11255  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11256  ;;
11257  *)
11258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11259for as_dir in $PATH
11260do
11261  IFS=$as_save_IFS
11262  test -z "$as_dir" && as_dir=.
11263    for ac_exec_ext in '' $ac_executable_extensions; do
11264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11265    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11267    break 2
11268  fi
11269done
11270  done
11271IFS=$as_save_IFS
11272
11273  ;;
11274esac
11275fi
11276XARGS=$ac_cv_path_XARGS
11277if test -n "$XARGS"; then
11278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11279$as_echo "$XARGS" >&6; }
11280else
11281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11282$as_echo "no" >&6; }
11283fi
11284
11285
11286  test -n "$XARGS" && break
11287done
11288
11289    else
11290      # If it succeeded, then it was overridden by the user. We will use it
11291      # for the tool.
11292
11293      # First remove it from the list of overridden variables, so we can test
11294      # for unknown variables in the end.
11295      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11296
11297      # Check if the provided tool contains a complete path.
11298      tool_specified="$XARGS"
11299      tool_basename="${tool_specified##*/}"
11300      if test "x$tool_basename" = "x$tool_specified"; then
11301        # A command without a complete path is provided, search $PATH.
11302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11303$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11304        # Extract the first word of "$tool_basename", so it can be a program name with args.
11305set dummy $tool_basename; ac_word=$2
11306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11307$as_echo_n "checking for $ac_word... " >&6; }
11308if ${ac_cv_path_XARGS+:} false; then :
11309  $as_echo_n "(cached) " >&6
11310else
11311  case $XARGS in
11312  [\\/]* | ?:[\\/]*)
11313  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11314  ;;
11315  *)
11316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11317for as_dir in $PATH
11318do
11319  IFS=$as_save_IFS
11320  test -z "$as_dir" && as_dir=.
11321    for ac_exec_ext in '' $ac_executable_extensions; do
11322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11323    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11325    break 2
11326  fi
11327done
11328  done
11329IFS=$as_save_IFS
11330
11331  ;;
11332esac
11333fi
11334XARGS=$ac_cv_path_XARGS
11335if test -n "$XARGS"; then
11336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11337$as_echo "$XARGS" >&6; }
11338else
11339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11340$as_echo "no" >&6; }
11341fi
11342
11343
11344        if test "x$XARGS" = x; then
11345          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11346        fi
11347      else
11348        # Otherwise we believe it is a complete path. Use it as it is.
11349        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11350$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11351        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11352$as_echo_n "checking for XARGS... " >&6; }
11353        if test ! -x "$tool_specified"; then
11354          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11355$as_echo "not found" >&6; }
11356          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11357        fi
11358        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11359$as_echo "$tool_specified" >&6; }
11360      fi
11361    fi
11362  fi
11363
11364
11365
11366  if test "x$XARGS" = x; then
11367    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11368  fi
11369
11370
11371
11372  # Then required tools that require some special treatment.
11373
11374
11375  # Publish this variable in the help.
11376
11377
11378  if test "x$AWK" = x; then
11379    # The variable is not set by user, try to locate tool using the code snippet
11380    for ac_prog in gawk mawk nawk awk
11381do
11382  # Extract the first word of "$ac_prog", so it can be a program name with args.
11383set dummy $ac_prog; ac_word=$2
11384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11385$as_echo_n "checking for $ac_word... " >&6; }
11386if ${ac_cv_prog_AWK+:} false; then :
11387  $as_echo_n "(cached) " >&6
11388else
11389  if test -n "$AWK"; then
11390  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11391else
11392as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11393for as_dir in $PATH
11394do
11395  IFS=$as_save_IFS
11396  test -z "$as_dir" && as_dir=.
11397    for ac_exec_ext in '' $ac_executable_extensions; do
11398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11399    ac_cv_prog_AWK="$ac_prog"
11400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11401    break 2
11402  fi
11403done
11404  done
11405IFS=$as_save_IFS
11406
11407fi
11408fi
11409AWK=$ac_cv_prog_AWK
11410if test -n "$AWK"; then
11411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11412$as_echo "$AWK" >&6; }
11413else
11414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11415$as_echo "no" >&6; }
11416fi
11417
11418
11419  test -n "$AWK" && break
11420done
11421
11422  else
11423    # The variable is set, but is it from the command line or the environment?
11424
11425    # Try to remove the string !AWK! from our list.
11426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11428      # If it failed, the variable was not from the command line. Ignore it,
11429      # but warn the user (except for BASH, which is always set by the calling BASH).
11430      if test "xAWK" != xBASH; then
11431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11432$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11433      fi
11434      # Try to locate tool using the code snippet
11435      for ac_prog in gawk mawk nawk awk
11436do
11437  # Extract the first word of "$ac_prog", so it can be a program name with args.
11438set dummy $ac_prog; ac_word=$2
11439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11440$as_echo_n "checking for $ac_word... " >&6; }
11441if ${ac_cv_prog_AWK+:} false; then :
11442  $as_echo_n "(cached) " >&6
11443else
11444  if test -n "$AWK"; then
11445  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11446else
11447as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11448for as_dir in $PATH
11449do
11450  IFS=$as_save_IFS
11451  test -z "$as_dir" && as_dir=.
11452    for ac_exec_ext in '' $ac_executable_extensions; do
11453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11454    ac_cv_prog_AWK="$ac_prog"
11455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11456    break 2
11457  fi
11458done
11459  done
11460IFS=$as_save_IFS
11461
11462fi
11463fi
11464AWK=$ac_cv_prog_AWK
11465if test -n "$AWK"; then
11466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11467$as_echo "$AWK" >&6; }
11468else
11469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11470$as_echo "no" >&6; }
11471fi
11472
11473
11474  test -n "$AWK" && break
11475done
11476
11477    else
11478      # If it succeeded, then it was overridden by the user. We will use it
11479      # for the tool.
11480
11481      # First remove it from the list of overridden variables, so we can test
11482      # for unknown variables in the end.
11483      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11484
11485      # Check if the provided tool contains a complete path.
11486      tool_specified="$AWK"
11487      tool_basename="${tool_specified##*/}"
11488      if test "x$tool_basename" = "x$tool_specified"; then
11489        # A command without a complete path is provided, search $PATH.
11490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11491$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11492        # Extract the first word of "$tool_basename", so it can be a program name with args.
11493set dummy $tool_basename; ac_word=$2
11494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11495$as_echo_n "checking for $ac_word... " >&6; }
11496if ${ac_cv_path_AWK+:} false; then :
11497  $as_echo_n "(cached) " >&6
11498else
11499  case $AWK in
11500  [\\/]* | ?:[\\/]*)
11501  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11502  ;;
11503  *)
11504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11505for as_dir in $PATH
11506do
11507  IFS=$as_save_IFS
11508  test -z "$as_dir" && as_dir=.
11509    for ac_exec_ext in '' $ac_executable_extensions; do
11510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11511    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11513    break 2
11514  fi
11515done
11516  done
11517IFS=$as_save_IFS
11518
11519  ;;
11520esac
11521fi
11522AWK=$ac_cv_path_AWK
11523if test -n "$AWK"; then
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11525$as_echo "$AWK" >&6; }
11526else
11527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11528$as_echo "no" >&6; }
11529fi
11530
11531
11532        if test "x$AWK" = x; then
11533          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11534        fi
11535      else
11536        # Otherwise we believe it is a complete path. Use it as it is.
11537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11538$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11540$as_echo_n "checking for AWK... " >&6; }
11541        if test ! -x "$tool_specified"; then
11542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11543$as_echo "not found" >&6; }
11544          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11545        fi
11546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11547$as_echo "$tool_specified" >&6; }
11548      fi
11549    fi
11550  fi
11551
11552
11553  if test "x$AWK" = x; then
11554    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11555  fi
11556
11557
11558
11559
11560  # Publish this variable in the help.
11561
11562
11563  if test "x$GREP" = x; then
11564    # The variable is not set by user, try to locate tool using the code snippet
11565    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11566$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11567if ${ac_cv_path_GREP+:} false; then :
11568  $as_echo_n "(cached) " >&6
11569else
11570  if test -z "$GREP"; then
11571  ac_path_GREP_found=false
11572  # Loop through the user's path and test for each of PROGNAME-LIST
11573  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11574for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11575do
11576  IFS=$as_save_IFS
11577  test -z "$as_dir" && as_dir=.
11578    for ac_prog in grep ggrep; do
11579    for ac_exec_ext in '' $ac_executable_extensions; do
11580      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11581      as_fn_executable_p "$ac_path_GREP" || continue
11582# Check for GNU ac_path_GREP and select it if it is found.
11583  # Check for GNU $ac_path_GREP
11584case `"$ac_path_GREP" --version 2>&1` in
11585*GNU*)
11586  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11587*)
11588  ac_count=0
11589  $as_echo_n 0123456789 >"conftest.in"
11590  while :
11591  do
11592    cat "conftest.in" "conftest.in" >"conftest.tmp"
11593    mv "conftest.tmp" "conftest.in"
11594    cp "conftest.in" "conftest.nl"
11595    $as_echo 'GREP' >> "conftest.nl"
11596    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11597    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11598    as_fn_arith $ac_count + 1 && ac_count=$as_val
11599    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11600      # Best one so far, save it but keep looking for a better one
11601      ac_cv_path_GREP="$ac_path_GREP"
11602      ac_path_GREP_max=$ac_count
11603    fi
11604    # 10*(2^10) chars as input seems more than enough
11605    test $ac_count -gt 10 && break
11606  done
11607  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11608esac
11609
11610      $ac_path_GREP_found && break 3
11611    done
11612  done
11613  done
11614IFS=$as_save_IFS
11615  if test -z "$ac_cv_path_GREP"; then
11616    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11617  fi
11618else
11619  ac_cv_path_GREP=$GREP
11620fi
11621
11622fi
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11624$as_echo "$ac_cv_path_GREP" >&6; }
11625 GREP="$ac_cv_path_GREP"
11626
11627
11628  else
11629    # The variable is set, but is it from the command line or the environment?
11630
11631    # Try to remove the string !GREP! from our list.
11632    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11633    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11634      # If it failed, the variable was not from the command line. Ignore it,
11635      # but warn the user (except for BASH, which is always set by the calling BASH).
11636      if test "xGREP" != xBASH; then
11637        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11638$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11639      fi
11640      # Try to locate tool using the code snippet
11641      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11642$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11643if ${ac_cv_path_GREP+:} false; then :
11644  $as_echo_n "(cached) " >&6
11645else
11646  if test -z "$GREP"; then
11647  ac_path_GREP_found=false
11648  # Loop through the user's path and test for each of PROGNAME-LIST
11649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11650for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11651do
11652  IFS=$as_save_IFS
11653  test -z "$as_dir" && as_dir=.
11654    for ac_prog in grep ggrep; do
11655    for ac_exec_ext in '' $ac_executable_extensions; do
11656      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11657      as_fn_executable_p "$ac_path_GREP" || continue
11658# Check for GNU ac_path_GREP and select it if it is found.
11659  # Check for GNU $ac_path_GREP
11660case `"$ac_path_GREP" --version 2>&1` in
11661*GNU*)
11662  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11663*)
11664  ac_count=0
11665  $as_echo_n 0123456789 >"conftest.in"
11666  while :
11667  do
11668    cat "conftest.in" "conftest.in" >"conftest.tmp"
11669    mv "conftest.tmp" "conftest.in"
11670    cp "conftest.in" "conftest.nl"
11671    $as_echo 'GREP' >> "conftest.nl"
11672    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11673    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11674    as_fn_arith $ac_count + 1 && ac_count=$as_val
11675    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11676      # Best one so far, save it but keep looking for a better one
11677      ac_cv_path_GREP="$ac_path_GREP"
11678      ac_path_GREP_max=$ac_count
11679    fi
11680    # 10*(2^10) chars as input seems more than enough
11681    test $ac_count -gt 10 && break
11682  done
11683  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11684esac
11685
11686      $ac_path_GREP_found && break 3
11687    done
11688  done
11689  done
11690IFS=$as_save_IFS
11691  if test -z "$ac_cv_path_GREP"; then
11692    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11693  fi
11694else
11695  ac_cv_path_GREP=$GREP
11696fi
11697
11698fi
11699{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11700$as_echo "$ac_cv_path_GREP" >&6; }
11701 GREP="$ac_cv_path_GREP"
11702
11703
11704    else
11705      # If it succeeded, then it was overridden by the user. We will use it
11706      # for the tool.
11707
11708      # First remove it from the list of overridden variables, so we can test
11709      # for unknown variables in the end.
11710      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11711
11712      # Check if the provided tool contains a complete path.
11713      tool_specified="$GREP"
11714      tool_basename="${tool_specified##*/}"
11715      if test "x$tool_basename" = "x$tool_specified"; then
11716        # A command without a complete path is provided, search $PATH.
11717        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11718$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11719        # Extract the first word of "$tool_basename", so it can be a program name with args.
11720set dummy $tool_basename; ac_word=$2
11721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11722$as_echo_n "checking for $ac_word... " >&6; }
11723if ${ac_cv_path_GREP+:} false; then :
11724  $as_echo_n "(cached) " >&6
11725else
11726  case $GREP in
11727  [\\/]* | ?:[\\/]*)
11728  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11729  ;;
11730  *)
11731  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11732for as_dir in $PATH
11733do
11734  IFS=$as_save_IFS
11735  test -z "$as_dir" && as_dir=.
11736    for ac_exec_ext in '' $ac_executable_extensions; do
11737  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11738    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11739    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11740    break 2
11741  fi
11742done
11743  done
11744IFS=$as_save_IFS
11745
11746  ;;
11747esac
11748fi
11749GREP=$ac_cv_path_GREP
11750if test -n "$GREP"; then
11751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11752$as_echo "$GREP" >&6; }
11753else
11754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11755$as_echo "no" >&6; }
11756fi
11757
11758
11759        if test "x$GREP" = x; then
11760          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11761        fi
11762      else
11763        # Otherwise we believe it is a complete path. Use it as it is.
11764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11765$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11767$as_echo_n "checking for GREP... " >&6; }
11768        if test ! -x "$tool_specified"; then
11769          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11770$as_echo "not found" >&6; }
11771          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11772        fi
11773        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11774$as_echo "$tool_specified" >&6; }
11775      fi
11776    fi
11777  fi
11778
11779
11780  if test "x$GREP" = x; then
11781    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11782  fi
11783
11784
11785
11786
11787  # Publish this variable in the help.
11788
11789
11790  if test "x$EGREP" = x; then
11791    # The variable is not set by user, try to locate tool using the code snippet
11792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11793$as_echo_n "checking for egrep... " >&6; }
11794if ${ac_cv_path_EGREP+:} false; then :
11795  $as_echo_n "(cached) " >&6
11796else
11797  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11798   then ac_cv_path_EGREP="$GREP -E"
11799   else
11800     if test -z "$EGREP"; then
11801  ac_path_EGREP_found=false
11802  # Loop through the user's path and test for each of PROGNAME-LIST
11803  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11804for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11805do
11806  IFS=$as_save_IFS
11807  test -z "$as_dir" && as_dir=.
11808    for ac_prog in egrep; do
11809    for ac_exec_ext in '' $ac_executable_extensions; do
11810      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11811      as_fn_executable_p "$ac_path_EGREP" || continue
11812# Check for GNU ac_path_EGREP and select it if it is found.
11813  # Check for GNU $ac_path_EGREP
11814case `"$ac_path_EGREP" --version 2>&1` in
11815*GNU*)
11816  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11817*)
11818  ac_count=0
11819  $as_echo_n 0123456789 >"conftest.in"
11820  while :
11821  do
11822    cat "conftest.in" "conftest.in" >"conftest.tmp"
11823    mv "conftest.tmp" "conftest.in"
11824    cp "conftest.in" "conftest.nl"
11825    $as_echo 'EGREP' >> "conftest.nl"
11826    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11827    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11828    as_fn_arith $ac_count + 1 && ac_count=$as_val
11829    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11830      # Best one so far, save it but keep looking for a better one
11831      ac_cv_path_EGREP="$ac_path_EGREP"
11832      ac_path_EGREP_max=$ac_count
11833    fi
11834    # 10*(2^10) chars as input seems more than enough
11835    test $ac_count -gt 10 && break
11836  done
11837  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11838esac
11839
11840      $ac_path_EGREP_found && break 3
11841    done
11842  done
11843  done
11844IFS=$as_save_IFS
11845  if test -z "$ac_cv_path_EGREP"; then
11846    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11847  fi
11848else
11849  ac_cv_path_EGREP=$EGREP
11850fi
11851
11852   fi
11853fi
11854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11855$as_echo "$ac_cv_path_EGREP" >&6; }
11856 EGREP="$ac_cv_path_EGREP"
11857
11858
11859  else
11860    # The variable is set, but is it from the command line or the environment?
11861
11862    # Try to remove the string !EGREP! from our list.
11863    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11864    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11865      # If it failed, the variable was not from the command line. Ignore it,
11866      # but warn the user (except for BASH, which is always set by the calling BASH).
11867      if test "xEGREP" != xBASH; then
11868        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11869$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11870      fi
11871      # Try to locate tool using the code snippet
11872      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11873$as_echo_n "checking for egrep... " >&6; }
11874if ${ac_cv_path_EGREP+:} false; then :
11875  $as_echo_n "(cached) " >&6
11876else
11877  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11878   then ac_cv_path_EGREP="$GREP -E"
11879   else
11880     if test -z "$EGREP"; then
11881  ac_path_EGREP_found=false
11882  # Loop through the user's path and test for each of PROGNAME-LIST
11883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11884for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11885do
11886  IFS=$as_save_IFS
11887  test -z "$as_dir" && as_dir=.
11888    for ac_prog in egrep; do
11889    for ac_exec_ext in '' $ac_executable_extensions; do
11890      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11891      as_fn_executable_p "$ac_path_EGREP" || continue
11892# Check for GNU ac_path_EGREP and select it if it is found.
11893  # Check for GNU $ac_path_EGREP
11894case `"$ac_path_EGREP" --version 2>&1` in
11895*GNU*)
11896  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11897*)
11898  ac_count=0
11899  $as_echo_n 0123456789 >"conftest.in"
11900  while :
11901  do
11902    cat "conftest.in" "conftest.in" >"conftest.tmp"
11903    mv "conftest.tmp" "conftest.in"
11904    cp "conftest.in" "conftest.nl"
11905    $as_echo 'EGREP' >> "conftest.nl"
11906    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11907    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11908    as_fn_arith $ac_count + 1 && ac_count=$as_val
11909    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11910      # Best one so far, save it but keep looking for a better one
11911      ac_cv_path_EGREP="$ac_path_EGREP"
11912      ac_path_EGREP_max=$ac_count
11913    fi
11914    # 10*(2^10) chars as input seems more than enough
11915    test $ac_count -gt 10 && break
11916  done
11917  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11918esac
11919
11920      $ac_path_EGREP_found && break 3
11921    done
11922  done
11923  done
11924IFS=$as_save_IFS
11925  if test -z "$ac_cv_path_EGREP"; then
11926    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11927  fi
11928else
11929  ac_cv_path_EGREP=$EGREP
11930fi
11931
11932   fi
11933fi
11934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11935$as_echo "$ac_cv_path_EGREP" >&6; }
11936 EGREP="$ac_cv_path_EGREP"
11937
11938
11939    else
11940      # If it succeeded, then it was overridden by the user. We will use it
11941      # for the tool.
11942
11943      # First remove it from the list of overridden variables, so we can test
11944      # for unknown variables in the end.
11945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11946
11947      # Check if the provided tool contains a complete path.
11948      tool_specified="$EGREP"
11949      tool_basename="${tool_specified##*/}"
11950      if test "x$tool_basename" = "x$tool_specified"; then
11951        # A command without a complete path is provided, search $PATH.
11952        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11953$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11954        # Extract the first word of "$tool_basename", so it can be a program name with args.
11955set dummy $tool_basename; ac_word=$2
11956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11957$as_echo_n "checking for $ac_word... " >&6; }
11958if ${ac_cv_path_EGREP+:} false; then :
11959  $as_echo_n "(cached) " >&6
11960else
11961  case $EGREP in
11962  [\\/]* | ?:[\\/]*)
11963  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
11964  ;;
11965  *)
11966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11967for as_dir in $PATH
11968do
11969  IFS=$as_save_IFS
11970  test -z "$as_dir" && as_dir=.
11971    for ac_exec_ext in '' $ac_executable_extensions; do
11972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11973    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
11974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11975    break 2
11976  fi
11977done
11978  done
11979IFS=$as_save_IFS
11980
11981  ;;
11982esac
11983fi
11984EGREP=$ac_cv_path_EGREP
11985if test -n "$EGREP"; then
11986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
11987$as_echo "$EGREP" >&6; }
11988else
11989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11990$as_echo "no" >&6; }
11991fi
11992
11993
11994        if test "x$EGREP" = x; then
11995          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11996        fi
11997      else
11998        # Otherwise we believe it is a complete path. Use it as it is.
11999        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12000$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12001        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12002$as_echo_n "checking for EGREP... " >&6; }
12003        if test ! -x "$tool_specified"; then
12004          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12005$as_echo "not found" >&6; }
12006          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12007        fi
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12009$as_echo "$tool_specified" >&6; }
12010      fi
12011    fi
12012  fi
12013
12014
12015  if test "x$EGREP" = x; then
12016    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12017  fi
12018
12019
12020
12021
12022  # Publish this variable in the help.
12023
12024
12025  if test "x$FGREP" = x; then
12026    # The variable is not set by user, try to locate tool using the code snippet
12027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12028$as_echo_n "checking for fgrep... " >&6; }
12029if ${ac_cv_path_FGREP+:} false; then :
12030  $as_echo_n "(cached) " >&6
12031else
12032  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12033   then ac_cv_path_FGREP="$GREP -F"
12034   else
12035     if test -z "$FGREP"; then
12036  ac_path_FGREP_found=false
12037  # Loop through the user's path and test for each of PROGNAME-LIST
12038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12039for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12040do
12041  IFS=$as_save_IFS
12042  test -z "$as_dir" && as_dir=.
12043    for ac_prog in fgrep; do
12044    for ac_exec_ext in '' $ac_executable_extensions; do
12045      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12046      as_fn_executable_p "$ac_path_FGREP" || continue
12047# Check for GNU ac_path_FGREP and select it if it is found.
12048  # Check for GNU $ac_path_FGREP
12049case `"$ac_path_FGREP" --version 2>&1` in
12050*GNU*)
12051  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12052*)
12053  ac_count=0
12054  $as_echo_n 0123456789 >"conftest.in"
12055  while :
12056  do
12057    cat "conftest.in" "conftest.in" >"conftest.tmp"
12058    mv "conftest.tmp" "conftest.in"
12059    cp "conftest.in" "conftest.nl"
12060    $as_echo 'FGREP' >> "conftest.nl"
12061    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12062    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12063    as_fn_arith $ac_count + 1 && ac_count=$as_val
12064    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12065      # Best one so far, save it but keep looking for a better one
12066      ac_cv_path_FGREP="$ac_path_FGREP"
12067      ac_path_FGREP_max=$ac_count
12068    fi
12069    # 10*(2^10) chars as input seems more than enough
12070    test $ac_count -gt 10 && break
12071  done
12072  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12073esac
12074
12075      $ac_path_FGREP_found && break 3
12076    done
12077  done
12078  done
12079IFS=$as_save_IFS
12080  if test -z "$ac_cv_path_FGREP"; then
12081    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12082  fi
12083else
12084  ac_cv_path_FGREP=$FGREP
12085fi
12086
12087   fi
12088fi
12089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12090$as_echo "$ac_cv_path_FGREP" >&6; }
12091 FGREP="$ac_cv_path_FGREP"
12092
12093
12094  else
12095    # The variable is set, but is it from the command line or the environment?
12096
12097    # Try to remove the string !FGREP! from our list.
12098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12100      # If it failed, the variable was not from the command line. Ignore it,
12101      # but warn the user (except for BASH, which is always set by the calling BASH).
12102      if test "xFGREP" != xBASH; then
12103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12104$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12105      fi
12106      # Try to locate tool using the code snippet
12107      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12108$as_echo_n "checking for fgrep... " >&6; }
12109if ${ac_cv_path_FGREP+:} false; then :
12110  $as_echo_n "(cached) " >&6
12111else
12112  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12113   then ac_cv_path_FGREP="$GREP -F"
12114   else
12115     if test -z "$FGREP"; then
12116  ac_path_FGREP_found=false
12117  # Loop through the user's path and test for each of PROGNAME-LIST
12118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12119for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12120do
12121  IFS=$as_save_IFS
12122  test -z "$as_dir" && as_dir=.
12123    for ac_prog in fgrep; do
12124    for ac_exec_ext in '' $ac_executable_extensions; do
12125      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12126      as_fn_executable_p "$ac_path_FGREP" || continue
12127# Check for GNU ac_path_FGREP and select it if it is found.
12128  # Check for GNU $ac_path_FGREP
12129case `"$ac_path_FGREP" --version 2>&1` in
12130*GNU*)
12131  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12132*)
12133  ac_count=0
12134  $as_echo_n 0123456789 >"conftest.in"
12135  while :
12136  do
12137    cat "conftest.in" "conftest.in" >"conftest.tmp"
12138    mv "conftest.tmp" "conftest.in"
12139    cp "conftest.in" "conftest.nl"
12140    $as_echo 'FGREP' >> "conftest.nl"
12141    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12142    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12143    as_fn_arith $ac_count + 1 && ac_count=$as_val
12144    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12145      # Best one so far, save it but keep looking for a better one
12146      ac_cv_path_FGREP="$ac_path_FGREP"
12147      ac_path_FGREP_max=$ac_count
12148    fi
12149    # 10*(2^10) chars as input seems more than enough
12150    test $ac_count -gt 10 && break
12151  done
12152  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12153esac
12154
12155      $ac_path_FGREP_found && break 3
12156    done
12157  done
12158  done
12159IFS=$as_save_IFS
12160  if test -z "$ac_cv_path_FGREP"; then
12161    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12162  fi
12163else
12164  ac_cv_path_FGREP=$FGREP
12165fi
12166
12167   fi
12168fi
12169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12170$as_echo "$ac_cv_path_FGREP" >&6; }
12171 FGREP="$ac_cv_path_FGREP"
12172
12173
12174    else
12175      # If it succeeded, then it was overridden by the user. We will use it
12176      # for the tool.
12177
12178      # First remove it from the list of overridden variables, so we can test
12179      # for unknown variables in the end.
12180      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12181
12182      # Check if the provided tool contains a complete path.
12183      tool_specified="$FGREP"
12184      tool_basename="${tool_specified##*/}"
12185      if test "x$tool_basename" = "x$tool_specified"; then
12186        # A command without a complete path is provided, search $PATH.
12187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12188$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12189        # Extract the first word of "$tool_basename", so it can be a program name with args.
12190set dummy $tool_basename; ac_word=$2
12191{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12192$as_echo_n "checking for $ac_word... " >&6; }
12193if ${ac_cv_path_FGREP+:} false; then :
12194  $as_echo_n "(cached) " >&6
12195else
12196  case $FGREP in
12197  [\\/]* | ?:[\\/]*)
12198  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12199  ;;
12200  *)
12201  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12202for as_dir in $PATH
12203do
12204  IFS=$as_save_IFS
12205  test -z "$as_dir" && as_dir=.
12206    for ac_exec_ext in '' $ac_executable_extensions; do
12207  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12208    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12209    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12210    break 2
12211  fi
12212done
12213  done
12214IFS=$as_save_IFS
12215
12216  ;;
12217esac
12218fi
12219FGREP=$ac_cv_path_FGREP
12220if test -n "$FGREP"; then
12221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12222$as_echo "$FGREP" >&6; }
12223else
12224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12225$as_echo "no" >&6; }
12226fi
12227
12228
12229        if test "x$FGREP" = x; then
12230          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12231        fi
12232      else
12233        # Otherwise we believe it is a complete path. Use it as it is.
12234        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12235$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12236        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12237$as_echo_n "checking for FGREP... " >&6; }
12238        if test ! -x "$tool_specified"; then
12239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12240$as_echo "not found" >&6; }
12241          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12242        fi
12243        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12244$as_echo "$tool_specified" >&6; }
12245      fi
12246    fi
12247  fi
12248
12249
12250  if test "x$FGREP" = x; then
12251    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12252  fi
12253
12254
12255
12256
12257  # Publish this variable in the help.
12258
12259
12260  if test "x$SED" = x; then
12261    # The variable is not set by user, try to locate tool using the code snippet
12262    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12263$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12264if ${ac_cv_path_SED+:} false; then :
12265  $as_echo_n "(cached) " >&6
12266else
12267            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12268     for ac_i in 1 2 3 4 5 6 7; do
12269       ac_script="$ac_script$as_nl$ac_script"
12270     done
12271     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12272     { ac_script=; unset ac_script;}
12273     if test -z "$SED"; then
12274  ac_path_SED_found=false
12275  # Loop through the user's path and test for each of PROGNAME-LIST
12276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12277for as_dir in $PATH
12278do
12279  IFS=$as_save_IFS
12280  test -z "$as_dir" && as_dir=.
12281    for ac_prog in sed gsed; do
12282    for ac_exec_ext in '' $ac_executable_extensions; do
12283      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12284      as_fn_executable_p "$ac_path_SED" || continue
12285# Check for GNU ac_path_SED and select it if it is found.
12286  # Check for GNU $ac_path_SED
12287case `"$ac_path_SED" --version 2>&1` in
12288*GNU*)
12289  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12290*)
12291  ac_count=0
12292  $as_echo_n 0123456789 >"conftest.in"
12293  while :
12294  do
12295    cat "conftest.in" "conftest.in" >"conftest.tmp"
12296    mv "conftest.tmp" "conftest.in"
12297    cp "conftest.in" "conftest.nl"
12298    $as_echo '' >> "conftest.nl"
12299    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12300    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12301    as_fn_arith $ac_count + 1 && ac_count=$as_val
12302    if test $ac_count -gt ${ac_path_SED_max-0}; then
12303      # Best one so far, save it but keep looking for a better one
12304      ac_cv_path_SED="$ac_path_SED"
12305      ac_path_SED_max=$ac_count
12306    fi
12307    # 10*(2^10) chars as input seems more than enough
12308    test $ac_count -gt 10 && break
12309  done
12310  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12311esac
12312
12313      $ac_path_SED_found && break 3
12314    done
12315  done
12316  done
12317IFS=$as_save_IFS
12318  if test -z "$ac_cv_path_SED"; then
12319    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12320  fi
12321else
12322  ac_cv_path_SED=$SED
12323fi
12324
12325fi
12326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12327$as_echo "$ac_cv_path_SED" >&6; }
12328 SED="$ac_cv_path_SED"
12329  rm -f conftest.sed
12330
12331  else
12332    # The variable is set, but is it from the command line or the environment?
12333
12334    # Try to remove the string !SED! from our list.
12335    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12336    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12337      # If it failed, the variable was not from the command line. Ignore it,
12338      # but warn the user (except for BASH, which is always set by the calling BASH).
12339      if test "xSED" != xBASH; then
12340        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12341$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12342      fi
12343      # Try to locate tool using the code snippet
12344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12345$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12346if ${ac_cv_path_SED+:} false; then :
12347  $as_echo_n "(cached) " >&6
12348else
12349            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12350     for ac_i in 1 2 3 4 5 6 7; do
12351       ac_script="$ac_script$as_nl$ac_script"
12352     done
12353     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12354     { ac_script=; unset ac_script;}
12355     if test -z "$SED"; then
12356  ac_path_SED_found=false
12357  # Loop through the user's path and test for each of PROGNAME-LIST
12358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12359for as_dir in $PATH
12360do
12361  IFS=$as_save_IFS
12362  test -z "$as_dir" && as_dir=.
12363    for ac_prog in sed gsed; do
12364    for ac_exec_ext in '' $ac_executable_extensions; do
12365      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12366      as_fn_executable_p "$ac_path_SED" || continue
12367# Check for GNU ac_path_SED and select it if it is found.
12368  # Check for GNU $ac_path_SED
12369case `"$ac_path_SED" --version 2>&1` in
12370*GNU*)
12371  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12372*)
12373  ac_count=0
12374  $as_echo_n 0123456789 >"conftest.in"
12375  while :
12376  do
12377    cat "conftest.in" "conftest.in" >"conftest.tmp"
12378    mv "conftest.tmp" "conftest.in"
12379    cp "conftest.in" "conftest.nl"
12380    $as_echo '' >> "conftest.nl"
12381    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12382    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12383    as_fn_arith $ac_count + 1 && ac_count=$as_val
12384    if test $ac_count -gt ${ac_path_SED_max-0}; then
12385      # Best one so far, save it but keep looking for a better one
12386      ac_cv_path_SED="$ac_path_SED"
12387      ac_path_SED_max=$ac_count
12388    fi
12389    # 10*(2^10) chars as input seems more than enough
12390    test $ac_count -gt 10 && break
12391  done
12392  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12393esac
12394
12395      $ac_path_SED_found && break 3
12396    done
12397  done
12398  done
12399IFS=$as_save_IFS
12400  if test -z "$ac_cv_path_SED"; then
12401    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12402  fi
12403else
12404  ac_cv_path_SED=$SED
12405fi
12406
12407fi
12408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12409$as_echo "$ac_cv_path_SED" >&6; }
12410 SED="$ac_cv_path_SED"
12411  rm -f conftest.sed
12412
12413    else
12414      # If it succeeded, then it was overridden by the user. We will use it
12415      # for the tool.
12416
12417      # First remove it from the list of overridden variables, so we can test
12418      # for unknown variables in the end.
12419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12420
12421      # Check if the provided tool contains a complete path.
12422      tool_specified="$SED"
12423      tool_basename="${tool_specified##*/}"
12424      if test "x$tool_basename" = "x$tool_specified"; then
12425        # A command without a complete path is provided, search $PATH.
12426        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12427$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12428        # Extract the first word of "$tool_basename", so it can be a program name with args.
12429set dummy $tool_basename; ac_word=$2
12430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12431$as_echo_n "checking for $ac_word... " >&6; }
12432if ${ac_cv_path_SED+:} false; then :
12433  $as_echo_n "(cached) " >&6
12434else
12435  case $SED in
12436  [\\/]* | ?:[\\/]*)
12437  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12438  ;;
12439  *)
12440  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12441for as_dir in $PATH
12442do
12443  IFS=$as_save_IFS
12444  test -z "$as_dir" && as_dir=.
12445    for ac_exec_ext in '' $ac_executable_extensions; do
12446  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12447    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12448    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12449    break 2
12450  fi
12451done
12452  done
12453IFS=$as_save_IFS
12454
12455  ;;
12456esac
12457fi
12458SED=$ac_cv_path_SED
12459if test -n "$SED"; then
12460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12461$as_echo "$SED" >&6; }
12462else
12463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12464$as_echo "no" >&6; }
12465fi
12466
12467
12468        if test "x$SED" = x; then
12469          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12470        fi
12471      else
12472        # Otherwise we believe it is a complete path. Use it as it is.
12473        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12474$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12475        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12476$as_echo_n "checking for SED... " >&6; }
12477        if test ! -x "$tool_specified"; then
12478          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12479$as_echo "not found" >&6; }
12480          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12481        fi
12482        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12483$as_echo "$tool_specified" >&6; }
12484      fi
12485    fi
12486  fi
12487
12488
12489  if test "x$SED" = x; then
12490    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12491  fi
12492
12493
12494
12495  # Always force rm.
12496  RM="$RM -f"
12497
12498  # pwd behaves differently on various platforms and some don't support the -L flag.
12499  # Always use the bash builtin pwd to get uniform behavior.
12500  THEPWDCMD=pwd
12501
12502  # These are not required on all platforms
12503
12504
12505  # Publish this variable in the help.
12506
12507
12508  if test "x$CYGPATH" = x; then
12509    # The variable is not set by user, try to locate tool using the code snippet
12510    for ac_prog in cygpath
12511do
12512  # Extract the first word of "$ac_prog", so it can be a program name with args.
12513set dummy $ac_prog; ac_word=$2
12514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12515$as_echo_n "checking for $ac_word... " >&6; }
12516if ${ac_cv_path_CYGPATH+:} false; then :
12517  $as_echo_n "(cached) " >&6
12518else
12519  case $CYGPATH in
12520  [\\/]* | ?:[\\/]*)
12521  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12522  ;;
12523  *)
12524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12525for as_dir in $PATH
12526do
12527  IFS=$as_save_IFS
12528  test -z "$as_dir" && as_dir=.
12529    for ac_exec_ext in '' $ac_executable_extensions; do
12530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12531    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12533    break 2
12534  fi
12535done
12536  done
12537IFS=$as_save_IFS
12538
12539  ;;
12540esac
12541fi
12542CYGPATH=$ac_cv_path_CYGPATH
12543if test -n "$CYGPATH"; then
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12545$as_echo "$CYGPATH" >&6; }
12546else
12547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12548$as_echo "no" >&6; }
12549fi
12550
12551
12552  test -n "$CYGPATH" && break
12553done
12554
12555  else
12556    # The variable is set, but is it from the command line or the environment?
12557
12558    # Try to remove the string !CYGPATH! from our list.
12559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12561      # If it failed, the variable was not from the command line. Ignore it,
12562      # but warn the user (except for BASH, which is always set by the calling BASH).
12563      if test "xCYGPATH" != xBASH; then
12564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12565$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12566      fi
12567      # Try to locate tool using the code snippet
12568      for ac_prog in cygpath
12569do
12570  # Extract the first word of "$ac_prog", so it can be a program name with args.
12571set dummy $ac_prog; ac_word=$2
12572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12573$as_echo_n "checking for $ac_word... " >&6; }
12574if ${ac_cv_path_CYGPATH+:} false; then :
12575  $as_echo_n "(cached) " >&6
12576else
12577  case $CYGPATH in
12578  [\\/]* | ?:[\\/]*)
12579  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12580  ;;
12581  *)
12582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12583for as_dir in $PATH
12584do
12585  IFS=$as_save_IFS
12586  test -z "$as_dir" && as_dir=.
12587    for ac_exec_ext in '' $ac_executable_extensions; do
12588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12589    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12591    break 2
12592  fi
12593done
12594  done
12595IFS=$as_save_IFS
12596
12597  ;;
12598esac
12599fi
12600CYGPATH=$ac_cv_path_CYGPATH
12601if test -n "$CYGPATH"; then
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12603$as_echo "$CYGPATH" >&6; }
12604else
12605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12606$as_echo "no" >&6; }
12607fi
12608
12609
12610  test -n "$CYGPATH" && break
12611done
12612
12613    else
12614      # If it succeeded, then it was overridden by the user. We will use it
12615      # for the tool.
12616
12617      # First remove it from the list of overridden variables, so we can test
12618      # for unknown variables in the end.
12619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12620
12621      # Check if the provided tool contains a complete path.
12622      tool_specified="$CYGPATH"
12623      tool_basename="${tool_specified##*/}"
12624      if test "x$tool_basename" = "x$tool_specified"; then
12625        # A command without a complete path is provided, search $PATH.
12626        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12627$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12628        # Extract the first word of "$tool_basename", so it can be a program name with args.
12629set dummy $tool_basename; ac_word=$2
12630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12631$as_echo_n "checking for $ac_word... " >&6; }
12632if ${ac_cv_path_CYGPATH+:} false; then :
12633  $as_echo_n "(cached) " >&6
12634else
12635  case $CYGPATH in
12636  [\\/]* | ?:[\\/]*)
12637  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12638  ;;
12639  *)
12640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12641for as_dir in $PATH
12642do
12643  IFS=$as_save_IFS
12644  test -z "$as_dir" && as_dir=.
12645    for ac_exec_ext in '' $ac_executable_extensions; do
12646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12647    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12649    break 2
12650  fi
12651done
12652  done
12653IFS=$as_save_IFS
12654
12655  ;;
12656esac
12657fi
12658CYGPATH=$ac_cv_path_CYGPATH
12659if test -n "$CYGPATH"; then
12660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12661$as_echo "$CYGPATH" >&6; }
12662else
12663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12664$as_echo "no" >&6; }
12665fi
12666
12667
12668        if test "x$CYGPATH" = x; then
12669          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12670        fi
12671      else
12672        # Otherwise we believe it is a complete path. Use it as it is.
12673        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12674$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12676$as_echo_n "checking for CYGPATH... " >&6; }
12677        if test ! -x "$tool_specified"; then
12678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12679$as_echo "not found" >&6; }
12680          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12681        fi
12682        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12683$as_echo "$tool_specified" >&6; }
12684      fi
12685    fi
12686  fi
12687
12688
12689
12690
12691  # Publish this variable in the help.
12692
12693
12694  if test "x$READLINK" = x; then
12695    # The variable is not set by user, try to locate tool using the code snippet
12696    for ac_prog in greadlink readlink
12697do
12698  # Extract the first word of "$ac_prog", so it can be a program name with args.
12699set dummy $ac_prog; ac_word=$2
12700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12701$as_echo_n "checking for $ac_word... " >&6; }
12702if ${ac_cv_path_READLINK+:} false; then :
12703  $as_echo_n "(cached) " >&6
12704else
12705  case $READLINK in
12706  [\\/]* | ?:[\\/]*)
12707  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12708  ;;
12709  *)
12710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12711for as_dir in $PATH
12712do
12713  IFS=$as_save_IFS
12714  test -z "$as_dir" && as_dir=.
12715    for ac_exec_ext in '' $ac_executable_extensions; do
12716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12717    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12719    break 2
12720  fi
12721done
12722  done
12723IFS=$as_save_IFS
12724
12725  ;;
12726esac
12727fi
12728READLINK=$ac_cv_path_READLINK
12729if test -n "$READLINK"; then
12730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12731$as_echo "$READLINK" >&6; }
12732else
12733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12734$as_echo "no" >&6; }
12735fi
12736
12737
12738  test -n "$READLINK" && break
12739done
12740
12741  else
12742    # The variable is set, but is it from the command line or the environment?
12743
12744    # Try to remove the string !READLINK! from our list.
12745    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12746    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12747      # If it failed, the variable was not from the command line. Ignore it,
12748      # but warn the user (except for BASH, which is always set by the calling BASH).
12749      if test "xREADLINK" != xBASH; then
12750        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12751$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12752      fi
12753      # Try to locate tool using the code snippet
12754      for ac_prog in greadlink readlink
12755do
12756  # Extract the first word of "$ac_prog", so it can be a program name with args.
12757set dummy $ac_prog; ac_word=$2
12758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12759$as_echo_n "checking for $ac_word... " >&6; }
12760if ${ac_cv_path_READLINK+:} false; then :
12761  $as_echo_n "(cached) " >&6
12762else
12763  case $READLINK in
12764  [\\/]* | ?:[\\/]*)
12765  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12766  ;;
12767  *)
12768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12769for as_dir in $PATH
12770do
12771  IFS=$as_save_IFS
12772  test -z "$as_dir" && as_dir=.
12773    for ac_exec_ext in '' $ac_executable_extensions; do
12774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12775    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12777    break 2
12778  fi
12779done
12780  done
12781IFS=$as_save_IFS
12782
12783  ;;
12784esac
12785fi
12786READLINK=$ac_cv_path_READLINK
12787if test -n "$READLINK"; then
12788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12789$as_echo "$READLINK" >&6; }
12790else
12791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12792$as_echo "no" >&6; }
12793fi
12794
12795
12796  test -n "$READLINK" && break
12797done
12798
12799    else
12800      # If it succeeded, then it was overridden by the user. We will use it
12801      # for the tool.
12802
12803      # First remove it from the list of overridden variables, so we can test
12804      # for unknown variables in the end.
12805      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12806
12807      # Check if the provided tool contains a complete path.
12808      tool_specified="$READLINK"
12809      tool_basename="${tool_specified##*/}"
12810      if test "x$tool_basename" = "x$tool_specified"; then
12811        # A command without a complete path is provided, search $PATH.
12812        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12813$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12814        # Extract the first word of "$tool_basename", so it can be a program name with args.
12815set dummy $tool_basename; ac_word=$2
12816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12817$as_echo_n "checking for $ac_word... " >&6; }
12818if ${ac_cv_path_READLINK+:} false; then :
12819  $as_echo_n "(cached) " >&6
12820else
12821  case $READLINK in
12822  [\\/]* | ?:[\\/]*)
12823  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12824  ;;
12825  *)
12826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12827for as_dir in $PATH
12828do
12829  IFS=$as_save_IFS
12830  test -z "$as_dir" && as_dir=.
12831    for ac_exec_ext in '' $ac_executable_extensions; do
12832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12833    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12835    break 2
12836  fi
12837done
12838  done
12839IFS=$as_save_IFS
12840
12841  ;;
12842esac
12843fi
12844READLINK=$ac_cv_path_READLINK
12845if test -n "$READLINK"; then
12846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12847$as_echo "$READLINK" >&6; }
12848else
12849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12850$as_echo "no" >&6; }
12851fi
12852
12853
12854        if test "x$READLINK" = x; then
12855          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12856        fi
12857      else
12858        # Otherwise we believe it is a complete path. Use it as it is.
12859        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12860$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12861        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12862$as_echo_n "checking for READLINK... " >&6; }
12863        if test ! -x "$tool_specified"; then
12864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12865$as_echo "not found" >&6; }
12866          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12867        fi
12868        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12869$as_echo "$tool_specified" >&6; }
12870      fi
12871    fi
12872  fi
12873
12874
12875
12876
12877  # Publish this variable in the help.
12878
12879
12880  if test "x$DF" = x; then
12881    # The variable is not set by user, try to locate tool using the code snippet
12882    for ac_prog in df
12883do
12884  # Extract the first word of "$ac_prog", so it can be a program name with args.
12885set dummy $ac_prog; ac_word=$2
12886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12887$as_echo_n "checking for $ac_word... " >&6; }
12888if ${ac_cv_path_DF+:} false; then :
12889  $as_echo_n "(cached) " >&6
12890else
12891  case $DF in
12892  [\\/]* | ?:[\\/]*)
12893  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12894  ;;
12895  *)
12896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12897for as_dir in $PATH
12898do
12899  IFS=$as_save_IFS
12900  test -z "$as_dir" && as_dir=.
12901    for ac_exec_ext in '' $ac_executable_extensions; do
12902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12903    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12905    break 2
12906  fi
12907done
12908  done
12909IFS=$as_save_IFS
12910
12911  ;;
12912esac
12913fi
12914DF=$ac_cv_path_DF
12915if test -n "$DF"; then
12916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12917$as_echo "$DF" >&6; }
12918else
12919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12920$as_echo "no" >&6; }
12921fi
12922
12923
12924  test -n "$DF" && break
12925done
12926
12927  else
12928    # The variable is set, but is it from the command line or the environment?
12929
12930    # Try to remove the string !DF! from our list.
12931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12933      # If it failed, the variable was not from the command line. Ignore it,
12934      # but warn the user (except for BASH, which is always set by the calling BASH).
12935      if test "xDF" != xBASH; then
12936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12937$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12938      fi
12939      # Try to locate tool using the code snippet
12940      for ac_prog in df
12941do
12942  # Extract the first word of "$ac_prog", so it can be a program name with args.
12943set dummy $ac_prog; ac_word=$2
12944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12945$as_echo_n "checking for $ac_word... " >&6; }
12946if ${ac_cv_path_DF+:} false; then :
12947  $as_echo_n "(cached) " >&6
12948else
12949  case $DF in
12950  [\\/]* | ?:[\\/]*)
12951  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12952  ;;
12953  *)
12954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12955for as_dir in $PATH
12956do
12957  IFS=$as_save_IFS
12958  test -z "$as_dir" && as_dir=.
12959    for ac_exec_ext in '' $ac_executable_extensions; do
12960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12961    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12963    break 2
12964  fi
12965done
12966  done
12967IFS=$as_save_IFS
12968
12969  ;;
12970esac
12971fi
12972DF=$ac_cv_path_DF
12973if test -n "$DF"; then
12974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12975$as_echo "$DF" >&6; }
12976else
12977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12978$as_echo "no" >&6; }
12979fi
12980
12981
12982  test -n "$DF" && break
12983done
12984
12985    else
12986      # If it succeeded, then it was overridden by the user. We will use it
12987      # for the tool.
12988
12989      # First remove it from the list of overridden variables, so we can test
12990      # for unknown variables in the end.
12991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12992
12993      # Check if the provided tool contains a complete path.
12994      tool_specified="$DF"
12995      tool_basename="${tool_specified##*/}"
12996      if test "x$tool_basename" = "x$tool_specified"; then
12997        # A command without a complete path is provided, search $PATH.
12998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
12999$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13000        # Extract the first word of "$tool_basename", so it can be a program name with args.
13001set dummy $tool_basename; ac_word=$2
13002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13003$as_echo_n "checking for $ac_word... " >&6; }
13004if ${ac_cv_path_DF+:} false; then :
13005  $as_echo_n "(cached) " >&6
13006else
13007  case $DF in
13008  [\\/]* | ?:[\\/]*)
13009  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13010  ;;
13011  *)
13012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13013for as_dir in $PATH
13014do
13015  IFS=$as_save_IFS
13016  test -z "$as_dir" && as_dir=.
13017    for ac_exec_ext in '' $ac_executable_extensions; do
13018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13019    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13021    break 2
13022  fi
13023done
13024  done
13025IFS=$as_save_IFS
13026
13027  ;;
13028esac
13029fi
13030DF=$ac_cv_path_DF
13031if test -n "$DF"; then
13032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13033$as_echo "$DF" >&6; }
13034else
13035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13036$as_echo "no" >&6; }
13037fi
13038
13039
13040        if test "x$DF" = x; then
13041          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13042        fi
13043      else
13044        # Otherwise we believe it is a complete path. Use it as it is.
13045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13046$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13048$as_echo_n "checking for DF... " >&6; }
13049        if test ! -x "$tool_specified"; then
13050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13051$as_echo "not found" >&6; }
13052          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13053        fi
13054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13055$as_echo "$tool_specified" >&6; }
13056      fi
13057    fi
13058  fi
13059
13060
13061
13062
13063  # Publish this variable in the help.
13064
13065
13066  if test "x$SETFILE" = x; then
13067    # The variable is not set by user, try to locate tool using the code snippet
13068    for ac_prog in SetFile
13069do
13070  # Extract the first word of "$ac_prog", so it can be a program name with args.
13071set dummy $ac_prog; ac_word=$2
13072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13073$as_echo_n "checking for $ac_word... " >&6; }
13074if ${ac_cv_path_SETFILE+:} false; then :
13075  $as_echo_n "(cached) " >&6
13076else
13077  case $SETFILE in
13078  [\\/]* | ?:[\\/]*)
13079  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13080  ;;
13081  *)
13082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13083for as_dir in $PATH
13084do
13085  IFS=$as_save_IFS
13086  test -z "$as_dir" && as_dir=.
13087    for ac_exec_ext in '' $ac_executable_extensions; do
13088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13089    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13091    break 2
13092  fi
13093done
13094  done
13095IFS=$as_save_IFS
13096
13097  ;;
13098esac
13099fi
13100SETFILE=$ac_cv_path_SETFILE
13101if test -n "$SETFILE"; then
13102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13103$as_echo "$SETFILE" >&6; }
13104else
13105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13106$as_echo "no" >&6; }
13107fi
13108
13109
13110  test -n "$SETFILE" && break
13111done
13112
13113  else
13114    # The variable is set, but is it from the command line or the environment?
13115
13116    # Try to remove the string !SETFILE! from our list.
13117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13119      # If it failed, the variable was not from the command line. Ignore it,
13120      # but warn the user (except for BASH, which is always set by the calling BASH).
13121      if test "xSETFILE" != xBASH; then
13122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13123$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13124      fi
13125      # Try to locate tool using the code snippet
13126      for ac_prog in SetFile
13127do
13128  # Extract the first word of "$ac_prog", so it can be a program name with args.
13129set dummy $ac_prog; ac_word=$2
13130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13131$as_echo_n "checking for $ac_word... " >&6; }
13132if ${ac_cv_path_SETFILE+:} false; then :
13133  $as_echo_n "(cached) " >&6
13134else
13135  case $SETFILE in
13136  [\\/]* | ?:[\\/]*)
13137  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13138  ;;
13139  *)
13140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13141for as_dir in $PATH
13142do
13143  IFS=$as_save_IFS
13144  test -z "$as_dir" && as_dir=.
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13147    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13149    break 2
13150  fi
13151done
13152  done
13153IFS=$as_save_IFS
13154
13155  ;;
13156esac
13157fi
13158SETFILE=$ac_cv_path_SETFILE
13159if test -n "$SETFILE"; then
13160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13161$as_echo "$SETFILE" >&6; }
13162else
13163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13164$as_echo "no" >&6; }
13165fi
13166
13167
13168  test -n "$SETFILE" && break
13169done
13170
13171    else
13172      # If it succeeded, then it was overridden by the user. We will use it
13173      # for the tool.
13174
13175      # First remove it from the list of overridden variables, so we can test
13176      # for unknown variables in the end.
13177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13178
13179      # Check if the provided tool contains a complete path.
13180      tool_specified="$SETFILE"
13181      tool_basename="${tool_specified##*/}"
13182      if test "x$tool_basename" = "x$tool_specified"; then
13183        # A command without a complete path is provided, search $PATH.
13184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13185$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13186        # Extract the first word of "$tool_basename", so it can be a program name with args.
13187set dummy $tool_basename; ac_word=$2
13188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13189$as_echo_n "checking for $ac_word... " >&6; }
13190if ${ac_cv_path_SETFILE+:} false; then :
13191  $as_echo_n "(cached) " >&6
13192else
13193  case $SETFILE in
13194  [\\/]* | ?:[\\/]*)
13195  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13196  ;;
13197  *)
13198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13199for as_dir in $PATH
13200do
13201  IFS=$as_save_IFS
13202  test -z "$as_dir" && as_dir=.
13203    for ac_exec_ext in '' $ac_executable_extensions; do
13204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13205    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13207    break 2
13208  fi
13209done
13210  done
13211IFS=$as_save_IFS
13212
13213  ;;
13214esac
13215fi
13216SETFILE=$ac_cv_path_SETFILE
13217if test -n "$SETFILE"; then
13218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13219$as_echo "$SETFILE" >&6; }
13220else
13221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13222$as_echo "no" >&6; }
13223fi
13224
13225
13226        if test "x$SETFILE" = x; then
13227          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13228        fi
13229      else
13230        # Otherwise we believe it is a complete path. Use it as it is.
13231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13232$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13234$as_echo_n "checking for SETFILE... " >&6; }
13235        if test ! -x "$tool_specified"; then
13236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13237$as_echo "not found" >&6; }
13238          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13239        fi
13240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13241$as_echo "$tool_specified" >&6; }
13242      fi
13243    fi
13244  fi
13245
13246
13247
13248
13249  # Publish this variable in the help.
13250
13251
13252  if test "x$CPIO" = x; then
13253    # The variable is not set by user, try to locate tool using the code snippet
13254    for ac_prog in cpio bsdcpio
13255do
13256  # Extract the first word of "$ac_prog", so it can be a program name with args.
13257set dummy $ac_prog; ac_word=$2
13258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13259$as_echo_n "checking for $ac_word... " >&6; }
13260if ${ac_cv_path_CPIO+:} false; then :
13261  $as_echo_n "(cached) " >&6
13262else
13263  case $CPIO in
13264  [\\/]* | ?:[\\/]*)
13265  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13266  ;;
13267  *)
13268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13269for as_dir in $PATH
13270do
13271  IFS=$as_save_IFS
13272  test -z "$as_dir" && as_dir=.
13273    for ac_exec_ext in '' $ac_executable_extensions; do
13274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13275    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13277    break 2
13278  fi
13279done
13280  done
13281IFS=$as_save_IFS
13282
13283  ;;
13284esac
13285fi
13286CPIO=$ac_cv_path_CPIO
13287if test -n "$CPIO"; then
13288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13289$as_echo "$CPIO" >&6; }
13290else
13291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13292$as_echo "no" >&6; }
13293fi
13294
13295
13296  test -n "$CPIO" && break
13297done
13298
13299  else
13300    # The variable is set, but is it from the command line or the environment?
13301
13302    # Try to remove the string !CPIO! from our list.
13303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
13304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13305      # If it failed, the variable was not from the command line. Ignore it,
13306      # but warn the user (except for BASH, which is always set by the calling BASH).
13307      if test "xCPIO" != xBASH; then
13308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
13309$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
13310      fi
13311      # Try to locate tool using the code snippet
13312      for ac_prog in cpio bsdcpio
13313do
13314  # Extract the first word of "$ac_prog", so it can be a program name with args.
13315set dummy $ac_prog; ac_word=$2
13316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13317$as_echo_n "checking for $ac_word... " >&6; }
13318if ${ac_cv_path_CPIO+:} false; then :
13319  $as_echo_n "(cached) " >&6
13320else
13321  case $CPIO in
13322  [\\/]* | ?:[\\/]*)
13323  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13324  ;;
13325  *)
13326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13327for as_dir in $PATH
13328do
13329  IFS=$as_save_IFS
13330  test -z "$as_dir" && as_dir=.
13331    for ac_exec_ext in '' $ac_executable_extensions; do
13332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13333    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13335    break 2
13336  fi
13337done
13338  done
13339IFS=$as_save_IFS
13340
13341  ;;
13342esac
13343fi
13344CPIO=$ac_cv_path_CPIO
13345if test -n "$CPIO"; then
13346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13347$as_echo "$CPIO" >&6; }
13348else
13349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13350$as_echo "no" >&6; }
13351fi
13352
13353
13354  test -n "$CPIO" && break
13355done
13356
13357    else
13358      # If it succeeded, then it was overridden by the user. We will use it
13359      # for the tool.
13360
13361      # First remove it from the list of overridden variables, so we can test
13362      # for unknown variables in the end.
13363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13364
13365      # Check if the provided tool contains a complete path.
13366      tool_specified="$CPIO"
13367      tool_basename="${tool_specified##*/}"
13368      if test "x$tool_basename" = "x$tool_specified"; then
13369        # A command without a complete path is provided, search $PATH.
13370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
13371$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
13372        # Extract the first word of "$tool_basename", so it can be a program name with args.
13373set dummy $tool_basename; ac_word=$2
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13375$as_echo_n "checking for $ac_word... " >&6; }
13376if ${ac_cv_path_CPIO+:} false; then :
13377  $as_echo_n "(cached) " >&6
13378else
13379  case $CPIO in
13380  [\\/]* | ?:[\\/]*)
13381  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
13382  ;;
13383  *)
13384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13385for as_dir in $PATH
13386do
13387  IFS=$as_save_IFS
13388  test -z "$as_dir" && as_dir=.
13389    for ac_exec_ext in '' $ac_executable_extensions; do
13390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13391    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
13392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13393    break 2
13394  fi
13395done
13396  done
13397IFS=$as_save_IFS
13398
13399  ;;
13400esac
13401fi
13402CPIO=$ac_cv_path_CPIO
13403if test -n "$CPIO"; then
13404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
13405$as_echo "$CPIO" >&6; }
13406else
13407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13408$as_echo "no" >&6; }
13409fi
13410
13411
13412        if test "x$CPIO" = x; then
13413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13414        fi
13415      else
13416        # Otherwise we believe it is a complete path. Use it as it is.
13417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
13418$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
13419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
13420$as_echo_n "checking for CPIO... " >&6; }
13421        if test ! -x "$tool_specified"; then
13422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13423$as_echo "not found" >&6; }
13424          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
13425        fi
13426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13427$as_echo "$tool_specified" >&6; }
13428      fi
13429    fi
13430  fi
13431
13432
13433
13434
13435# Now we can determine OpenJDK build and target platforms. This is required to
13436# have early on.
13437# Make sure we can run config.sub.
13438$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13439  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13440
13441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13442$as_echo_n "checking build system type... " >&6; }
13443if ${ac_cv_build+:} false; then :
13444  $as_echo_n "(cached) " >&6
13445else
13446  ac_build_alias=$build_alias
13447test "x$ac_build_alias" = x &&
13448  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13449test "x$ac_build_alias" = x &&
13450  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13451ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13452  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13453
13454fi
13455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13456$as_echo "$ac_cv_build" >&6; }
13457case $ac_cv_build in
13458*-*-*) ;;
13459*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13460esac
13461build=$ac_cv_build
13462ac_save_IFS=$IFS; IFS='-'
13463set x $ac_cv_build
13464shift
13465build_cpu=$1
13466build_vendor=$2
13467shift; shift
13468# Remember, the first character of IFS is used to create $*,
13469# except with old shells:
13470build_os=$*
13471IFS=$ac_save_IFS
13472case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13473
13474
13475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13476$as_echo_n "checking host system type... " >&6; }
13477if ${ac_cv_host+:} false; then :
13478  $as_echo_n "(cached) " >&6
13479else
13480  if test "x$host_alias" = x; then
13481  ac_cv_host=$ac_cv_build
13482else
13483  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13484    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13485fi
13486
13487fi
13488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13489$as_echo "$ac_cv_host" >&6; }
13490case $ac_cv_host in
13491*-*-*) ;;
13492*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13493esac
13494host=$ac_cv_host
13495ac_save_IFS=$IFS; IFS='-'
13496set x $ac_cv_host
13497shift
13498host_cpu=$1
13499host_vendor=$2
13500shift; shift
13501# Remember, the first character of IFS is used to create $*,
13502# except with old shells:
13503host_os=$*
13504IFS=$ac_save_IFS
13505case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13506
13507
13508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13509$as_echo_n "checking target system type... " >&6; }
13510if ${ac_cv_target+:} false; then :
13511  $as_echo_n "(cached) " >&6
13512else
13513  if test "x$target_alias" = x; then
13514  ac_cv_target=$ac_cv_host
13515else
13516  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13517    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13518fi
13519
13520fi
13521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13522$as_echo "$ac_cv_target" >&6; }
13523case $ac_cv_target in
13524*-*-*) ;;
13525*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13526esac
13527target=$ac_cv_target
13528ac_save_IFS=$IFS; IFS='-'
13529set x $ac_cv_target
13530shift
13531target_cpu=$1
13532target_vendor=$2
13533shift; shift
13534# Remember, the first character of IFS is used to create $*,
13535# except with old shells:
13536target_os=$*
13537IFS=$ac_save_IFS
13538case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13539
13540
13541# The aliases save the names the user supplied, while $host etc.
13542# will get canonicalized.
13543test -n "$target_alias" &&
13544  test "$program_prefix$program_suffix$program_transform_name" = \
13545    NONENONEs,x,x, &&
13546  program_prefix=${target_alias}-
13547
13548  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13549  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13550  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13551  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13552  # to use the configure naming style.
13553
13554
13555
13556
13557
13558  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13559  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13560  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13561  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13562  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13563  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13564
13565
13566
13567  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13568
13569  case "$build_os" in
13570    *linux*)
13571      VAR_OS=linux
13572      VAR_OS_TYPE=unix
13573      ;;
13574    *solaris*)
13575      VAR_OS=solaris
13576      VAR_OS_TYPE=unix
13577      ;;
13578    *darwin*)
13579      VAR_OS=macosx
13580      VAR_OS_TYPE=unix
13581      ;;
13582    *bsd*)
13583      VAR_OS=bsd
13584      VAR_OS_TYPE=unix
13585      ;;
13586    *cygwin*)
13587      VAR_OS=windows
13588      VAR_OS_ENV=windows.cygwin
13589      ;;
13590    *mingw*)
13591      VAR_OS=windows
13592      VAR_OS_ENV=windows.msys
13593      ;;
13594    *aix*)
13595      VAR_OS=aix
13596      VAR_OS_TYPE=unix
13597      ;;
13598    *)
13599      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13600      ;;
13601  esac
13602
13603
13604  # First argument is the cpu name from the trip/quad
13605  case "$build_cpu" in
13606    x86_64)
13607      VAR_CPU=x86_64
13608      VAR_CPU_ARCH=x86
13609      VAR_CPU_BITS=64
13610      VAR_CPU_ENDIAN=little
13611      ;;
13612    i?86)
13613      VAR_CPU=x86
13614      VAR_CPU_ARCH=x86
13615      VAR_CPU_BITS=32
13616      VAR_CPU_ENDIAN=little
13617      ;;
13618    arm*)
13619      VAR_CPU=arm
13620      VAR_CPU_ARCH=arm
13621      VAR_CPU_BITS=32
13622      VAR_CPU_ENDIAN=little
13623      ;;
13624    aarch64)
13625      VAR_CPU=aarch64
13626      VAR_CPU_ARCH=aarch64
13627      VAR_CPU_BITS=64
13628      VAR_CPU_ENDIAN=little
13629      ;;
13630    powerpc)
13631      VAR_CPU=ppc
13632      VAR_CPU_ARCH=ppc
13633      VAR_CPU_BITS=32
13634      VAR_CPU_ENDIAN=big
13635      ;;
13636    powerpc64)
13637      VAR_CPU=ppc64
13638      VAR_CPU_ARCH=ppc
13639      VAR_CPU_BITS=64
13640      VAR_CPU_ENDIAN=big
13641      ;;
13642    powerpc64le)
13643      VAR_CPU=ppc64
13644      VAR_CPU_ARCH=ppc
13645      VAR_CPU_BITS=64
13646      VAR_CPU_ENDIAN=little
13647      ;;
13648    s390)
13649      VAR_CPU=s390
13650      VAR_CPU_ARCH=s390
13651      VAR_CPU_BITS=32
13652      VAR_CPU_ENDIAN=big
13653      ;;
13654    s390x)
13655      VAR_CPU=s390x
13656      VAR_CPU_ARCH=s390
13657      VAR_CPU_BITS=64
13658      VAR_CPU_ENDIAN=big
13659      ;;
13660    sparc)
13661      VAR_CPU=sparc
13662      VAR_CPU_ARCH=sparc
13663      VAR_CPU_BITS=32
13664      VAR_CPU_ENDIAN=big
13665      ;;
13666    sparcv9|sparc64)
13667      VAR_CPU=sparcv9
13668      VAR_CPU_ARCH=sparc
13669      VAR_CPU_BITS=64
13670      VAR_CPU_ENDIAN=big
13671      ;;
13672    *)
13673      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13674      ;;
13675  esac
13676
13677  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13678  OPENJDK_BUILD_OS="$VAR_OS"
13679  if test "x$VAR_OS_TYPE" != x; then
13680    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
13681  else
13682    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
13683  fi
13684  if test "x$VAR_OS_ENV" != x; then
13685    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13686  else
13687    OPENJDK_BUILD_OS_ENV="$VAR_OS"
13688  fi
13689  OPENJDK_BUILD_CPU="$VAR_CPU"
13690  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13691  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13692  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13693
13694
13695
13696
13697
13698
13699
13700
13701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13702$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13704$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13705
13706  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13707
13708  case "$host_os" in
13709    *linux*)
13710      VAR_OS=linux
13711      VAR_OS_TYPE=unix
13712      ;;
13713    *solaris*)
13714      VAR_OS=solaris
13715      VAR_OS_TYPE=unix
13716      ;;
13717    *darwin*)
13718      VAR_OS=macosx
13719      VAR_OS_TYPE=unix
13720      ;;
13721    *bsd*)
13722      VAR_OS=bsd
13723      VAR_OS_TYPE=unix
13724      ;;
13725    *cygwin*)
13726      VAR_OS=windows
13727      VAR_OS_ENV=windows.cygwin
13728      ;;
13729    *mingw*)
13730      VAR_OS=windows
13731      VAR_OS_ENV=windows.msys
13732      ;;
13733    *aix*)
13734      VAR_OS=aix
13735      VAR_OS_TYPE=unix
13736      ;;
13737    *)
13738      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13739      ;;
13740  esac
13741
13742
13743  # First argument is the cpu name from the trip/quad
13744  case "$host_cpu" in
13745    x86_64)
13746      VAR_CPU=x86_64
13747      VAR_CPU_ARCH=x86
13748      VAR_CPU_BITS=64
13749      VAR_CPU_ENDIAN=little
13750      ;;
13751    i?86)
13752      VAR_CPU=x86
13753      VAR_CPU_ARCH=x86
13754      VAR_CPU_BITS=32
13755      VAR_CPU_ENDIAN=little
13756      ;;
13757    arm*)
13758      VAR_CPU=arm
13759      VAR_CPU_ARCH=arm
13760      VAR_CPU_BITS=32
13761      VAR_CPU_ENDIAN=little
13762      ;;
13763    aarch64)
13764      VAR_CPU=aarch64
13765      VAR_CPU_ARCH=aarch64
13766      VAR_CPU_BITS=64
13767      VAR_CPU_ENDIAN=little
13768      ;;
13769    powerpc)
13770      VAR_CPU=ppc
13771      VAR_CPU_ARCH=ppc
13772      VAR_CPU_BITS=32
13773      VAR_CPU_ENDIAN=big
13774      ;;
13775    powerpc64)
13776      VAR_CPU=ppc64
13777      VAR_CPU_ARCH=ppc
13778      VAR_CPU_BITS=64
13779      VAR_CPU_ENDIAN=big
13780      ;;
13781    powerpc64le)
13782      VAR_CPU=ppc64
13783      VAR_CPU_ARCH=ppc
13784      VAR_CPU_BITS=64
13785      VAR_CPU_ENDIAN=little
13786      ;;
13787    s390)
13788      VAR_CPU=s390
13789      VAR_CPU_ARCH=s390
13790      VAR_CPU_BITS=32
13791      VAR_CPU_ENDIAN=big
13792      ;;
13793    s390x)
13794      VAR_CPU=s390x
13795      VAR_CPU_ARCH=s390
13796      VAR_CPU_BITS=64
13797      VAR_CPU_ENDIAN=big
13798      ;;
13799    sparc)
13800      VAR_CPU=sparc
13801      VAR_CPU_ARCH=sparc
13802      VAR_CPU_BITS=32
13803      VAR_CPU_ENDIAN=big
13804      ;;
13805    sparcv9|sparc64)
13806      VAR_CPU=sparcv9
13807      VAR_CPU_ARCH=sparc
13808      VAR_CPU_BITS=64
13809      VAR_CPU_ENDIAN=big
13810      ;;
13811    *)
13812      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13813      ;;
13814  esac
13815
13816  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13817  OPENJDK_TARGET_OS="$VAR_OS"
13818  if test "x$VAR_OS_TYPE" != x; then
13819    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
13820  else
13821    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
13822  fi
13823  if test "x$VAR_OS_ENV" != x; then
13824    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13825  else
13826    OPENJDK_TARGET_OS_ENV="$VAR_OS"
13827  fi
13828  OPENJDK_TARGET_CPU="$VAR_CPU"
13829  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13830  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13831  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13832
13833
13834
13835
13836
13837
13838
13839
13840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13841$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13843$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13844
13845
13846
13847# Check whether --with-target-bits was given.
13848if test "${with_target_bits+set}" = set; then :
13849  withval=$with_target_bits;
13850fi
13851
13852
13853  # We have three types of compiles:
13854  # native  == normal compilation, target system == build system
13855  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13856  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13857  #
13858  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13859    # We're doing a proper cross-compilation
13860    COMPILE_TYPE="cross"
13861  else
13862    COMPILE_TYPE="native"
13863  fi
13864
13865  if test "x$with_target_bits" != x; then
13866    if test "x$COMPILE_TYPE" = "xcross"; then
13867      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13868    fi
13869
13870    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13871      # A reduced build is requested
13872      COMPILE_TYPE="reduced"
13873      OPENJDK_TARGET_CPU_BITS=32
13874      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13875        OPENJDK_TARGET_CPU=x86
13876      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13877        OPENJDK_TARGET_CPU=sparc
13878      else
13879        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13880      fi
13881    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13882      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
13883    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13884      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13885$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13886    else
13887      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13888    fi
13889  fi
13890
13891
13892  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13893$as_echo_n "checking compilation type... " >&6; }
13894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13895$as_echo "$COMPILE_TYPE" >&6; }
13896
13897
13898  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13899    REQUIRED_OS_NAME=SunOS
13900    REQUIRED_OS_VERSION=5.10
13901  fi
13902  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13903    REQUIRED_OS_NAME=Linux
13904    REQUIRED_OS_VERSION=2.6
13905  fi
13906  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13907    REQUIRED_OS_NAME=Windows
13908    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13909      REQUIRED_OS_VERSION=5.2
13910    else
13911      REQUIRED_OS_VERSION=5.1
13912    fi
13913  fi
13914  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13915    REQUIRED_OS_NAME=Darwin
13916    REQUIRED_OS_VERSION=11.2
13917  fi
13918
13919
13920
13921
13922
13923  # Also store the legacy naming of the cpu.
13924  # Ie i586 and amd64 instead of x86 and x86_64
13925  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13926  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13927    OPENJDK_TARGET_CPU_LEGACY="i586"
13928  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13929    # On all platforms except MacOSX replace x86_64 with amd64.
13930    OPENJDK_TARGET_CPU_LEGACY="amd64"
13931  fi
13932
13933
13934  # And the second legacy naming of the cpu.
13935  # Ie i386 and amd64 instead of x86 and x86_64.
13936  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13937  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13938    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13939  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13940    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13941  fi
13942
13943
13944  # This is the name of the cpu (but using i386 and amd64 instead of
13945  # x86 and x86_64, respectively), preceeded by a /, to be used when
13946  # locating libraries. On macosx, it's empty, though.
13947  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13948  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13949    OPENJDK_TARGET_CPU_LIBDIR=""
13950  fi
13951
13952
13953  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13954  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13955  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13956  OPENJDK_TARGET_CPU_ISADIR=""
13957  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13958    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13959      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13960    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13961      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13962    fi
13963  fi
13964
13965
13966  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13967  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13968  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13969    # On linux only, we replace x86 with i386.
13970    OPENJDK_TARGET_CPU_OSARCH="i386"
13971  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13972    # On all platforms except macosx, we replace x86_64 with amd64.
13973    OPENJDK_TARGET_CPU_OSARCH="amd64"
13974  fi
13975
13976
13977  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13978  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13979    OPENJDK_TARGET_CPU_JLI="i386"
13980  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13981    # On all platforms except macosx, we replace x86_64 with amd64.
13982    OPENJDK_TARGET_CPU_JLI="amd64"
13983  fi
13984  # Now setup the -D flags for building libjli.
13985  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13986  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13987    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13988      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13989    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13990      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13991    fi
13992  fi
13993
13994
13995  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13996      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13997  else
13998      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
13999  fi
14000
14001
14002  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14003    A_LP64="LP64:="
14004    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
14005    # unpack200.exe
14006    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
14007      ADD_LP64="-D_LP64=1"
14008    fi
14009  fi
14010  LP64=$A_LP64
14011
14012
14013  if test "x$COMPILE_TYPE" = "xcross"; then
14014    # FIXME: ... or should this include reduced builds..?
14015    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
14016  else
14017    DEFINE_CROSS_COMPILE_ARCH=""
14018  fi
14019
14020
14021  # ZERO_ARCHDEF is used to enable architecture-specific code
14022  case "${OPENJDK_TARGET_CPU}" in
14023    ppc)     ZERO_ARCHDEF=PPC32 ;;
14024    ppc64)   ZERO_ARCHDEF=PPC64 ;;
14025    s390*)   ZERO_ARCHDEF=S390  ;;
14026    sparc*)  ZERO_ARCHDEF=SPARC ;;
14027    x86_64*) ZERO_ARCHDEF=AMD64 ;;
14028    x86)     ZERO_ARCHDEF=IA32  ;;
14029    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
14030  esac
14031
14032
14033
14034
14035# Continue setting up basic stuff. Most remaining code require fundamental tools.
14036
14037  # Save the current directory this script was started from
14038  CURDIR="$PWD"
14039
14040  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
14041    PATH_SEP=";"
14042
14043  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
14044  if test $SRC_ROOT_LENGTH -gt 100; then
14045    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
14046  fi
14047
14048  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
14050$as_echo_n "checking cygwin release... " >&6; }
14051    CYGWIN_VERSION=`$UNAME -r`
14052    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
14053$as_echo "$CYGWIN_VERSION" >&6; }
14054    WINDOWS_ENV_VENDOR='cygwin'
14055    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
14056
14057    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
14058    if test "x$CYGWIN_VERSION_OK" = x; then
14059      { $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
14060$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;}
14061      as_fn_error $? "Cannot continue" "$LINENO" 5
14062    fi
14063    if test "x$CYGPATH" = x; then
14064      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14065    fi
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14067$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14068    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14069    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14070    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14071    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14073$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14074    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14075    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14076    if test "x$test_cygdrive_prefix" = x; then
14077      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14078    fi
14079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14080    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14081$as_echo_n "checking msys release... " >&6; }
14082    MSYS_VERSION=`$UNAME -r`
14083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14084$as_echo "$MSYS_VERSION" >&6; }
14085
14086    WINDOWS_ENV_VENDOR='msys'
14087    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14088
14089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14090$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14091    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14092    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14093
14094  windows_path="$MSYS_ROOT_PATH"
14095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14096    unix_path=`$CYGPATH -u "$windows_path"`
14097    MSYS_ROOT_PATH="$unix_path"
14098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14100    MSYS_ROOT_PATH="$unix_path"
14101  fi
14102
14103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14104$as_echo "$MSYS_ROOT_PATH" >&6; }
14105    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14106  else
14107    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14108  fi
14109
14110  # Test if windows or unix (cygwin/msys) find is first in path.
14111  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14112$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14113  FIND_BINARY_OUTPUT=`find --version 2>&1`
14114  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14116$as_echo "unix style" >&6; }
14117  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14119$as_echo "Windows" >&6; }
14120    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14121$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14122    { $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
14123$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14124    as_fn_error $? "Cannot continue" "$LINENO" 5
14125  else
14126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14127$as_echo "unknown" >&6; }
14128    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14129$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14130  fi
14131
14132  else
14133    PATH_SEP=":"
14134  fi
14135
14136
14137  # We get the top-level directory from the supporting wrappers.
14138  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14139$as_echo_n "checking for top-level directory... " >&6; }
14140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14141$as_echo "$TOPDIR" >&6; }
14142
14143
14144  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14145
14146  # Only process if variable expands to non-empty
14147
14148  if test "x$CURDIR" != x; then
14149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14150
14151  # Input might be given as Windows format, start by converting to
14152  # unix format.
14153  path="$CURDIR"
14154  new_path=`$CYGPATH -u "$path"`
14155
14156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14159  # "foo.exe" is OK but "foo" is an error.
14160  #
14161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14162  # It is also a way to make sure we got the proper file name for the real test later on.
14163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14164  if test "x$test_shortpath" = x; then
14165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14166$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14167    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14168  fi
14169
14170  # Call helper function which possibly converts this using DOS-style short mode.
14171  # If so, the updated path is stored in $new_path.
14172
14173  input_path="$new_path"
14174  # Check if we need to convert this using DOS-style short mode. If the path
14175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14176  # take no chances and rewrite it.
14177  # Note: m4 eats our [], so we need to use [ and ] instead.
14178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14179  if test "x$has_forbidden_chars" != x; then
14180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14184      # Going to short mode and back again did indeed matter. Since short mode is
14185      # case insensitive, let's make it lowercase to improve readability.
14186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14187      # Now convert it back to Unix-stile (cygpath)
14188      input_path=`$CYGPATH -u "$shortmode_path"`
14189      new_path="$input_path"
14190    fi
14191  fi
14192
14193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14194  if test "x$test_cygdrive_prefix" = x; then
14195    # As a simple fix, exclude /usr/bin since it's not a real path.
14196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14198      # a path prefixed by /cygdrive for fixpath to work.
14199      new_path="$CYGWIN_ROOT_PATH$input_path"
14200    fi
14201  fi
14202
14203
14204  if test "x$path" != "x$new_path"; then
14205    CURDIR="$new_path"
14206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14207$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14208  fi
14209
14210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14211
14212  path="$CURDIR"
14213  has_colon=`$ECHO $path | $GREP ^.:`
14214  new_path="$path"
14215  if test "x$has_colon" = x; then
14216    # Not in mixed or Windows style, start by that.
14217    new_path=`cmd //c echo $path`
14218  fi
14219
14220
14221  input_path="$new_path"
14222  # Check if we need to convert this using DOS-style short mode. If the path
14223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14224  # take no chances and rewrite it.
14225  # Note: m4 eats our [], so we need to use [ and ] instead.
14226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14227  if test "x$has_forbidden_chars" != x; then
14228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14230  fi
14231
14232
14233  windows_path="$new_path"
14234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14235    unix_path=`$CYGPATH -u "$windows_path"`
14236    new_path="$unix_path"
14237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14239    new_path="$unix_path"
14240  fi
14241
14242  if test "x$path" != "x$new_path"; then
14243    CURDIR="$new_path"
14244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14245$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14246  fi
14247
14248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14250
14251    else
14252      # We're on a unix platform. Hooray! :)
14253      path="$CURDIR"
14254      has_space=`$ECHO "$path" | $GREP " "`
14255      if test "x$has_space" != x; then
14256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14257$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14259      fi
14260
14261      # Use eval to expand a potential ~
14262      eval path="$path"
14263      if test ! -f "$path" && test ! -d "$path"; then
14264        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14265      fi
14266
14267      CURDIR="`cd "$path"; $THEPWDCMD -L`"
14268    fi
14269  fi
14270
14271
14272  # Only process if variable expands to non-empty
14273
14274  if test "x$TOPDIR" != x; then
14275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14276
14277  # Input might be given as Windows format, start by converting to
14278  # unix format.
14279  path="$TOPDIR"
14280  new_path=`$CYGPATH -u "$path"`
14281
14282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14285  # "foo.exe" is OK but "foo" is an error.
14286  #
14287  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14288  # It is also a way to make sure we got the proper file name for the real test later on.
14289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14290  if test "x$test_shortpath" = x; then
14291    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14292$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14293    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14294  fi
14295
14296  # Call helper function which possibly converts this using DOS-style short mode.
14297  # If so, the updated path is stored in $new_path.
14298
14299  input_path="$new_path"
14300  # Check if we need to convert this using DOS-style short mode. If the path
14301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14302  # take no chances and rewrite it.
14303  # Note: m4 eats our [], so we need to use [ and ] instead.
14304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14305  if test "x$has_forbidden_chars" != x; then
14306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14307    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14308    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14309    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14310      # Going to short mode and back again did indeed matter. Since short mode is
14311      # case insensitive, let's make it lowercase to improve readability.
14312      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14313      # Now convert it back to Unix-stile (cygpath)
14314      input_path=`$CYGPATH -u "$shortmode_path"`
14315      new_path="$input_path"
14316    fi
14317  fi
14318
14319  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14320  if test "x$test_cygdrive_prefix" = x; then
14321    # As a simple fix, exclude /usr/bin since it's not a real path.
14322    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14323      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14324      # a path prefixed by /cygdrive for fixpath to work.
14325      new_path="$CYGWIN_ROOT_PATH$input_path"
14326    fi
14327  fi
14328
14329
14330  if test "x$path" != "x$new_path"; then
14331    TOPDIR="$new_path"
14332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14333$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14334  fi
14335
14336    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14337
14338  path="$TOPDIR"
14339  has_colon=`$ECHO $path | $GREP ^.:`
14340  new_path="$path"
14341  if test "x$has_colon" = x; then
14342    # Not in mixed or Windows style, start by that.
14343    new_path=`cmd //c echo $path`
14344  fi
14345
14346
14347  input_path="$new_path"
14348  # Check if we need to convert this using DOS-style short mode. If the path
14349  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14350  # take no chances and rewrite it.
14351  # Note: m4 eats our [], so we need to use [ and ] instead.
14352  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14353  if test "x$has_forbidden_chars" != x; then
14354    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14355    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14356  fi
14357
14358
14359  windows_path="$new_path"
14360  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14361    unix_path=`$CYGPATH -u "$windows_path"`
14362    new_path="$unix_path"
14363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14364    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14365    new_path="$unix_path"
14366  fi
14367
14368  if test "x$path" != "x$new_path"; then
14369    TOPDIR="$new_path"
14370    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14371$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14372  fi
14373
14374  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14375  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14376
14377    else
14378      # We're on a unix platform. Hooray! :)
14379      path="$TOPDIR"
14380      has_space=`$ECHO "$path" | $GREP " "`
14381      if test "x$has_space" != x; then
14382        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14383$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14384        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14385      fi
14386
14387      # Use eval to expand a potential ~
14388      eval path="$path"
14389      if test ! -f "$path" && test ! -d "$path"; then
14390        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14391      fi
14392
14393      TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14394    fi
14395  fi
14396
14397  # SRC_ROOT is a traditional alias for TOPDIR.
14398  SRC_ROOT=$TOPDIR
14399
14400  # Locate the directory of this script.
14401  AUTOCONF_DIR=$TOPDIR/common/autoconf
14402
14403
14404  # Setup default logging of stdout and stderr to build.log in the output root.
14405  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14406  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14407  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14408
14409
14410
14411
14412
14413# Check if it's a pure open build or if custom sources are to be used.
14414
14415  # Check whether --enable-openjdk-only was given.
14416if test "${enable_openjdk_only+set}" = set; then :
14417  enableval=$enable_openjdk_only;
14418else
14419  enable_openjdk_only="no"
14420fi
14421
14422
14423  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14424$as_echo_n "checking for presence of closed sources... " >&6; }
14425  if test -d "$SRC_ROOT/jdk/src/closed"; then
14426    CLOSED_SOURCE_PRESENT=yes
14427  else
14428    CLOSED_SOURCE_PRESENT=no
14429  fi
14430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14431$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14432
14433  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14434$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14435  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14437$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14438
14439  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14440    OPENJDK=true
14441    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14442      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14443$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14444    fi
14445  else
14446    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14447      OPENJDK=true
14448    else
14449      OPENJDK=false
14450    fi
14451  fi
14452
14453  if test "x$OPENJDK" = "xtrue"; then
14454    SET_OPENJDK="OPENJDK=true"
14455  fi
14456
14457
14458
14459  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14460  # the IncludeCustomExtension macro.
14461
14462
14463# Check whether --with-custom-make-dir was given.
14464if test "${with_custom_make_dir+set}" = set; then :
14465  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
14466$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14467fi
14468
14469
14470
14471
14472# These are needed to be able to create a configuration name (and thus the output directory)
14473
14474  ###############################################################################
14475  #
14476  # Check which variant of the JDK that we want to build.
14477  # Currently we have:
14478  #    normal:   standard edition
14479  # but the custom make system may add other variants
14480  #
14481  # Effectively the JDK variant gives a name to a specific set of
14482  # modules to compile into the JDK. In the future, these modules
14483  # might even be Jigsaw modules.
14484  #
14485  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14486$as_echo_n "checking which variant of the JDK to build... " >&6; }
14487
14488# Check whether --with-jdk-variant was given.
14489if test "${with_jdk_variant+set}" = set; then :
14490  withval=$with_jdk_variant;
14491fi
14492
14493
14494  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14495    JDK_VARIANT="normal"
14496  else
14497    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14498  fi
14499
14500
14501
14502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14503$as_echo "$JDK_VARIANT" >&6; }
14504
14505
14506###############################################################################
14507#
14508# Check which interpreter of the JVM we want to build.
14509# Currently we have:
14510#    template: Template interpreter (the default)
14511#    cpp     : C++ interpreter
14512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14513$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14514
14515# Check whether --with-jvm-interpreter was given.
14516if test "${with_jvm_interpreter+set}" = set; then :
14517  withval=$with_jvm_interpreter;
14518fi
14519
14520
14521if test "x$with_jvm_interpreter" = x; then
14522     with_jvm_interpreter="template"
14523fi
14524
14525JVM_INTERPRETER="$with_jvm_interpreter"
14526
14527if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14528   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14529fi
14530
14531
14532
14533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14534$as_echo "$with_jvm_interpreter" >&6; }
14535
14536
14537
14538  ###############################################################################
14539  #
14540  # Check which variants of the JVM that we want to build.
14541  # Currently we have:
14542  #    server: normal interpreter and a tiered C1/C2 compiler
14543  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14544  #    minimal1: reduced form of client with optional VM services and features stripped out
14545  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14546  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14547  #    zero: no machine code interpreter, no compiler
14548  #    zeroshark: zero interpreter and shark/llvm compiler backend
14549#    core: interpreter only, no compiler (only works on some platforms)
14550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14551$as_echo_n "checking which variants of the JVM to build... " >&6; }
14552
14553# Check whether --with-jvm-variants was given.
14554if test "${with_jvm_variants+set}" = set; then :
14555  withval=$with_jvm_variants;
14556fi
14557
14558
14559  if test "x$with_jvm_variants" = x; then
14560    with_jvm_variants="server"
14561  fi
14562
14563  JVM_VARIANTS=",$with_jvm_variants,"
14564  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,//'`
14565
14566  if test "x$TEST_VARIANTS" != "x,"; then
14567     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14568  fi
14569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14570$as_echo "$with_jvm_variants" >&6; }
14571
14572  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14573  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14574  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14575  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14576  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14577  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14578  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14579
14580  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14581    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14582      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14583    fi
14584  fi
14585  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14586    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14587      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14588    fi
14589  fi
14590  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14591    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14592      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14593    fi
14594  fi
14595
14596  # Replace the commas with AND for use in the build directory name.
14597  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14598  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/'`
14599  if test "x$COUNT_VARIANTS" != "x,1"; then
14600    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14601  else
14602    BUILDING_MULTIPLE_JVM_VARIANTS=no
14603  fi
14604
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614  INCLUDE_SA=true
14615  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14616    INCLUDE_SA=false
14617  fi
14618  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14619    INCLUDE_SA=false
14620  fi
14621  if test "x$OPENJDK_TARGET_OS" = xaix ; then
14622    INCLUDE_SA=false
14623  fi
14624  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
14625    INCLUDE_SA=false
14626  fi
14627
14628
14629  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14630    MACOSX_UNIVERSAL="true"
14631  fi
14632
14633
14634
14635
14636  ###############################################################################
14637  #
14638  # Set the debug level
14639  #    release: no debug information, all optimizations, no asserts.
14640  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14641  #    fastdebug: debug information (-g), all optimizations, all asserts
14642  #    slowdebug: debug information (-g), no optimizations, all asserts
14643  #
14644  DEBUG_LEVEL="release"
14645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14646$as_echo_n "checking which debug level to use... " >&6; }
14647  # Check whether --enable-debug was given.
14648if test "${enable_debug+set}" = set; then :
14649  enableval=$enable_debug;
14650        ENABLE_DEBUG="${enableval}"
14651        DEBUG_LEVEL="fastdebug"
14652
14653else
14654  ENABLE_DEBUG="no"
14655fi
14656
14657
14658
14659# Check whether --with-debug-level was given.
14660if test "${with_debug_level+set}" = set; then :
14661  withval=$with_debug_level;
14662        DEBUG_LEVEL="${withval}"
14663        if test "x$ENABLE_DEBUG" = xyes; then
14664          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14665        fi
14666
14667fi
14668
14669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14670$as_echo "$DEBUG_LEVEL" >&6; }
14671
14672  if test "x$DEBUG_LEVEL" != xrelease && \
14673      test "x$DEBUG_LEVEL" != xoptimized && \
14674      test "x$DEBUG_LEVEL" != xfastdebug && \
14675      test "x$DEBUG_LEVEL" != xslowdebug; then
14676    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14677  fi
14678
14679
14680  ###############################################################################
14681  #
14682  # Setup legacy vars/targets and new vars to deal with different debug levels.
14683  #
14684
14685  case $DEBUG_LEVEL in
14686    release )
14687      VARIANT="OPT"
14688      FASTDEBUG="false"
14689      DEBUG_CLASSFILES="false"
14690      BUILD_VARIANT_RELEASE=""
14691      HOTSPOT_DEBUG_LEVEL="product"
14692      HOTSPOT_EXPORT="product"
14693      ;;
14694    fastdebug )
14695      VARIANT="DBG"
14696      FASTDEBUG="true"
14697      DEBUG_CLASSFILES="true"
14698      BUILD_VARIANT_RELEASE="-fastdebug"
14699      HOTSPOT_DEBUG_LEVEL="fastdebug"
14700      HOTSPOT_EXPORT="fastdebug"
14701      ;;
14702    slowdebug )
14703      VARIANT="DBG"
14704      FASTDEBUG="false"
14705      DEBUG_CLASSFILES="true"
14706      BUILD_VARIANT_RELEASE="-debug"
14707      HOTSPOT_DEBUG_LEVEL="debug"
14708      HOTSPOT_EXPORT="debug"
14709      ;;
14710    optimized )
14711      VARIANT="OPT"
14712      FASTDEBUG="false"
14713      DEBUG_CLASSFILES="false"
14714      BUILD_VARIANT_RELEASE="-optimized"
14715      HOTSPOT_DEBUG_LEVEL="optimized"
14716      HOTSPOT_EXPORT="optimized"
14717      ;;
14718  esac
14719
14720  # The debug level 'optimized' is a little special because it is currently only
14721  # applicable to the HotSpot build where it means to build a completely
14722  # optimized version of the VM without any debugging code (like for the
14723  # 'release' debug level which is called 'product' in the HotSpot build) but
14724  # with the exception that it can contain additional code which is otherwise
14725  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14726  # test new and/or experimental features which are not intended for customer
14727  # shipment. Because these new features need to be tested and benchmarked in
14728  # real world scenarios, we want to build the containing JDK at the 'release'
14729  # debug level.
14730  if test "x$DEBUG_LEVEL" = xoptimized; then
14731    DEBUG_LEVEL="release"
14732  fi
14733
14734  #####
14735  # Generate the legacy makefile targets for hotspot.
14736  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14737  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14738  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14739  # But until then ...
14740  HOTSPOT_TARGET=""
14741
14742  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14743    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14744  fi
14745
14746  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14747    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14748  fi
14749
14750  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14752  fi
14753
14754  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14755    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14756  fi
14757
14758  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14759    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14760  fi
14761
14762  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14763    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14764  fi
14765
14766  if test "x$JVM_VARIANT_CORE" = xtrue; then
14767    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14768  fi
14769
14770  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14771
14772  # On Macosx universal binaries are produced, but they only contain
14773  # 64 bit intel. This invalidates control of which jvms are built
14774  # from configure, but only server is valid anyway. Fix this
14775  # when hotspot makefiles are rewritten.
14776  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14777    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14778  fi
14779
14780  #####
14781
14782
14783
14784
14785
14786
14787
14788
14789# With basic setup done, call the custom early hook.
14790
14791
14792# Check if we have devkits, extra paths or sysroot set.
14793
14794
14795# Check whether --with-devkit was given.
14796if test "${with_devkit+set}" = set; then :
14797  withval=$with_devkit;
14798
14799  # Only process if variable expands to non-empty
14800
14801  if test "x$with_devkit" != x; then
14802    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14803
14804  # Input might be given as Windows format, start by converting to
14805  # unix format.
14806  path="$with_devkit"
14807  new_path=`$CYGPATH -u "$path"`
14808
14809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14812  # "foo.exe" is OK but "foo" is an error.
14813  #
14814  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14815  # It is also a way to make sure we got the proper file name for the real test later on.
14816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14817  if test "x$test_shortpath" = x; then
14818    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14819$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14820    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14821  fi
14822
14823  # Call helper function which possibly converts this using DOS-style short mode.
14824  # If so, the updated path is stored in $new_path.
14825
14826  input_path="$new_path"
14827  # Check if we need to convert this using DOS-style short mode. If the path
14828  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14829  # take no chances and rewrite it.
14830  # Note: m4 eats our [], so we need to use [ and ] instead.
14831  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14832  if test "x$has_forbidden_chars" != x; then
14833    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14834    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14835    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14836    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14837      # Going to short mode and back again did indeed matter. Since short mode is
14838      # case insensitive, let's make it lowercase to improve readability.
14839      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14840      # Now convert it back to Unix-stile (cygpath)
14841      input_path=`$CYGPATH -u "$shortmode_path"`
14842      new_path="$input_path"
14843    fi
14844  fi
14845
14846  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14847  if test "x$test_cygdrive_prefix" = x; then
14848    # As a simple fix, exclude /usr/bin since it's not a real path.
14849    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14850      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14851      # a path prefixed by /cygdrive for fixpath to work.
14852      new_path="$CYGWIN_ROOT_PATH$input_path"
14853    fi
14854  fi
14855
14856
14857  if test "x$path" != "x$new_path"; then
14858    with_devkit="$new_path"
14859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14860$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14861  fi
14862
14863    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14864
14865  path="$with_devkit"
14866  has_colon=`$ECHO $path | $GREP ^.:`
14867  new_path="$path"
14868  if test "x$has_colon" = x; then
14869    # Not in mixed or Windows style, start by that.
14870    new_path=`cmd //c echo $path`
14871  fi
14872
14873
14874  input_path="$new_path"
14875  # Check if we need to convert this using DOS-style short mode. If the path
14876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14877  # take no chances and rewrite it.
14878  # Note: m4 eats our [], so we need to use [ and ] instead.
14879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14880  if test "x$has_forbidden_chars" != x; then
14881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14882    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14883  fi
14884
14885
14886  windows_path="$new_path"
14887  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14888    unix_path=`$CYGPATH -u "$windows_path"`
14889    new_path="$unix_path"
14890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14891    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14892    new_path="$unix_path"
14893  fi
14894
14895  if test "x$path" != "x$new_path"; then
14896    with_devkit="$new_path"
14897    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14898$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14899  fi
14900
14901  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14902  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14903
14904    else
14905      # We're on a unix platform. Hooray! :)
14906      path="$with_devkit"
14907      has_space=`$ECHO "$path" | $GREP " "`
14908      if test "x$has_space" != x; then
14909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14910$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14911        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14912      fi
14913
14914      # Use eval to expand a potential ~
14915      eval path="$path"
14916      if test ! -f "$path" && test ! -d "$path"; then
14917        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14918      fi
14919
14920      with_devkit="`cd "$path"; $THEPWDCMD -L`"
14921    fi
14922  fi
14923
14924        DEVKIT_ROOT="$with_devkit"
14925        # Check for a meta data info file in the root of the devkit
14926        if test -f "$DEVKIT_ROOT/devkit.info"; then
14927          # This potentially sets the following:
14928          # DEVKIT_NAME: A descriptive name of the devkit
14929          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14930          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14931          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14932          . $DEVKIT_ROOT/devkit.info
14933        fi
14934
14935        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14936$as_echo_n "checking for devkit... " >&6; }
14937        if test "x$DEVKIT_NAME" != x; then
14938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14939$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14940        else
14941          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14942$as_echo "$DEVKIT_ROOT" >&6; }
14943        fi
14944
14945        if test "x$DEVKIT_EXTRA_PATH" != x; then
14946
14947  if test "x$DEVKIT_EXTRA_PATH" != x; then
14948    if test "x$EXTRA_PATH" = x; then
14949      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14950    else
14951      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14952    fi
14953  fi
14954
14955        fi
14956
14957        # Fallback default of just /bin if DEVKIT_PATH is not defined
14958        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14959          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14960        fi
14961
14962  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14963    if test "x$TOOLCHAIN_PATH" = x; then
14964      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14965    else
14966      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14967    fi
14968  fi
14969
14970
14971        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14972        # places for backwards compatiblity.
14973        if test "x$DEVKIT_SYSROOT" != x; then
14974          SYSROOT="$DEVKIT_SYSROOT"
14975        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14976          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14977        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14978          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14979        fi
14980
14981
14982fi
14983
14984
14985  # You can force the sysroot if the sysroot encoded into the compiler tools
14986  # is not correct.
14987
14988# Check whether --with-sys-root was given.
14989if test "${with_sys_root+set}" = set; then :
14990  withval=$with_sys_root; SYSROOT=$with_sys_root
14991
14992fi
14993
14994
14995
14996# Check whether --with-sysroot was given.
14997if test "${with_sysroot+set}" = set; then :
14998  withval=$with_sysroot; SYSROOT=$with_sysroot
14999
15000fi
15001
15002
15003
15004# Check whether --with-tools-dir was given.
15005if test "${with_tools_dir+set}" = set; then :
15006  withval=$with_tools_dir;
15007  if test "x$with_tools_dir" != x; then
15008    if test "x$TOOLCHAIN_PATH" = x; then
15009      TOOLCHAIN_PATH="$with_tools_dir"
15010    else
15011      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
15012    fi
15013  fi
15014
15015
15016fi
15017
15018
15019
15020# Check whether --with-toolchain-path was given.
15021if test "${with_toolchain_path+set}" = set; then :
15022  withval=$with_toolchain_path;
15023  if test "x$with_toolchain_path" != x; then
15024    if test "x$TOOLCHAIN_PATH" = x; then
15025      TOOLCHAIN_PATH="$with_toolchain_path"
15026    else
15027      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
15028    fi
15029  fi
15030
15031
15032fi
15033
15034
15035
15036# Check whether --with-extra-path was given.
15037if test "${with_extra_path+set}" = set; then :
15038  withval=$with_extra_path;
15039  if test "x$with_extra_path" != x; then
15040    if test "x$EXTRA_PATH" = x; then
15041      EXTRA_PATH="$with_extra_path"
15042    else
15043      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
15044    fi
15045  fi
15046
15047
15048fi
15049
15050
15051  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
15052    # detect if Xcode is installed by running xcodebuild -version
15053    # if no Xcode installed, xcodebuild exits with 1
15054    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
15055    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
15056      # We need to use xcodebuild in the toolchain dir provided by the user, this will
15057      # fall back on the stub binary in /usr/bin/xcodebuild
15058      # Extract the first word of "xcodebuild", so it can be a program name with args.
15059set dummy xcodebuild; ac_word=$2
15060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15061$as_echo_n "checking for $ac_word... " >&6; }
15062if ${ac_cv_path_XCODEBUILD+:} false; then :
15063  $as_echo_n "(cached) " >&6
15064else
15065  case $XCODEBUILD in
15066  [\\/]* | ?:[\\/]*)
15067  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
15068  ;;
15069  *)
15070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15071for as_dir in $TOOLCHAIN_PATH
15072do
15073  IFS=$as_save_IFS
15074  test -z "$as_dir" && as_dir=.
15075    for ac_exec_ext in '' $ac_executable_extensions; do
15076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15077    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15079    break 2
15080  fi
15081done
15082  done
15083IFS=$as_save_IFS
15084
15085  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15086  ;;
15087esac
15088fi
15089XCODEBUILD=$ac_cv_path_XCODEBUILD
15090if test -n "$XCODEBUILD"; then
15091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15092$as_echo "$XCODEBUILD" >&6; }
15093else
15094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15095$as_echo "no" >&6; }
15096fi
15097
15098
15099    else
15100      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15101      # when only the command line tools are installed there are no SDKs, so headers
15102      # are copied into the system frameworks
15103      XCODEBUILD=
15104
15105    fi
15106
15107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15108$as_echo_n "checking for sdk name... " >&6; }
15109
15110# Check whether --with-sdk-name was given.
15111if test "${with_sdk_name+set}" = set; then :
15112  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15113
15114fi
15115
15116    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15117$as_echo "$SDKNAME" >&6; }
15118
15119    # if toolchain path is specified then don't rely on system headers, they may not compile
15120    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15121    test -z "$TOOLCHAIN_PATH" && \
15122      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15123
15124    if test -z "$SYSROOT"; then
15125      if test -n "$XCODEBUILD"; then
15126        # if we don't have system headers, use default SDK name (last resort)
15127        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15128          SDKNAME=${SDKNAME:-macosx}
15129        fi
15130
15131        if test -n "$SDKNAME"; then
15132          # Call xcodebuild to determine SYSROOT
15133          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15134        fi
15135      else
15136        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15137          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
15138        fi
15139      fi
15140    else
15141      # warn user if --with-sdk-name was also set
15142      if test -n "$with_sdk_name"; then
15143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15144$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15145      fi
15146    fi
15147
15148    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15149      # If no system framework headers, then SYSROOT must be set, or we won't build
15150      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
15151    fi
15152
15153    # Perform a basic sanity test
15154    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15155      if test -z "$SYSROOT"; then
15156        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
15157      else
15158        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15159      fi
15160    fi
15161
15162    # set SDKROOT too, Xcode tools will pick it up
15163    SDKROOT=$SYSROOT
15164
15165  fi
15166
15167  # Prepend the extra path to the global path
15168
15169  if test "x$EXTRA_PATH" != x; then
15170    if test "x$PATH" = x; then
15171      PATH="$EXTRA_PATH"
15172    else
15173      PATH="$EXTRA_PATH:$PATH"
15174    fi
15175  fi
15176
15177
15178  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15179    # Add extra search paths on solaris for utilities like ar and as etc...
15180    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15181  fi
15182
15183  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15184$as_echo_n "checking for sysroot... " >&6; }
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15186$as_echo "$SYSROOT" >&6; }
15187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15188$as_echo_n "checking for toolchain path... " >&6; }
15189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15190$as_echo "$TOOLCHAIN_PATH" >&6; }
15191  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15192$as_echo_n "checking for extra path... " >&6; }
15193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15194$as_echo "$EXTRA_PATH" >&6; }
15195
15196
15197# To properly create a configuration name, we need to have the OpenJDK target
15198# and options (variants and debug level) parsed.
15199
15200
15201
15202# Check whether --with-conf-name was given.
15203if test "${with_conf_name+set}" = set; then :
15204  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15205fi
15206
15207
15208  # Test from where we are running configure, in or outside of src root.
15209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15210$as_echo_n "checking where to store configuration... " >&6; }
15211  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15212      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15213      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15214    # We are running configure from the src root.
15215    # Create a default ./build/target-variant-debuglevel output root.
15216    if test "x${CONF_NAME}" = x; then
15217      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15218$as_echo "in default location" >&6; }
15219      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15220    else
15221      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15222$as_echo "in build directory with custom name" >&6; }
15223    fi
15224    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15225    $MKDIR -p "$OUTPUT_ROOT"
15226    if test ! -d "$OUTPUT_ROOT"; then
15227      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15228    fi
15229  else
15230    # We are running configure from outside of the src dir.
15231    # Then use the current directory as output dir!
15232    # If configuration is situated in normal build directory, just use the build
15233    # directory name as configuration name, otherwise use the complete path.
15234    if test "x${CONF_NAME}" = x; then
15235      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15236    fi
15237    OUTPUT_ROOT="$CURDIR"
15238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15239$as_echo "in current directory" >&6; }
15240
15241    # WARNING: This might be a bad thing to do. You need to be sure you want to
15242    # have a configuration in this directory. Do some sanity checks!
15243
15244    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15245      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15246      # other files
15247      files_present=`$LS $OUTPUT_ROOT`
15248      # Configure has already touched config.log and confdefs.h in the current dir when this check
15249      # is performed.
15250      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15251      | $TR -d '\n'`
15252      if test "x$filtered_files" != x; then
15253        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15254$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15255        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15256$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15257        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15258$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15259        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15260$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15261        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15262$as_echo "$as_me: seriously mess up just about everything." >&6;}
15263        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15264$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15265        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15266$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15267        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15268      fi
15269    fi
15270  fi
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15272$as_echo_n "checking what configuration name to use... " >&6; }
15273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15274$as_echo "$CONF_NAME" >&6; }
15275
15276
15277  # Only process if variable expands to non-empty
15278
15279  if test "x$OUTPUT_ROOT" != x; then
15280    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15281
15282  # Input might be given as Windows format, start by converting to
15283  # unix format.
15284  path="$OUTPUT_ROOT"
15285  new_path=`$CYGPATH -u "$path"`
15286
15287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15290  # "foo.exe" is OK but "foo" is an error.
15291  #
15292  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15293  # It is also a way to make sure we got the proper file name for the real test later on.
15294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15295  if test "x$test_shortpath" = x; then
15296    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15297$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15298    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15299  fi
15300
15301  # Call helper function which possibly converts this using DOS-style short mode.
15302  # If so, the updated path is stored in $new_path.
15303
15304  input_path="$new_path"
15305  # Check if we need to convert this using DOS-style short mode. If the path
15306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15307  # take no chances and rewrite it.
15308  # Note: m4 eats our [], so we need to use [ and ] instead.
15309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15310  if test "x$has_forbidden_chars" != x; then
15311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15312    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15313    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15314    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15315      # Going to short mode and back again did indeed matter. Since short mode is
15316      # case insensitive, let's make it lowercase to improve readability.
15317      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15318      # Now convert it back to Unix-stile (cygpath)
15319      input_path=`$CYGPATH -u "$shortmode_path"`
15320      new_path="$input_path"
15321    fi
15322  fi
15323
15324  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15325  if test "x$test_cygdrive_prefix" = x; then
15326    # As a simple fix, exclude /usr/bin since it's not a real path.
15327    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15328      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15329      # a path prefixed by /cygdrive for fixpath to work.
15330      new_path="$CYGWIN_ROOT_PATH$input_path"
15331    fi
15332  fi
15333
15334
15335  if test "x$path" != "x$new_path"; then
15336    OUTPUT_ROOT="$new_path"
15337    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15338$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15339  fi
15340
15341    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15342
15343  path="$OUTPUT_ROOT"
15344  has_colon=`$ECHO $path | $GREP ^.:`
15345  new_path="$path"
15346  if test "x$has_colon" = x; then
15347    # Not in mixed or Windows style, start by that.
15348    new_path=`cmd //c echo $path`
15349  fi
15350
15351
15352  input_path="$new_path"
15353  # Check if we need to convert this using DOS-style short mode. If the path
15354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15355  # take no chances and rewrite it.
15356  # Note: m4 eats our [], so we need to use [ and ] instead.
15357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15358  if test "x$has_forbidden_chars" != x; then
15359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15361  fi
15362
15363
15364  windows_path="$new_path"
15365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15366    unix_path=`$CYGPATH -u "$windows_path"`
15367    new_path="$unix_path"
15368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15370    new_path="$unix_path"
15371  fi
15372
15373  if test "x$path" != "x$new_path"; then
15374    OUTPUT_ROOT="$new_path"
15375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15376$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15377  fi
15378
15379  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15380  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15381
15382    else
15383      # We're on a unix platform. Hooray! :)
15384      path="$OUTPUT_ROOT"
15385      has_space=`$ECHO "$path" | $GREP " "`
15386      if test "x$has_space" != x; then
15387        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15388$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15389        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15390      fi
15391
15392      # Use eval to expand a potential ~
15393      eval path="$path"
15394      if test ! -f "$path" && test ! -d "$path"; then
15395        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15396      fi
15397
15398      OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15399    fi
15400  fi
15401
15402
15403  SPEC=$OUTPUT_ROOT/spec.gmk
15404
15405  CONF_NAME=$CONF_NAME
15406
15407  OUTPUT_ROOT=$OUTPUT_ROOT
15408
15409
15410  # The spec.gmk file contains all variables for the make system.
15411  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15412
15413  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15414  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15415
15416  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15417  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15418
15419  # The compare.sh is used to compare the build output to other builds.
15420  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15421
15422  # The generated Makefile knows where the spec.gmk is and where the source is.
15423  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15424  # which will look for generated configurations
15425  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15426
15427
15428
15429# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15430
15431  for ac_prog in apt-get yum port pkgutil pkgadd
15432do
15433  # Extract the first word of "$ac_prog", so it can be a program name with args.
15434set dummy $ac_prog; ac_word=$2
15435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15436$as_echo_n "checking for $ac_word... " >&6; }
15437if ${ac_cv_prog_PKGHANDLER+:} false; then :
15438  $as_echo_n "(cached) " >&6
15439else
15440  if test -n "$PKGHANDLER"; then
15441  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15442else
15443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15444for as_dir in $PATH
15445do
15446  IFS=$as_save_IFS
15447  test -z "$as_dir" && as_dir=.
15448    for ac_exec_ext in '' $ac_executable_extensions; do
15449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15450    ac_cv_prog_PKGHANDLER="$ac_prog"
15451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15452    break 2
15453  fi
15454done
15455  done
15456IFS=$as_save_IFS
15457
15458fi
15459fi
15460PKGHANDLER=$ac_cv_prog_PKGHANDLER
15461if test -n "$PKGHANDLER"; then
15462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15463$as_echo "$PKGHANDLER" >&6; }
15464else
15465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15466$as_echo "no" >&6; }
15467fi
15468
15469
15470  test -n "$PKGHANDLER" && break
15471done
15472
15473
15474
15475# Setup tools that requires more complex handling, or that is not needed by the configure script.
15476
15477
15478  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15479  if test "x$MAKE" != x; then
15480    # User has supplied a make, test it.
15481    if test ! -f "$MAKE"; then
15482      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15483    fi
15484
15485  MAKE_CANDIDATE=""$MAKE""
15486  DESCRIPTION="user supplied MAKE=$MAKE"
15487  if test "x$MAKE_CANDIDATE" != x; then
15488    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15489$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15490    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15491    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15492    if test "x$IS_GNU_MAKE" = x; then
15493      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15494$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15495    else
15496      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15497      if test "x$IS_MODERN_MAKE" = x; then
15498        { $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
15499$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;}
15500      else
15501        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15502          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15503            MAKE_EXPECTED_ENV='cygwin'
15504          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15505            MAKE_EXPECTED_ENV='msys'
15506          else
15507            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15508          fi
15509          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15510          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15511        else
15512          # Not relevant for non-Windows
15513          IS_MAKE_CORRECT_ENV=true
15514        fi
15515        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15516          { $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
15517$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;}
15518        else
15519          FOUND_MAKE=$MAKE_CANDIDATE
15520
15521  # Only process if variable expands to non-empty
15522
15523  if test "x$FOUND_MAKE" != x; then
15524    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15525
15526  # First separate the path from the arguments. This will split at the first
15527  # space.
15528  complete="$FOUND_MAKE"
15529  path="${complete%% *}"
15530  tmp="$complete EOL"
15531  arguments="${tmp#* }"
15532
15533  # Input might be given as Windows format, start by converting to
15534  # unix format.
15535  new_path=`$CYGPATH -u "$path"`
15536
15537  # Now try to locate executable using which
15538  new_path=`$WHICH "$new_path" 2> /dev/null`
15539  # bat and cmd files are not always considered executable in cygwin causing which
15540  # to not find them
15541  if test "x$new_path" = x \
15542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15544    new_path=`$CYGPATH -u "$path"`
15545  fi
15546  if test "x$new_path" = x; then
15547    # Oops. Which didn't find the executable.
15548    # The splitting of arguments from the executable at a space might have been incorrect,
15549    # since paths with space are more likely in Windows. Give it another try with the whole
15550    # argument.
15551    path="$complete"
15552    arguments="EOL"
15553    new_path=`$CYGPATH -u "$path"`
15554    new_path=`$WHICH "$new_path" 2> /dev/null`
15555    # bat and cmd files are not always considered executable in cygwin causing which
15556    # to not find them
15557    if test "x$new_path" = x \
15558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15560      new_path=`$CYGPATH -u "$path"`
15561    fi
15562    if test "x$new_path" = x; then
15563      # It's still not found. Now this is an unrecoverable error.
15564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15565$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15566      has_space=`$ECHO "$complete" | $GREP " "`
15567      if test "x$has_space" != x; then
15568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15570      fi
15571      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15572    fi
15573  fi
15574
15575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15578  # "foo.exe" is OK but "foo" is an error.
15579  #
15580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15581  # It is also a way to make sure we got the proper file name for the real test later on.
15582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15583  if test "x$test_shortpath" = x; then
15584    # Short path failed, file does not exist as specified.
15585    # Try adding .exe or .cmd
15586    if test -f "${new_path}.exe"; then
15587      input_to_shortpath="${new_path}.exe"
15588    elif test -f "${new_path}.cmd"; then
15589      input_to_shortpath="${new_path}.cmd"
15590    else
15591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15592$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15595      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15596    fi
15597  else
15598    input_to_shortpath="$new_path"
15599  fi
15600
15601  # Call helper function which possibly converts this using DOS-style short mode.
15602  # If so, the updated path is stored in $new_path.
15603  new_path="$input_to_shortpath"
15604
15605  input_path="$input_to_shortpath"
15606  # Check if we need to convert this using DOS-style short mode. If the path
15607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15608  # take no chances and rewrite it.
15609  # Note: m4 eats our [], so we need to use [ and ] instead.
15610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15611  if test "x$has_forbidden_chars" != x; then
15612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15616      # Going to short mode and back again did indeed matter. Since short mode is
15617      # case insensitive, let's make it lowercase to improve readability.
15618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15619      # Now convert it back to Unix-stile (cygpath)
15620      input_path=`$CYGPATH -u "$shortmode_path"`
15621      new_path="$input_path"
15622    fi
15623  fi
15624
15625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15626  if test "x$test_cygdrive_prefix" = x; then
15627    # As a simple fix, exclude /usr/bin since it's not a real path.
15628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15630      # a path prefixed by /cygdrive for fixpath to work.
15631      new_path="$CYGWIN_ROOT_PATH$input_path"
15632    fi
15633  fi
15634
15635  # remove trailing .exe if any
15636  new_path="${new_path/%.exe/}"
15637
15638    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15639
15640  # First separate the path from the arguments. This will split at the first
15641  # space.
15642  complete="$FOUND_MAKE"
15643  path="${complete%% *}"
15644  tmp="$complete EOL"
15645  arguments="${tmp#* }"
15646
15647  # Input might be given as Windows format, start by converting to
15648  # unix format.
15649  new_path="$path"
15650
15651  windows_path="$new_path"
15652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15653    unix_path=`$CYGPATH -u "$windows_path"`
15654    new_path="$unix_path"
15655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15657    new_path="$unix_path"
15658  fi
15659
15660
15661  # Now try to locate executable using which
15662  new_path=`$WHICH "$new_path" 2> /dev/null`
15663
15664  if test "x$new_path" = x; then
15665    # Oops. Which didn't find the executable.
15666    # The splitting of arguments from the executable at a space might have been incorrect,
15667    # since paths with space are more likely in Windows. Give it another try with the whole
15668    # argument.
15669    path="$complete"
15670    arguments="EOL"
15671    new_path="$path"
15672
15673  windows_path="$new_path"
15674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15675    unix_path=`$CYGPATH -u "$windows_path"`
15676    new_path="$unix_path"
15677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15679    new_path="$unix_path"
15680  fi
15681
15682
15683    new_path=`$WHICH "$new_path" 2> /dev/null`
15684    # bat and cmd files are not always considered executable in MSYS causing which
15685    # to not find them
15686    if test "x$new_path" = x \
15687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15689      new_path="$path"
15690
15691  windows_path="$new_path"
15692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15693    unix_path=`$CYGPATH -u "$windows_path"`
15694    new_path="$unix_path"
15695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15697    new_path="$unix_path"
15698  fi
15699
15700    fi
15701
15702    if test "x$new_path" = x; then
15703      # It's still not found. Now this is an unrecoverable error.
15704      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15705$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15706      has_space=`$ECHO "$complete" | $GREP " "`
15707      if test "x$has_space" != x; then
15708        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15709$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15710      fi
15711      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15712    fi
15713  fi
15714
15715  # Now new_path has a complete unix path to the binary
15716  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15717    # Keep paths in /bin as-is, but remove trailing .exe if any
15718    new_path="${new_path/%.exe/}"
15719    # Do not save /bin paths to all_fixpath_prefixes!
15720  else
15721    # Not in mixed or Windows style, start by that.
15722    new_path=`cmd //c echo $new_path`
15723
15724  input_path="$new_path"
15725  # Check if we need to convert this using DOS-style short mode. If the path
15726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15727  # take no chances and rewrite it.
15728  # Note: m4 eats our [], so we need to use [ and ] instead.
15729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15730  if test "x$has_forbidden_chars" != x; then
15731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15732    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15733  fi
15734
15735    # Output is in $new_path
15736
15737  windows_path="$new_path"
15738  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15739    unix_path=`$CYGPATH -u "$windows_path"`
15740    new_path="$unix_path"
15741  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15742    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15743    new_path="$unix_path"
15744  fi
15745
15746    # remove trailing .exe if any
15747    new_path="${new_path/%.exe/}"
15748
15749    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15750    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15751  fi
15752
15753    else
15754      # We're on a unix platform. Hooray! :)
15755      # First separate the path from the arguments. This will split at the first
15756      # space.
15757      complete="$FOUND_MAKE"
15758      path="${complete%% *}"
15759      tmp="$complete EOL"
15760      arguments="${tmp#* }"
15761
15762      # Cannot rely on the command "which" here since it doesn't always work.
15763      is_absolute_path=`$ECHO "$path" | $GREP ^/`
15764      if test -z "$is_absolute_path"; then
15765        # Path to executable is not absolute. Find it.
15766        IFS_save="$IFS"
15767        IFS=:
15768        for p in $PATH; do
15769          if test -f "$p/$path" && test -x "$p/$path"; then
15770            new_path="$p/$path"
15771            break
15772          fi
15773        done
15774        IFS="$IFS_save"
15775      else
15776        # This is an absolute path, we can use it without further modifications.
15777        new_path="$path"
15778      fi
15779
15780      if test "x$new_path" = x; then
15781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15782$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15783        has_space=`$ECHO "$complete" | $GREP " "`
15784        if test "x$has_space" != x; then
15785          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15786$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15787        fi
15788        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15789      fi
15790    fi
15791
15792    # Now join together the path and the arguments once again
15793    if test "x$arguments" != xEOL; then
15794      new_complete="$new_path ${arguments% *}"
15795    else
15796      new_complete="$new_path"
15797    fi
15798
15799    if test "x$complete" != "x$new_complete"; then
15800      FOUND_MAKE="$new_complete"
15801      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15802$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15803    fi
15804  fi
15805
15806        fi
15807      fi
15808    fi
15809  fi
15810
15811    if test "x$FOUND_MAKE" = x; then
15812      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15813    fi
15814  else
15815    # Try our hardest to locate a correct version of GNU make
15816    for ac_prog in gmake
15817do
15818  # Extract the first word of "$ac_prog", so it can be a program name with args.
15819set dummy $ac_prog; ac_word=$2
15820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15821$as_echo_n "checking for $ac_word... " >&6; }
15822if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15823  $as_echo_n "(cached) " >&6
15824else
15825  case $CHECK_GMAKE in
15826  [\\/]* | ?:[\\/]*)
15827  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15828  ;;
15829  *)
15830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15831for as_dir in $PATH
15832do
15833  IFS=$as_save_IFS
15834  test -z "$as_dir" && as_dir=.
15835    for ac_exec_ext in '' $ac_executable_extensions; do
15836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15837    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15839    break 2
15840  fi
15841done
15842  done
15843IFS=$as_save_IFS
15844
15845  ;;
15846esac
15847fi
15848CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15849if test -n "$CHECK_GMAKE"; then
15850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15851$as_echo "$CHECK_GMAKE" >&6; }
15852else
15853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15854$as_echo "no" >&6; }
15855fi
15856
15857
15858  test -n "$CHECK_GMAKE" && break
15859done
15860
15861
15862  MAKE_CANDIDATE=""$CHECK_GMAKE""
15863  DESCRIPTION="gmake in PATH"
15864  if test "x$MAKE_CANDIDATE" != x; then
15865    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15866$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15867    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15868    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15869    if test "x$IS_GNU_MAKE" = x; then
15870      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15871$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15872    else
15873      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15874      if test "x$IS_MODERN_MAKE" = x; then
15875        { $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
15876$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;}
15877      else
15878        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15879          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15880            MAKE_EXPECTED_ENV='cygwin'
15881          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15882            MAKE_EXPECTED_ENV='msys'
15883          else
15884            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15885          fi
15886          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15887          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15888        else
15889          # Not relevant for non-Windows
15890          IS_MAKE_CORRECT_ENV=true
15891        fi
15892        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15893          { $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
15894$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;}
15895        else
15896          FOUND_MAKE=$MAKE_CANDIDATE
15897
15898  # Only process if variable expands to non-empty
15899
15900  if test "x$FOUND_MAKE" != x; then
15901    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15902
15903  # First separate the path from the arguments. This will split at the first
15904  # space.
15905  complete="$FOUND_MAKE"
15906  path="${complete%% *}"
15907  tmp="$complete EOL"
15908  arguments="${tmp#* }"
15909
15910  # Input might be given as Windows format, start by converting to
15911  # unix format.
15912  new_path=`$CYGPATH -u "$path"`
15913
15914  # Now try to locate executable using which
15915  new_path=`$WHICH "$new_path" 2> /dev/null`
15916  # bat and cmd files are not always considered executable in cygwin causing which
15917  # to not find them
15918  if test "x$new_path" = x \
15919      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15920      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15921    new_path=`$CYGPATH -u "$path"`
15922  fi
15923  if test "x$new_path" = x; then
15924    # Oops. Which didn't find the executable.
15925    # The splitting of arguments from the executable at a space might have been incorrect,
15926    # since paths with space are more likely in Windows. Give it another try with the whole
15927    # argument.
15928    path="$complete"
15929    arguments="EOL"
15930    new_path=`$CYGPATH -u "$path"`
15931    new_path=`$WHICH "$new_path" 2> /dev/null`
15932    # bat and cmd files are not always considered executable in cygwin causing which
15933    # to not find them
15934    if test "x$new_path" = x \
15935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15937      new_path=`$CYGPATH -u "$path"`
15938    fi
15939    if test "x$new_path" = x; then
15940      # It's still not found. Now this is an unrecoverable error.
15941      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15942$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15943      has_space=`$ECHO "$complete" | $GREP " "`
15944      if test "x$has_space" != x; then
15945        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15946$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15947      fi
15948      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15949    fi
15950  fi
15951
15952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15955  # "foo.exe" is OK but "foo" is an error.
15956  #
15957  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15958  # It is also a way to make sure we got the proper file name for the real test later on.
15959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15960  if test "x$test_shortpath" = x; then
15961    # Short path failed, file does not exist as specified.
15962    # Try adding .exe or .cmd
15963    if test -f "${new_path}.exe"; then
15964      input_to_shortpath="${new_path}.exe"
15965    elif test -f "${new_path}.cmd"; then
15966      input_to_shortpath="${new_path}.cmd"
15967    else
15968      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15969$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15970      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15971$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15973    fi
15974  else
15975    input_to_shortpath="$new_path"
15976  fi
15977
15978  # Call helper function which possibly converts this using DOS-style short mode.
15979  # If so, the updated path is stored in $new_path.
15980  new_path="$input_to_shortpath"
15981
15982  input_path="$input_to_shortpath"
15983  # Check if we need to convert this using DOS-style short mode. If the path
15984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15985  # take no chances and rewrite it.
15986  # Note: m4 eats our [], so we need to use [ and ] instead.
15987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15988  if test "x$has_forbidden_chars" != x; then
15989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15993      # Going to short mode and back again did indeed matter. Since short mode is
15994      # case insensitive, let's make it lowercase to improve readability.
15995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15996      # Now convert it back to Unix-stile (cygpath)
15997      input_path=`$CYGPATH -u "$shortmode_path"`
15998      new_path="$input_path"
15999    fi
16000  fi
16001
16002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16003  if test "x$test_cygdrive_prefix" = x; then
16004    # As a simple fix, exclude /usr/bin since it's not a real path.
16005    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16007      # a path prefixed by /cygdrive for fixpath to work.
16008      new_path="$CYGWIN_ROOT_PATH$input_path"
16009    fi
16010  fi
16011
16012  # remove trailing .exe if any
16013  new_path="${new_path/%.exe/}"
16014
16015    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16016
16017  # First separate the path from the arguments. This will split at the first
16018  # space.
16019  complete="$FOUND_MAKE"
16020  path="${complete%% *}"
16021  tmp="$complete EOL"
16022  arguments="${tmp#* }"
16023
16024  # Input might be given as Windows format, start by converting to
16025  # unix format.
16026  new_path="$path"
16027
16028  windows_path="$new_path"
16029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16030    unix_path=`$CYGPATH -u "$windows_path"`
16031    new_path="$unix_path"
16032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16034    new_path="$unix_path"
16035  fi
16036
16037
16038  # Now try to locate executable using which
16039  new_path=`$WHICH "$new_path" 2> /dev/null`
16040
16041  if test "x$new_path" = x; then
16042    # Oops. Which didn't find the executable.
16043    # The splitting of arguments from the executable at a space might have been incorrect,
16044    # since paths with space are more likely in Windows. Give it another try with the whole
16045    # argument.
16046    path="$complete"
16047    arguments="EOL"
16048    new_path="$path"
16049
16050  windows_path="$new_path"
16051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16052    unix_path=`$CYGPATH -u "$windows_path"`
16053    new_path="$unix_path"
16054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16056    new_path="$unix_path"
16057  fi
16058
16059
16060    new_path=`$WHICH "$new_path" 2> /dev/null`
16061    # bat and cmd files are not always considered executable in MSYS causing which
16062    # to not find them
16063    if test "x$new_path" = x \
16064        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16065        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16066      new_path="$path"
16067
16068  windows_path="$new_path"
16069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16070    unix_path=`$CYGPATH -u "$windows_path"`
16071    new_path="$unix_path"
16072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16074    new_path="$unix_path"
16075  fi
16076
16077    fi
16078
16079    if test "x$new_path" = x; then
16080      # It's still not found. Now this is an unrecoverable error.
16081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16082$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16083      has_space=`$ECHO "$complete" | $GREP " "`
16084      if test "x$has_space" != x; then
16085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16087      fi
16088      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16089    fi
16090  fi
16091
16092  # Now new_path has a complete unix path to the binary
16093  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16094    # Keep paths in /bin as-is, but remove trailing .exe if any
16095    new_path="${new_path/%.exe/}"
16096    # Do not save /bin paths to all_fixpath_prefixes!
16097  else
16098    # Not in mixed or Windows style, start by that.
16099    new_path=`cmd //c echo $new_path`
16100
16101  input_path="$new_path"
16102  # Check if we need to convert this using DOS-style short mode. If the path
16103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16104  # take no chances and rewrite it.
16105  # Note: m4 eats our [], so we need to use [ and ] instead.
16106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16107  if test "x$has_forbidden_chars" != x; then
16108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16110  fi
16111
16112    # Output is in $new_path
16113
16114  windows_path="$new_path"
16115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16116    unix_path=`$CYGPATH -u "$windows_path"`
16117    new_path="$unix_path"
16118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16120    new_path="$unix_path"
16121  fi
16122
16123    # remove trailing .exe if any
16124    new_path="${new_path/%.exe/}"
16125
16126    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16127    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16128  fi
16129
16130    else
16131      # We're on a unix platform. Hooray! :)
16132      # First separate the path from the arguments. This will split at the first
16133      # space.
16134      complete="$FOUND_MAKE"
16135      path="${complete%% *}"
16136      tmp="$complete EOL"
16137      arguments="${tmp#* }"
16138
16139      # Cannot rely on the command "which" here since it doesn't always work.
16140      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16141      if test -z "$is_absolute_path"; then
16142        # Path to executable is not absolute. Find it.
16143        IFS_save="$IFS"
16144        IFS=:
16145        for p in $PATH; do
16146          if test -f "$p/$path" && test -x "$p/$path"; then
16147            new_path="$p/$path"
16148            break
16149          fi
16150        done
16151        IFS="$IFS_save"
16152      else
16153        # This is an absolute path, we can use it without further modifications.
16154        new_path="$path"
16155      fi
16156
16157      if test "x$new_path" = x; then
16158        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16159$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16160        has_space=`$ECHO "$complete" | $GREP " "`
16161        if test "x$has_space" != x; then
16162          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16163$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16164        fi
16165        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16166      fi
16167    fi
16168
16169    # Now join together the path and the arguments once again
16170    if test "x$arguments" != xEOL; then
16171      new_complete="$new_path ${arguments% *}"
16172    else
16173      new_complete="$new_path"
16174    fi
16175
16176    if test "x$complete" != "x$new_complete"; then
16177      FOUND_MAKE="$new_complete"
16178      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16179$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16180    fi
16181  fi
16182
16183        fi
16184      fi
16185    fi
16186  fi
16187
16188
16189    if test "x$FOUND_MAKE" = x; then
16190      for ac_prog in make
16191do
16192  # Extract the first word of "$ac_prog", so it can be a program name with args.
16193set dummy $ac_prog; ac_word=$2
16194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16195$as_echo_n "checking for $ac_word... " >&6; }
16196if ${ac_cv_path_CHECK_MAKE+:} false; then :
16197  $as_echo_n "(cached) " >&6
16198else
16199  case $CHECK_MAKE in
16200  [\\/]* | ?:[\\/]*)
16201  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16202  ;;
16203  *)
16204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16205for as_dir in $PATH
16206do
16207  IFS=$as_save_IFS
16208  test -z "$as_dir" && as_dir=.
16209    for ac_exec_ext in '' $ac_executable_extensions; do
16210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16211    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16213    break 2
16214  fi
16215done
16216  done
16217IFS=$as_save_IFS
16218
16219  ;;
16220esac
16221fi
16222CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16223if test -n "$CHECK_MAKE"; then
16224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16225$as_echo "$CHECK_MAKE" >&6; }
16226else
16227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16228$as_echo "no" >&6; }
16229fi
16230
16231
16232  test -n "$CHECK_MAKE" && break
16233done
16234
16235
16236  MAKE_CANDIDATE=""$CHECK_MAKE""
16237  DESCRIPTION="make in PATH"
16238  if test "x$MAKE_CANDIDATE" != x; then
16239    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16240$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16241    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16242    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16243    if test "x$IS_GNU_MAKE" = x; then
16244      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16245$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16246    else
16247      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16248      if test "x$IS_MODERN_MAKE" = x; then
16249        { $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
16250$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;}
16251      else
16252        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16253          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16254            MAKE_EXPECTED_ENV='cygwin'
16255          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16256            MAKE_EXPECTED_ENV='msys'
16257          else
16258            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16259          fi
16260          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16261          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16262        else
16263          # Not relevant for non-Windows
16264          IS_MAKE_CORRECT_ENV=true
16265        fi
16266        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16267          { $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
16268$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;}
16269        else
16270          FOUND_MAKE=$MAKE_CANDIDATE
16271
16272  # Only process if variable expands to non-empty
16273
16274  if test "x$FOUND_MAKE" != x; then
16275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16276
16277  # First separate the path from the arguments. This will split at the first
16278  # space.
16279  complete="$FOUND_MAKE"
16280  path="${complete%% *}"
16281  tmp="$complete EOL"
16282  arguments="${tmp#* }"
16283
16284  # Input might be given as Windows format, start by converting to
16285  # unix format.
16286  new_path=`$CYGPATH -u "$path"`
16287
16288  # Now try to locate executable using which
16289  new_path=`$WHICH "$new_path" 2> /dev/null`
16290  # bat and cmd files are not always considered executable in cygwin causing which
16291  # to not find them
16292  if test "x$new_path" = x \
16293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16295    new_path=`$CYGPATH -u "$path"`
16296  fi
16297  if test "x$new_path" = x; then
16298    # Oops. Which didn't find the executable.
16299    # The splitting of arguments from the executable at a space might have been incorrect,
16300    # since paths with space are more likely in Windows. Give it another try with the whole
16301    # argument.
16302    path="$complete"
16303    arguments="EOL"
16304    new_path=`$CYGPATH -u "$path"`
16305    new_path=`$WHICH "$new_path" 2> /dev/null`
16306    # bat and cmd files are not always considered executable in cygwin causing which
16307    # to not find them
16308    if test "x$new_path" = x \
16309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16311      new_path=`$CYGPATH -u "$path"`
16312    fi
16313    if test "x$new_path" = x; then
16314      # It's still not found. Now this is an unrecoverable error.
16315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16316$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16317      has_space=`$ECHO "$complete" | $GREP " "`
16318      if test "x$has_space" != x; then
16319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16321      fi
16322      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16323    fi
16324  fi
16325
16326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16329  # "foo.exe" is OK but "foo" is an error.
16330  #
16331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16332  # It is also a way to make sure we got the proper file name for the real test later on.
16333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16334  if test "x$test_shortpath" = x; then
16335    # Short path failed, file does not exist as specified.
16336    # Try adding .exe or .cmd
16337    if test -f "${new_path}.exe"; then
16338      input_to_shortpath="${new_path}.exe"
16339    elif test -f "${new_path}.cmd"; then
16340      input_to_shortpath="${new_path}.cmd"
16341    else
16342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16343$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16346      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16347    fi
16348  else
16349    input_to_shortpath="$new_path"
16350  fi
16351
16352  # Call helper function which possibly converts this using DOS-style short mode.
16353  # If so, the updated path is stored in $new_path.
16354  new_path="$input_to_shortpath"
16355
16356  input_path="$input_to_shortpath"
16357  # Check if we need to convert this using DOS-style short mode. If the path
16358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16359  # take no chances and rewrite it.
16360  # Note: m4 eats our [], so we need to use [ and ] instead.
16361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16362  if test "x$has_forbidden_chars" != x; then
16363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16367      # Going to short mode and back again did indeed matter. Since short mode is
16368      # case insensitive, let's make it lowercase to improve readability.
16369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16370      # Now convert it back to Unix-stile (cygpath)
16371      input_path=`$CYGPATH -u "$shortmode_path"`
16372      new_path="$input_path"
16373    fi
16374  fi
16375
16376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16377  if test "x$test_cygdrive_prefix" = x; then
16378    # As a simple fix, exclude /usr/bin since it's not a real path.
16379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16381      # a path prefixed by /cygdrive for fixpath to work.
16382      new_path="$CYGWIN_ROOT_PATH$input_path"
16383    fi
16384  fi
16385
16386  # remove trailing .exe if any
16387  new_path="${new_path/%.exe/}"
16388
16389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16390
16391  # First separate the path from the arguments. This will split at the first
16392  # space.
16393  complete="$FOUND_MAKE"
16394  path="${complete%% *}"
16395  tmp="$complete EOL"
16396  arguments="${tmp#* }"
16397
16398  # Input might be given as Windows format, start by converting to
16399  # unix format.
16400  new_path="$path"
16401
16402  windows_path="$new_path"
16403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16404    unix_path=`$CYGPATH -u "$windows_path"`
16405    new_path="$unix_path"
16406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16408    new_path="$unix_path"
16409  fi
16410
16411
16412  # Now try to locate executable using which
16413  new_path=`$WHICH "$new_path" 2> /dev/null`
16414
16415  if test "x$new_path" = x; then
16416    # Oops. Which didn't find the executable.
16417    # The splitting of arguments from the executable at a space might have been incorrect,
16418    # since paths with space are more likely in Windows. Give it another try with the whole
16419    # argument.
16420    path="$complete"
16421    arguments="EOL"
16422    new_path="$path"
16423
16424  windows_path="$new_path"
16425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16426    unix_path=`$CYGPATH -u "$windows_path"`
16427    new_path="$unix_path"
16428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16430    new_path="$unix_path"
16431  fi
16432
16433
16434    new_path=`$WHICH "$new_path" 2> /dev/null`
16435    # bat and cmd files are not always considered executable in MSYS causing which
16436    # to not find them
16437    if test "x$new_path" = x \
16438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16440      new_path="$path"
16441
16442  windows_path="$new_path"
16443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16444    unix_path=`$CYGPATH -u "$windows_path"`
16445    new_path="$unix_path"
16446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16448    new_path="$unix_path"
16449  fi
16450
16451    fi
16452
16453    if test "x$new_path" = x; then
16454      # It's still not found. Now this is an unrecoverable error.
16455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16456$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16457      has_space=`$ECHO "$complete" | $GREP " "`
16458      if test "x$has_space" != x; then
16459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16461      fi
16462      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16463    fi
16464  fi
16465
16466  # Now new_path has a complete unix path to the binary
16467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16468    # Keep paths in /bin as-is, but remove trailing .exe if any
16469    new_path="${new_path/%.exe/}"
16470    # Do not save /bin paths to all_fixpath_prefixes!
16471  else
16472    # Not in mixed or Windows style, start by that.
16473    new_path=`cmd //c echo $new_path`
16474
16475  input_path="$new_path"
16476  # Check if we need to convert this using DOS-style short mode. If the path
16477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16478  # take no chances and rewrite it.
16479  # Note: m4 eats our [], so we need to use [ and ] instead.
16480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16481  if test "x$has_forbidden_chars" != x; then
16482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16484  fi
16485
16486    # Output is in $new_path
16487
16488  windows_path="$new_path"
16489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16490    unix_path=`$CYGPATH -u "$windows_path"`
16491    new_path="$unix_path"
16492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16494    new_path="$unix_path"
16495  fi
16496
16497    # remove trailing .exe if any
16498    new_path="${new_path/%.exe/}"
16499
16500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16502  fi
16503
16504    else
16505      # We're on a unix platform. Hooray! :)
16506      # First separate the path from the arguments. This will split at the first
16507      # space.
16508      complete="$FOUND_MAKE"
16509      path="${complete%% *}"
16510      tmp="$complete EOL"
16511      arguments="${tmp#* }"
16512
16513      # Cannot rely on the command "which" here since it doesn't always work.
16514      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16515      if test -z "$is_absolute_path"; then
16516        # Path to executable is not absolute. Find it.
16517        IFS_save="$IFS"
16518        IFS=:
16519        for p in $PATH; do
16520          if test -f "$p/$path" && test -x "$p/$path"; then
16521            new_path="$p/$path"
16522            break
16523          fi
16524        done
16525        IFS="$IFS_save"
16526      else
16527        # This is an absolute path, we can use it without further modifications.
16528        new_path="$path"
16529      fi
16530
16531      if test "x$new_path" = x; then
16532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16533$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16534        has_space=`$ECHO "$complete" | $GREP " "`
16535        if test "x$has_space" != x; then
16536          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16538        fi
16539        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16540      fi
16541    fi
16542
16543    # Now join together the path and the arguments once again
16544    if test "x$arguments" != xEOL; then
16545      new_complete="$new_path ${arguments% *}"
16546    else
16547      new_complete="$new_path"
16548    fi
16549
16550    if test "x$complete" != "x$new_complete"; then
16551      FOUND_MAKE="$new_complete"
16552      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16553$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16554    fi
16555  fi
16556
16557        fi
16558      fi
16559    fi
16560  fi
16561
16562    fi
16563
16564    if test "x$FOUND_MAKE" = x; then
16565      if test "x$TOOLCHAIN_PATH" != x; then
16566        # We have a toolchain path, check that as well before giving up.
16567        OLD_PATH=$PATH
16568        PATH=$TOOLCHAIN_PATH:$PATH
16569        for ac_prog in gmake
16570do
16571  # Extract the first word of "$ac_prog", so it can be a program name with args.
16572set dummy $ac_prog; ac_word=$2
16573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16574$as_echo_n "checking for $ac_word... " >&6; }
16575if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16576  $as_echo_n "(cached) " >&6
16577else
16578  case $CHECK_TOOLSDIR_GMAKE in
16579  [\\/]* | ?:[\\/]*)
16580  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16581  ;;
16582  *)
16583  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16584for as_dir in $PATH
16585do
16586  IFS=$as_save_IFS
16587  test -z "$as_dir" && as_dir=.
16588    for ac_exec_ext in '' $ac_executable_extensions; do
16589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16590    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16592    break 2
16593  fi
16594done
16595  done
16596IFS=$as_save_IFS
16597
16598  ;;
16599esac
16600fi
16601CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16602if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16604$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16605else
16606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16607$as_echo "no" >&6; }
16608fi
16609
16610
16611  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16612done
16613
16614
16615  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16616  DESCRIPTION="gmake in tools-dir"
16617  if test "x$MAKE_CANDIDATE" != x; then
16618    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16619$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16620    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16621    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16622    if test "x$IS_GNU_MAKE" = x; then
16623      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16624$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16625    else
16626      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16627      if test "x$IS_MODERN_MAKE" = x; then
16628        { $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
16629$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;}
16630      else
16631        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16632          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16633            MAKE_EXPECTED_ENV='cygwin'
16634          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16635            MAKE_EXPECTED_ENV='msys'
16636          else
16637            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16638          fi
16639          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16640          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16641        else
16642          # Not relevant for non-Windows
16643          IS_MAKE_CORRECT_ENV=true
16644        fi
16645        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16646          { $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
16647$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;}
16648        else
16649          FOUND_MAKE=$MAKE_CANDIDATE
16650
16651  # Only process if variable expands to non-empty
16652
16653  if test "x$FOUND_MAKE" != x; then
16654    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16655
16656  # First separate the path from the arguments. This will split at the first
16657  # space.
16658  complete="$FOUND_MAKE"
16659  path="${complete%% *}"
16660  tmp="$complete EOL"
16661  arguments="${tmp#* }"
16662
16663  # Input might be given as Windows format, start by converting to
16664  # unix format.
16665  new_path=`$CYGPATH -u "$path"`
16666
16667  # Now try to locate executable using which
16668  new_path=`$WHICH "$new_path" 2> /dev/null`
16669  # bat and cmd files are not always considered executable in cygwin causing which
16670  # to not find them
16671  if test "x$new_path" = x \
16672      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16673      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16674    new_path=`$CYGPATH -u "$path"`
16675  fi
16676  if test "x$new_path" = x; then
16677    # Oops. Which didn't find the executable.
16678    # The splitting of arguments from the executable at a space might have been incorrect,
16679    # since paths with space are more likely in Windows. Give it another try with the whole
16680    # argument.
16681    path="$complete"
16682    arguments="EOL"
16683    new_path=`$CYGPATH -u "$path"`
16684    new_path=`$WHICH "$new_path" 2> /dev/null`
16685    # bat and cmd files are not always considered executable in cygwin causing which
16686    # to not find them
16687    if test "x$new_path" = x \
16688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16690      new_path=`$CYGPATH -u "$path"`
16691    fi
16692    if test "x$new_path" = x; then
16693      # It's still not found. Now this is an unrecoverable error.
16694      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16695$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16696      has_space=`$ECHO "$complete" | $GREP " "`
16697      if test "x$has_space" != x; then
16698        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16699$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16700      fi
16701      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16702    fi
16703  fi
16704
16705  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16706  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16707  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16708  # "foo.exe" is OK but "foo" is an error.
16709  #
16710  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16711  # It is also a way to make sure we got the proper file name for the real test later on.
16712  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16713  if test "x$test_shortpath" = x; then
16714    # Short path failed, file does not exist as specified.
16715    # Try adding .exe or .cmd
16716    if test -f "${new_path}.exe"; then
16717      input_to_shortpath="${new_path}.exe"
16718    elif test -f "${new_path}.cmd"; then
16719      input_to_shortpath="${new_path}.cmd"
16720    else
16721      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16722$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16723      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16724$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16725      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16726    fi
16727  else
16728    input_to_shortpath="$new_path"
16729  fi
16730
16731  # Call helper function which possibly converts this using DOS-style short mode.
16732  # If so, the updated path is stored in $new_path.
16733  new_path="$input_to_shortpath"
16734
16735  input_path="$input_to_shortpath"
16736  # Check if we need to convert this using DOS-style short mode. If the path
16737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16738  # take no chances and rewrite it.
16739  # Note: m4 eats our [], so we need to use [ and ] instead.
16740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16741  if test "x$has_forbidden_chars" != x; then
16742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16746      # Going to short mode and back again did indeed matter. Since short mode is
16747      # case insensitive, let's make it lowercase to improve readability.
16748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16749      # Now convert it back to Unix-stile (cygpath)
16750      input_path=`$CYGPATH -u "$shortmode_path"`
16751      new_path="$input_path"
16752    fi
16753  fi
16754
16755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16756  if test "x$test_cygdrive_prefix" = x; then
16757    # As a simple fix, exclude /usr/bin since it's not a real path.
16758    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16760      # a path prefixed by /cygdrive for fixpath to work.
16761      new_path="$CYGWIN_ROOT_PATH$input_path"
16762    fi
16763  fi
16764
16765  # remove trailing .exe if any
16766  new_path="${new_path/%.exe/}"
16767
16768    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16769
16770  # First separate the path from the arguments. This will split at the first
16771  # space.
16772  complete="$FOUND_MAKE"
16773  path="${complete%% *}"
16774  tmp="$complete EOL"
16775  arguments="${tmp#* }"
16776
16777  # Input might be given as Windows format, start by converting to
16778  # unix format.
16779  new_path="$path"
16780
16781  windows_path="$new_path"
16782  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16783    unix_path=`$CYGPATH -u "$windows_path"`
16784    new_path="$unix_path"
16785  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16786    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16787    new_path="$unix_path"
16788  fi
16789
16790
16791  # Now try to locate executable using which
16792  new_path=`$WHICH "$new_path" 2> /dev/null`
16793
16794  if test "x$new_path" = x; then
16795    # Oops. Which didn't find the executable.
16796    # The splitting of arguments from the executable at a space might have been incorrect,
16797    # since paths with space are more likely in Windows. Give it another try with the whole
16798    # argument.
16799    path="$complete"
16800    arguments="EOL"
16801    new_path="$path"
16802
16803  windows_path="$new_path"
16804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16805    unix_path=`$CYGPATH -u "$windows_path"`
16806    new_path="$unix_path"
16807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16809    new_path="$unix_path"
16810  fi
16811
16812
16813    new_path=`$WHICH "$new_path" 2> /dev/null`
16814    # bat and cmd files are not always considered executable in MSYS causing which
16815    # to not find them
16816    if test "x$new_path" = x \
16817        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16818        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16819      new_path="$path"
16820
16821  windows_path="$new_path"
16822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16823    unix_path=`$CYGPATH -u "$windows_path"`
16824    new_path="$unix_path"
16825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16827    new_path="$unix_path"
16828  fi
16829
16830    fi
16831
16832    if test "x$new_path" = x; then
16833      # It's still not found. Now this is an unrecoverable error.
16834      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16835$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16836      has_space=`$ECHO "$complete" | $GREP " "`
16837      if test "x$has_space" != x; then
16838        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16839$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16840      fi
16841      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16842    fi
16843  fi
16844
16845  # Now new_path has a complete unix path to the binary
16846  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16847    # Keep paths in /bin as-is, but remove trailing .exe if any
16848    new_path="${new_path/%.exe/}"
16849    # Do not save /bin paths to all_fixpath_prefixes!
16850  else
16851    # Not in mixed or Windows style, start by that.
16852    new_path=`cmd //c echo $new_path`
16853
16854  input_path="$new_path"
16855  # Check if we need to convert this using DOS-style short mode. If the path
16856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16857  # take no chances and rewrite it.
16858  # Note: m4 eats our [], so we need to use [ and ] instead.
16859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16860  if test "x$has_forbidden_chars" != x; then
16861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16862    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16863  fi
16864
16865    # Output is in $new_path
16866
16867  windows_path="$new_path"
16868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16869    unix_path=`$CYGPATH -u "$windows_path"`
16870    new_path="$unix_path"
16871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16873    new_path="$unix_path"
16874  fi
16875
16876    # remove trailing .exe if any
16877    new_path="${new_path/%.exe/}"
16878
16879    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16880    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16881  fi
16882
16883    else
16884      # We're on a unix platform. Hooray! :)
16885      # First separate the path from the arguments. This will split at the first
16886      # space.
16887      complete="$FOUND_MAKE"
16888      path="${complete%% *}"
16889      tmp="$complete EOL"
16890      arguments="${tmp#* }"
16891
16892      # Cannot rely on the command "which" here since it doesn't always work.
16893      is_absolute_path=`$ECHO "$path" | $GREP ^/`
16894      if test -z "$is_absolute_path"; then
16895        # Path to executable is not absolute. Find it.
16896        IFS_save="$IFS"
16897        IFS=:
16898        for p in $PATH; do
16899          if test -f "$p/$path" && test -x "$p/$path"; then
16900            new_path="$p/$path"
16901            break
16902          fi
16903        done
16904        IFS="$IFS_save"
16905      else
16906        # This is an absolute path, we can use it without further modifications.
16907        new_path="$path"
16908      fi
16909
16910      if test "x$new_path" = x; then
16911        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16912$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16913        has_space=`$ECHO "$complete" | $GREP " "`
16914        if test "x$has_space" != x; then
16915          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16916$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16917        fi
16918        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16919      fi
16920    fi
16921
16922    # Now join together the path and the arguments once again
16923    if test "x$arguments" != xEOL; then
16924      new_complete="$new_path ${arguments% *}"
16925    else
16926      new_complete="$new_path"
16927    fi
16928
16929    if test "x$complete" != "x$new_complete"; then
16930      FOUND_MAKE="$new_complete"
16931      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16932$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16933    fi
16934  fi
16935
16936        fi
16937      fi
16938    fi
16939  fi
16940
16941        if test "x$FOUND_MAKE" = x; then
16942          for ac_prog in make
16943do
16944  # Extract the first word of "$ac_prog", so it can be a program name with args.
16945set dummy $ac_prog; ac_word=$2
16946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16947$as_echo_n "checking for $ac_word... " >&6; }
16948if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16949  $as_echo_n "(cached) " >&6
16950else
16951  case $CHECK_TOOLSDIR_MAKE in
16952  [\\/]* | ?:[\\/]*)
16953  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16954  ;;
16955  *)
16956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16957for as_dir in $PATH
16958do
16959  IFS=$as_save_IFS
16960  test -z "$as_dir" && as_dir=.
16961    for ac_exec_ext in '' $ac_executable_extensions; do
16962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16963    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16965    break 2
16966  fi
16967done
16968  done
16969IFS=$as_save_IFS
16970
16971  ;;
16972esac
16973fi
16974CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16975if test -n "$CHECK_TOOLSDIR_MAKE"; then
16976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16977$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16978else
16979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16980$as_echo "no" >&6; }
16981fi
16982
16983
16984  test -n "$CHECK_TOOLSDIR_MAKE" && break
16985done
16986
16987
16988  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16989  DESCRIPTION="make in tools-dir"
16990  if test "x$MAKE_CANDIDATE" != x; then
16991    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16992$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16993    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16994    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16995    if test "x$IS_GNU_MAKE" = x; then
16996      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16997$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16998    else
16999      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
17000      if test "x$IS_MODERN_MAKE" = x; then
17001        { $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
17002$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;}
17003      else
17004        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17005          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17006            MAKE_EXPECTED_ENV='cygwin'
17007          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17008            MAKE_EXPECTED_ENV='msys'
17009          else
17010            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17011          fi
17012          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17013          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17014        else
17015          # Not relevant for non-Windows
17016          IS_MAKE_CORRECT_ENV=true
17017        fi
17018        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17019          { $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
17020$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;}
17021        else
17022          FOUND_MAKE=$MAKE_CANDIDATE
17023
17024  # Only process if variable expands to non-empty
17025
17026  if test "x$FOUND_MAKE" != x; then
17027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17028
17029  # First separate the path from the arguments. This will split at the first
17030  # space.
17031  complete="$FOUND_MAKE"
17032  path="${complete%% *}"
17033  tmp="$complete EOL"
17034  arguments="${tmp#* }"
17035
17036  # Input might be given as Windows format, start by converting to
17037  # unix format.
17038  new_path=`$CYGPATH -u "$path"`
17039
17040  # Now try to locate executable using which
17041  new_path=`$WHICH "$new_path" 2> /dev/null`
17042  # bat and cmd files are not always considered executable in cygwin causing which
17043  # to not find them
17044  if test "x$new_path" = x \
17045      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17046      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17047    new_path=`$CYGPATH -u "$path"`
17048  fi
17049  if test "x$new_path" = x; then
17050    # Oops. Which didn't find the executable.
17051    # The splitting of arguments from the executable at a space might have been incorrect,
17052    # since paths with space are more likely in Windows. Give it another try with the whole
17053    # argument.
17054    path="$complete"
17055    arguments="EOL"
17056    new_path=`$CYGPATH -u "$path"`
17057    new_path=`$WHICH "$new_path" 2> /dev/null`
17058    # bat and cmd files are not always considered executable in cygwin causing which
17059    # to not find them
17060    if test "x$new_path" = x \
17061        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17062        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17063      new_path=`$CYGPATH -u "$path"`
17064    fi
17065    if test "x$new_path" = x; then
17066      # It's still not found. Now this is an unrecoverable error.
17067      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17068$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17069      has_space=`$ECHO "$complete" | $GREP " "`
17070      if test "x$has_space" != x; then
17071        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17072$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17073      fi
17074      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17075    fi
17076  fi
17077
17078  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17079  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17080  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17081  # "foo.exe" is OK but "foo" is an error.
17082  #
17083  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17084  # It is also a way to make sure we got the proper file name for the real test later on.
17085  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17086  if test "x$test_shortpath" = x; then
17087    # Short path failed, file does not exist as specified.
17088    # Try adding .exe or .cmd
17089    if test -f "${new_path}.exe"; then
17090      input_to_shortpath="${new_path}.exe"
17091    elif test -f "${new_path}.cmd"; then
17092      input_to_shortpath="${new_path}.cmd"
17093    else
17094      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17095$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17096      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17097$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17098      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17099    fi
17100  else
17101    input_to_shortpath="$new_path"
17102  fi
17103
17104  # Call helper function which possibly converts this using DOS-style short mode.
17105  # If so, the updated path is stored in $new_path.
17106  new_path="$input_to_shortpath"
17107
17108  input_path="$input_to_shortpath"
17109  # Check if we need to convert this using DOS-style short mode. If the path
17110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17111  # take no chances and rewrite it.
17112  # Note: m4 eats our [], so we need to use [ and ] instead.
17113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17114  if test "x$has_forbidden_chars" != x; then
17115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17119      # Going to short mode and back again did indeed matter. Since short mode is
17120      # case insensitive, let's make it lowercase to improve readability.
17121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17122      # Now convert it back to Unix-stile (cygpath)
17123      input_path=`$CYGPATH -u "$shortmode_path"`
17124      new_path="$input_path"
17125    fi
17126  fi
17127
17128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17129  if test "x$test_cygdrive_prefix" = x; then
17130    # As a simple fix, exclude /usr/bin since it's not a real path.
17131    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17133      # a path prefixed by /cygdrive for fixpath to work.
17134      new_path="$CYGWIN_ROOT_PATH$input_path"
17135    fi
17136  fi
17137
17138  # remove trailing .exe if any
17139  new_path="${new_path/%.exe/}"
17140
17141    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17142
17143  # First separate the path from the arguments. This will split at the first
17144  # space.
17145  complete="$FOUND_MAKE"
17146  path="${complete%% *}"
17147  tmp="$complete EOL"
17148  arguments="${tmp#* }"
17149
17150  # Input might be given as Windows format, start by converting to
17151  # unix format.
17152  new_path="$path"
17153
17154  windows_path="$new_path"
17155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17156    unix_path=`$CYGPATH -u "$windows_path"`
17157    new_path="$unix_path"
17158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17160    new_path="$unix_path"
17161  fi
17162
17163
17164  # Now try to locate executable using which
17165  new_path=`$WHICH "$new_path" 2> /dev/null`
17166
17167  if test "x$new_path" = x; then
17168    # Oops. Which didn't find the executable.
17169    # The splitting of arguments from the executable at a space might have been incorrect,
17170    # since paths with space are more likely in Windows. Give it another try with the whole
17171    # argument.
17172    path="$complete"
17173    arguments="EOL"
17174    new_path="$path"
17175
17176  windows_path="$new_path"
17177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17178    unix_path=`$CYGPATH -u "$windows_path"`
17179    new_path="$unix_path"
17180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17182    new_path="$unix_path"
17183  fi
17184
17185
17186    new_path=`$WHICH "$new_path" 2> /dev/null`
17187    # bat and cmd files are not always considered executable in MSYS causing which
17188    # to not find them
17189    if test "x$new_path" = x \
17190        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17191        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17192      new_path="$path"
17193
17194  windows_path="$new_path"
17195  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17196    unix_path=`$CYGPATH -u "$windows_path"`
17197    new_path="$unix_path"
17198  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17199    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17200    new_path="$unix_path"
17201  fi
17202
17203    fi
17204
17205    if test "x$new_path" = x; then
17206      # It's still not found. Now this is an unrecoverable error.
17207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17208$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17209      has_space=`$ECHO "$complete" | $GREP " "`
17210      if test "x$has_space" != x; then
17211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17213      fi
17214      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17215    fi
17216  fi
17217
17218  # Now new_path has a complete unix path to the binary
17219  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17220    # Keep paths in /bin as-is, but remove trailing .exe if any
17221    new_path="${new_path/%.exe/}"
17222    # Do not save /bin paths to all_fixpath_prefixes!
17223  else
17224    # Not in mixed or Windows style, start by that.
17225    new_path=`cmd //c echo $new_path`
17226
17227  input_path="$new_path"
17228  # Check if we need to convert this using DOS-style short mode. If the path
17229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17230  # take no chances and rewrite it.
17231  # Note: m4 eats our [], so we need to use [ and ] instead.
17232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17233  if test "x$has_forbidden_chars" != x; then
17234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17236  fi
17237
17238    # Output is in $new_path
17239
17240  windows_path="$new_path"
17241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17242    unix_path=`$CYGPATH -u "$windows_path"`
17243    new_path="$unix_path"
17244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17246    new_path="$unix_path"
17247  fi
17248
17249    # remove trailing .exe if any
17250    new_path="${new_path/%.exe/}"
17251
17252    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17253    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17254  fi
17255
17256    else
17257      # We're on a unix platform. Hooray! :)
17258      # First separate the path from the arguments. This will split at the first
17259      # space.
17260      complete="$FOUND_MAKE"
17261      path="${complete%% *}"
17262      tmp="$complete EOL"
17263      arguments="${tmp#* }"
17264
17265      # Cannot rely on the command "which" here since it doesn't always work.
17266      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17267      if test -z "$is_absolute_path"; then
17268        # Path to executable is not absolute. Find it.
17269        IFS_save="$IFS"
17270        IFS=:
17271        for p in $PATH; do
17272          if test -f "$p/$path" && test -x "$p/$path"; then
17273            new_path="$p/$path"
17274            break
17275          fi
17276        done
17277        IFS="$IFS_save"
17278      else
17279        # This is an absolute path, we can use it without further modifications.
17280        new_path="$path"
17281      fi
17282
17283      if test "x$new_path" = x; then
17284        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17285$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17286        has_space=`$ECHO "$complete" | $GREP " "`
17287        if test "x$has_space" != x; then
17288          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17289$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17290        fi
17291        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17292      fi
17293    fi
17294
17295    # Now join together the path and the arguments once again
17296    if test "x$arguments" != xEOL; then
17297      new_complete="$new_path ${arguments% *}"
17298    else
17299      new_complete="$new_path"
17300    fi
17301
17302    if test "x$complete" != "x$new_complete"; then
17303      FOUND_MAKE="$new_complete"
17304      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17305$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17306    fi
17307  fi
17308
17309        fi
17310      fi
17311    fi
17312  fi
17313
17314        fi
17315        PATH=$OLD_PATH
17316      fi
17317    fi
17318
17319    if test "x$FOUND_MAKE" = x; then
17320      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
17321    fi
17322  fi
17323
17324  MAKE=$FOUND_MAKE
17325
17326  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17327$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17328
17329
17330  # Check if make supports the output sync option and if so, setup using it.
17331  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
17332$as_echo_n "checking if make --output-sync is supported... " >&6; }
17333  if $MAKE --version -O > /dev/null 2>&1; then
17334    OUTPUT_SYNC_SUPPORTED=true
17335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17336$as_echo "yes" >&6; }
17337    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
17338$as_echo_n "checking for output-sync value... " >&6; }
17339
17340# Check whether --with-output-sync was given.
17341if test "${with_output_sync+set}" = set; then :
17342  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
17343fi
17344
17345    if test "x$OUTPUT_SYNC" = "x"; then
17346      OUTPUT_SYNC=none
17347    fi
17348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
17349$as_echo "$OUTPUT_SYNC" >&6; }
17350    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
17351      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
17352    fi
17353  else
17354    OUTPUT_SYNC_SUPPORTED=false
17355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17356$as_echo "no" >&6; }
17357  fi
17358
17359
17360
17361
17362
17363
17364  # Test if find supports -delete
17365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17366$as_echo_n "checking if find supports -delete... " >&6; }
17367  FIND_DELETE="-delete"
17368
17369  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17370
17371  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17372
17373  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17374  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17375    # No, it does not.
17376    rm $DELETEDIR/TestIfFindSupportsDelete
17377    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
17378      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
17379      FIND_DELETE="-print | xargs rm"
17380    else
17381      FIND_DELETE="-exec rm \{\} \+"
17382    fi
17383    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17384$as_echo "no" >&6; }
17385  else
17386    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17387$as_echo "yes" >&6; }
17388  fi
17389  rmdir $DELETEDIR
17390
17391
17392
17393  # These tools might not be installed by default,
17394  # need hint on how to install them.
17395
17396
17397
17398  # Publish this variable in the help.
17399
17400
17401  if test "x$UNZIP" = x; then
17402    # The variable is not set by user, try to locate tool using the code snippet
17403    for ac_prog in unzip
17404do
17405  # Extract the first word of "$ac_prog", so it can be a program name with args.
17406set dummy $ac_prog; ac_word=$2
17407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17408$as_echo_n "checking for $ac_word... " >&6; }
17409if ${ac_cv_path_UNZIP+:} false; then :
17410  $as_echo_n "(cached) " >&6
17411else
17412  case $UNZIP in
17413  [\\/]* | ?:[\\/]*)
17414  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17415  ;;
17416  *)
17417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17418for as_dir in $PATH
17419do
17420  IFS=$as_save_IFS
17421  test -z "$as_dir" && as_dir=.
17422    for ac_exec_ext in '' $ac_executable_extensions; do
17423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17424    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17426    break 2
17427  fi
17428done
17429  done
17430IFS=$as_save_IFS
17431
17432  ;;
17433esac
17434fi
17435UNZIP=$ac_cv_path_UNZIP
17436if test -n "$UNZIP"; then
17437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17438$as_echo "$UNZIP" >&6; }
17439else
17440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17441$as_echo "no" >&6; }
17442fi
17443
17444
17445  test -n "$UNZIP" && break
17446done
17447
17448  else
17449    # The variable is set, but is it from the command line or the environment?
17450
17451    # Try to remove the string !UNZIP! from our list.
17452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17454      # If it failed, the variable was not from the command line. Ignore it,
17455      # but warn the user (except for BASH, which is always set by the calling BASH).
17456      if test "xUNZIP" != xBASH; then
17457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17458$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17459      fi
17460      # Try to locate tool using the code snippet
17461      for ac_prog in unzip
17462do
17463  # Extract the first word of "$ac_prog", so it can be a program name with args.
17464set dummy $ac_prog; ac_word=$2
17465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17466$as_echo_n "checking for $ac_word... " >&6; }
17467if ${ac_cv_path_UNZIP+:} false; then :
17468  $as_echo_n "(cached) " >&6
17469else
17470  case $UNZIP in
17471  [\\/]* | ?:[\\/]*)
17472  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17473  ;;
17474  *)
17475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17476for as_dir in $PATH
17477do
17478  IFS=$as_save_IFS
17479  test -z "$as_dir" && as_dir=.
17480    for ac_exec_ext in '' $ac_executable_extensions; do
17481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17482    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17484    break 2
17485  fi
17486done
17487  done
17488IFS=$as_save_IFS
17489
17490  ;;
17491esac
17492fi
17493UNZIP=$ac_cv_path_UNZIP
17494if test -n "$UNZIP"; then
17495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17496$as_echo "$UNZIP" >&6; }
17497else
17498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17499$as_echo "no" >&6; }
17500fi
17501
17502
17503  test -n "$UNZIP" && break
17504done
17505
17506    else
17507      # If it succeeded, then it was overridden by the user. We will use it
17508      # for the tool.
17509
17510      # First remove it from the list of overridden variables, so we can test
17511      # for unknown variables in the end.
17512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17513
17514      # Check if the provided tool contains a complete path.
17515      tool_specified="$UNZIP"
17516      tool_basename="${tool_specified##*/}"
17517      if test "x$tool_basename" = "x$tool_specified"; then
17518        # A command without a complete path is provided, search $PATH.
17519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17520$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17521        # Extract the first word of "$tool_basename", so it can be a program name with args.
17522set dummy $tool_basename; ac_word=$2
17523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17524$as_echo_n "checking for $ac_word... " >&6; }
17525if ${ac_cv_path_UNZIP+:} false; then :
17526  $as_echo_n "(cached) " >&6
17527else
17528  case $UNZIP in
17529  [\\/]* | ?:[\\/]*)
17530  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17531  ;;
17532  *)
17533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17534for as_dir in $PATH
17535do
17536  IFS=$as_save_IFS
17537  test -z "$as_dir" && as_dir=.
17538    for ac_exec_ext in '' $ac_executable_extensions; do
17539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17540    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17542    break 2
17543  fi
17544done
17545  done
17546IFS=$as_save_IFS
17547
17548  ;;
17549esac
17550fi
17551UNZIP=$ac_cv_path_UNZIP
17552if test -n "$UNZIP"; then
17553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17554$as_echo "$UNZIP" >&6; }
17555else
17556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17557$as_echo "no" >&6; }
17558fi
17559
17560
17561        if test "x$UNZIP" = x; then
17562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17563        fi
17564      else
17565        # Otherwise we believe it is a complete path. Use it as it is.
17566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17567$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17569$as_echo_n "checking for UNZIP... " >&6; }
17570        if test ! -x "$tool_specified"; then
17571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17572$as_echo "not found" >&6; }
17573          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17574        fi
17575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17576$as_echo "$tool_specified" >&6; }
17577      fi
17578    fi
17579  fi
17580
17581
17582
17583  if test "x$UNZIP" = x; then
17584    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17585  fi
17586
17587
17588
17589
17590
17591  # Publish this variable in the help.
17592
17593
17594  if test "x$ZIP" = x; then
17595    # The variable is not set by user, try to locate tool using the code snippet
17596    for ac_prog in zip
17597do
17598  # Extract the first word of "$ac_prog", so it can be a program name with args.
17599set dummy $ac_prog; ac_word=$2
17600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17601$as_echo_n "checking for $ac_word... " >&6; }
17602if ${ac_cv_path_ZIP+:} false; then :
17603  $as_echo_n "(cached) " >&6
17604else
17605  case $ZIP in
17606  [\\/]* | ?:[\\/]*)
17607  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17608  ;;
17609  *)
17610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17611for as_dir in $PATH
17612do
17613  IFS=$as_save_IFS
17614  test -z "$as_dir" && as_dir=.
17615    for ac_exec_ext in '' $ac_executable_extensions; do
17616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17617    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17619    break 2
17620  fi
17621done
17622  done
17623IFS=$as_save_IFS
17624
17625  ;;
17626esac
17627fi
17628ZIP=$ac_cv_path_ZIP
17629if test -n "$ZIP"; then
17630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17631$as_echo "$ZIP" >&6; }
17632else
17633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17634$as_echo "no" >&6; }
17635fi
17636
17637
17638  test -n "$ZIP" && break
17639done
17640
17641  else
17642    # The variable is set, but is it from the command line or the environment?
17643
17644    # Try to remove the string !ZIP! from our list.
17645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17647      # If it failed, the variable was not from the command line. Ignore it,
17648      # but warn the user (except for BASH, which is always set by the calling BASH).
17649      if test "xZIP" != xBASH; then
17650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17651$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17652      fi
17653      # Try to locate tool using the code snippet
17654      for ac_prog in zip
17655do
17656  # Extract the first word of "$ac_prog", so it can be a program name with args.
17657set dummy $ac_prog; ac_word=$2
17658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17659$as_echo_n "checking for $ac_word... " >&6; }
17660if ${ac_cv_path_ZIP+:} false; then :
17661  $as_echo_n "(cached) " >&6
17662else
17663  case $ZIP in
17664  [\\/]* | ?:[\\/]*)
17665  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17666  ;;
17667  *)
17668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17669for as_dir in $PATH
17670do
17671  IFS=$as_save_IFS
17672  test -z "$as_dir" && as_dir=.
17673    for ac_exec_ext in '' $ac_executable_extensions; do
17674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17675    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17677    break 2
17678  fi
17679done
17680  done
17681IFS=$as_save_IFS
17682
17683  ;;
17684esac
17685fi
17686ZIP=$ac_cv_path_ZIP
17687if test -n "$ZIP"; then
17688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17689$as_echo "$ZIP" >&6; }
17690else
17691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17692$as_echo "no" >&6; }
17693fi
17694
17695
17696  test -n "$ZIP" && break
17697done
17698
17699    else
17700      # If it succeeded, then it was overridden by the user. We will use it
17701      # for the tool.
17702
17703      # First remove it from the list of overridden variables, so we can test
17704      # for unknown variables in the end.
17705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17706
17707      # Check if the provided tool contains a complete path.
17708      tool_specified="$ZIP"
17709      tool_basename="${tool_specified##*/}"
17710      if test "x$tool_basename" = "x$tool_specified"; then
17711        # A command without a complete path is provided, search $PATH.
17712        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17713$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17714        # Extract the first word of "$tool_basename", so it can be a program name with args.
17715set dummy $tool_basename; ac_word=$2
17716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17717$as_echo_n "checking for $ac_word... " >&6; }
17718if ${ac_cv_path_ZIP+:} false; then :
17719  $as_echo_n "(cached) " >&6
17720else
17721  case $ZIP in
17722  [\\/]* | ?:[\\/]*)
17723  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17724  ;;
17725  *)
17726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17727for as_dir in $PATH
17728do
17729  IFS=$as_save_IFS
17730  test -z "$as_dir" && as_dir=.
17731    for ac_exec_ext in '' $ac_executable_extensions; do
17732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17733    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17735    break 2
17736  fi
17737done
17738  done
17739IFS=$as_save_IFS
17740
17741  ;;
17742esac
17743fi
17744ZIP=$ac_cv_path_ZIP
17745if test -n "$ZIP"; then
17746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17747$as_echo "$ZIP" >&6; }
17748else
17749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17750$as_echo "no" >&6; }
17751fi
17752
17753
17754        if test "x$ZIP" = x; then
17755          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17756        fi
17757      else
17758        # Otherwise we believe it is a complete path. Use it as it is.
17759        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17760$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17761        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17762$as_echo_n "checking for ZIP... " >&6; }
17763        if test ! -x "$tool_specified"; then
17764          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17765$as_echo "not found" >&6; }
17766          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17767        fi
17768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17769$as_echo "$tool_specified" >&6; }
17770      fi
17771    fi
17772  fi
17773
17774
17775
17776  if test "x$ZIP" = x; then
17777    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17778  fi
17779
17780
17781
17782  # Non-required basic tools
17783
17784
17785
17786  # Publish this variable in the help.
17787
17788
17789  if test "x$LDD" = x; then
17790    # The variable is not set by user, try to locate tool using the code snippet
17791    for ac_prog in ldd
17792do
17793  # Extract the first word of "$ac_prog", so it can be a program name with args.
17794set dummy $ac_prog; ac_word=$2
17795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17796$as_echo_n "checking for $ac_word... " >&6; }
17797if ${ac_cv_path_LDD+:} false; then :
17798  $as_echo_n "(cached) " >&6
17799else
17800  case $LDD in
17801  [\\/]* | ?:[\\/]*)
17802  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17803  ;;
17804  *)
17805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17806for as_dir in $PATH
17807do
17808  IFS=$as_save_IFS
17809  test -z "$as_dir" && as_dir=.
17810    for ac_exec_ext in '' $ac_executable_extensions; do
17811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17812    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17814    break 2
17815  fi
17816done
17817  done
17818IFS=$as_save_IFS
17819
17820  ;;
17821esac
17822fi
17823LDD=$ac_cv_path_LDD
17824if test -n "$LDD"; then
17825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17826$as_echo "$LDD" >&6; }
17827else
17828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17829$as_echo "no" >&6; }
17830fi
17831
17832
17833  test -n "$LDD" && break
17834done
17835
17836  else
17837    # The variable is set, but is it from the command line or the environment?
17838
17839    # Try to remove the string !LDD! from our list.
17840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17842      # If it failed, the variable was not from the command line. Ignore it,
17843      # but warn the user (except for BASH, which is always set by the calling BASH).
17844      if test "xLDD" != xBASH; then
17845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17846$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17847      fi
17848      # Try to locate tool using the code snippet
17849      for ac_prog in ldd
17850do
17851  # Extract the first word of "$ac_prog", so it can be a program name with args.
17852set dummy $ac_prog; ac_word=$2
17853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17854$as_echo_n "checking for $ac_word... " >&6; }
17855if ${ac_cv_path_LDD+:} false; then :
17856  $as_echo_n "(cached) " >&6
17857else
17858  case $LDD in
17859  [\\/]* | ?:[\\/]*)
17860  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17861  ;;
17862  *)
17863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17864for as_dir in $PATH
17865do
17866  IFS=$as_save_IFS
17867  test -z "$as_dir" && as_dir=.
17868    for ac_exec_ext in '' $ac_executable_extensions; do
17869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17870    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17872    break 2
17873  fi
17874done
17875  done
17876IFS=$as_save_IFS
17877
17878  ;;
17879esac
17880fi
17881LDD=$ac_cv_path_LDD
17882if test -n "$LDD"; then
17883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17884$as_echo "$LDD" >&6; }
17885else
17886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17887$as_echo "no" >&6; }
17888fi
17889
17890
17891  test -n "$LDD" && break
17892done
17893
17894    else
17895      # If it succeeded, then it was overridden by the user. We will use it
17896      # for the tool.
17897
17898      # First remove it from the list of overridden variables, so we can test
17899      # for unknown variables in the end.
17900      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17901
17902      # Check if the provided tool contains a complete path.
17903      tool_specified="$LDD"
17904      tool_basename="${tool_specified##*/}"
17905      if test "x$tool_basename" = "x$tool_specified"; then
17906        # A command without a complete path is provided, search $PATH.
17907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17908$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17909        # Extract the first word of "$tool_basename", so it can be a program name with args.
17910set dummy $tool_basename; ac_word=$2
17911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17912$as_echo_n "checking for $ac_word... " >&6; }
17913if ${ac_cv_path_LDD+:} false; then :
17914  $as_echo_n "(cached) " >&6
17915else
17916  case $LDD in
17917  [\\/]* | ?:[\\/]*)
17918  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17919  ;;
17920  *)
17921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17922for as_dir in $PATH
17923do
17924  IFS=$as_save_IFS
17925  test -z "$as_dir" && as_dir=.
17926    for ac_exec_ext in '' $ac_executable_extensions; do
17927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17928    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17930    break 2
17931  fi
17932done
17933  done
17934IFS=$as_save_IFS
17935
17936  ;;
17937esac
17938fi
17939LDD=$ac_cv_path_LDD
17940if test -n "$LDD"; then
17941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17942$as_echo "$LDD" >&6; }
17943else
17944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17945$as_echo "no" >&6; }
17946fi
17947
17948
17949        if test "x$LDD" = x; then
17950          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17951        fi
17952      else
17953        # Otherwise we believe it is a complete path. Use it as it is.
17954        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17955$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17956        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17957$as_echo_n "checking for LDD... " >&6; }
17958        if test ! -x "$tool_specified"; then
17959          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17960$as_echo "not found" >&6; }
17961          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17962        fi
17963        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17964$as_echo "$tool_specified" >&6; }
17965      fi
17966    fi
17967  fi
17968
17969
17970  if test "x$LDD" = "x"; then
17971    # List shared lib dependencies is used for
17972    # debug output and checking for forbidden dependencies.
17973    # We can build without it.
17974    LDD="true"
17975  fi
17976
17977
17978  # Publish this variable in the help.
17979
17980
17981  if test "x$OTOOL" = x; then
17982    # The variable is not set by user, try to locate tool using the code snippet
17983    for ac_prog in otool
17984do
17985  # Extract the first word of "$ac_prog", so it can be a program name with args.
17986set dummy $ac_prog; ac_word=$2
17987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17988$as_echo_n "checking for $ac_word... " >&6; }
17989if ${ac_cv_path_OTOOL+:} false; then :
17990  $as_echo_n "(cached) " >&6
17991else
17992  case $OTOOL in
17993  [\\/]* | ?:[\\/]*)
17994  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17995  ;;
17996  *)
17997  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17998for as_dir in $PATH
17999do
18000  IFS=$as_save_IFS
18001  test -z "$as_dir" && as_dir=.
18002    for ac_exec_ext in '' $ac_executable_extensions; do
18003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18004    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18005    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18006    break 2
18007  fi
18008done
18009  done
18010IFS=$as_save_IFS
18011
18012  ;;
18013esac
18014fi
18015OTOOL=$ac_cv_path_OTOOL
18016if test -n "$OTOOL"; then
18017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18018$as_echo "$OTOOL" >&6; }
18019else
18020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18021$as_echo "no" >&6; }
18022fi
18023
18024
18025  test -n "$OTOOL" && break
18026done
18027
18028  else
18029    # The variable is set, but is it from the command line or the environment?
18030
18031    # Try to remove the string !OTOOL! from our list.
18032    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
18033    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18034      # If it failed, the variable was not from the command line. Ignore it,
18035      # but warn the user (except for BASH, which is always set by the calling BASH).
18036      if test "xOTOOL" != xBASH; then
18037        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
18038$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
18039      fi
18040      # Try to locate tool using the code snippet
18041      for ac_prog in otool
18042do
18043  # Extract the first word of "$ac_prog", so it can be a program name with args.
18044set dummy $ac_prog; ac_word=$2
18045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18046$as_echo_n "checking for $ac_word... " >&6; }
18047if ${ac_cv_path_OTOOL+:} false; then :
18048  $as_echo_n "(cached) " >&6
18049else
18050  case $OTOOL in
18051  [\\/]* | ?:[\\/]*)
18052  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18053  ;;
18054  *)
18055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18056for as_dir in $PATH
18057do
18058  IFS=$as_save_IFS
18059  test -z "$as_dir" && as_dir=.
18060    for ac_exec_ext in '' $ac_executable_extensions; do
18061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18062    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18064    break 2
18065  fi
18066done
18067  done
18068IFS=$as_save_IFS
18069
18070  ;;
18071esac
18072fi
18073OTOOL=$ac_cv_path_OTOOL
18074if test -n "$OTOOL"; then
18075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18076$as_echo "$OTOOL" >&6; }
18077else
18078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18079$as_echo "no" >&6; }
18080fi
18081
18082
18083  test -n "$OTOOL" && break
18084done
18085
18086    else
18087      # If it succeeded, then it was overridden by the user. We will use it
18088      # for the tool.
18089
18090      # First remove it from the list of overridden variables, so we can test
18091      # for unknown variables in the end.
18092      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18093
18094      # Check if the provided tool contains a complete path.
18095      tool_specified="$OTOOL"
18096      tool_basename="${tool_specified##*/}"
18097      if test "x$tool_basename" = "x$tool_specified"; then
18098        # A command without a complete path is provided, search $PATH.
18099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
18100$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
18101        # Extract the first word of "$tool_basename", so it can be a program name with args.
18102set dummy $tool_basename; ac_word=$2
18103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18104$as_echo_n "checking for $ac_word... " >&6; }
18105if ${ac_cv_path_OTOOL+:} false; then :
18106  $as_echo_n "(cached) " >&6
18107else
18108  case $OTOOL in
18109  [\\/]* | ?:[\\/]*)
18110  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
18111  ;;
18112  *)
18113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18114for as_dir in $PATH
18115do
18116  IFS=$as_save_IFS
18117  test -z "$as_dir" && as_dir=.
18118    for ac_exec_ext in '' $ac_executable_extensions; do
18119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18120    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
18121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18122    break 2
18123  fi
18124done
18125  done
18126IFS=$as_save_IFS
18127
18128  ;;
18129esac
18130fi
18131OTOOL=$ac_cv_path_OTOOL
18132if test -n "$OTOOL"; then
18133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
18134$as_echo "$OTOOL" >&6; }
18135else
18136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18137$as_echo "no" >&6; }
18138fi
18139
18140
18141        if test "x$OTOOL" = x; then
18142          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18143        fi
18144      else
18145        # Otherwise we believe it is a complete path. Use it as it is.
18146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
18147$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
18148        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
18149$as_echo_n "checking for OTOOL... " >&6; }
18150        if test ! -x "$tool_specified"; then
18151          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18152$as_echo "not found" >&6; }
18153          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
18154        fi
18155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18156$as_echo "$tool_specified" >&6; }
18157      fi
18158    fi
18159  fi
18160
18161
18162  if test "x$OTOOL" = "x"; then
18163    OTOOL="true"
18164  fi
18165
18166
18167  # Publish this variable in the help.
18168
18169
18170  if test "x$READELF" = x; then
18171    # The variable is not set by user, try to locate tool using the code snippet
18172    for ac_prog in greadelf readelf
18173do
18174  # Extract the first word of "$ac_prog", so it can be a program name with args.
18175set dummy $ac_prog; ac_word=$2
18176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18177$as_echo_n "checking for $ac_word... " >&6; }
18178if ${ac_cv_path_READELF+:} false; then :
18179  $as_echo_n "(cached) " >&6
18180else
18181  case $READELF in
18182  [\\/]* | ?:[\\/]*)
18183  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18184  ;;
18185  *)
18186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18187for as_dir in $PATH
18188do
18189  IFS=$as_save_IFS
18190  test -z "$as_dir" && as_dir=.
18191    for ac_exec_ext in '' $ac_executable_extensions; do
18192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18193    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18195    break 2
18196  fi
18197done
18198  done
18199IFS=$as_save_IFS
18200
18201  ;;
18202esac
18203fi
18204READELF=$ac_cv_path_READELF
18205if test -n "$READELF"; then
18206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18207$as_echo "$READELF" >&6; }
18208else
18209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18210$as_echo "no" >&6; }
18211fi
18212
18213
18214  test -n "$READELF" && break
18215done
18216
18217  else
18218    # The variable is set, but is it from the command line or the environment?
18219
18220    # Try to remove the string !READELF! from our list.
18221    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18222    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18223      # If it failed, the variable was not from the command line. Ignore it,
18224      # but warn the user (except for BASH, which is always set by the calling BASH).
18225      if test "xREADELF" != xBASH; then
18226        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18227$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18228      fi
18229      # Try to locate tool using the code snippet
18230      for ac_prog in greadelf readelf
18231do
18232  # Extract the first word of "$ac_prog", so it can be a program name with args.
18233set dummy $ac_prog; ac_word=$2
18234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18235$as_echo_n "checking for $ac_word... " >&6; }
18236if ${ac_cv_path_READELF+:} false; then :
18237  $as_echo_n "(cached) " >&6
18238else
18239  case $READELF in
18240  [\\/]* | ?:[\\/]*)
18241  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18242  ;;
18243  *)
18244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18245for as_dir in $PATH
18246do
18247  IFS=$as_save_IFS
18248  test -z "$as_dir" && as_dir=.
18249    for ac_exec_ext in '' $ac_executable_extensions; do
18250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18251    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18253    break 2
18254  fi
18255done
18256  done
18257IFS=$as_save_IFS
18258
18259  ;;
18260esac
18261fi
18262READELF=$ac_cv_path_READELF
18263if test -n "$READELF"; then
18264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18265$as_echo "$READELF" >&6; }
18266else
18267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18268$as_echo "no" >&6; }
18269fi
18270
18271
18272  test -n "$READELF" && break
18273done
18274
18275    else
18276      # If it succeeded, then it was overridden by the user. We will use it
18277      # for the tool.
18278
18279      # First remove it from the list of overridden variables, so we can test
18280      # for unknown variables in the end.
18281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18282
18283      # Check if the provided tool contains a complete path.
18284      tool_specified="$READELF"
18285      tool_basename="${tool_specified##*/}"
18286      if test "x$tool_basename" = "x$tool_specified"; then
18287        # A command without a complete path is provided, search $PATH.
18288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18289$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18290        # Extract the first word of "$tool_basename", so it can be a program name with args.
18291set dummy $tool_basename; ac_word=$2
18292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18293$as_echo_n "checking for $ac_word... " >&6; }
18294if ${ac_cv_path_READELF+:} false; then :
18295  $as_echo_n "(cached) " >&6
18296else
18297  case $READELF in
18298  [\\/]* | ?:[\\/]*)
18299  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18300  ;;
18301  *)
18302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18303for as_dir in $PATH
18304do
18305  IFS=$as_save_IFS
18306  test -z "$as_dir" && as_dir=.
18307    for ac_exec_ext in '' $ac_executable_extensions; do
18308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18309    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18311    break 2
18312  fi
18313done
18314  done
18315IFS=$as_save_IFS
18316
18317  ;;
18318esac
18319fi
18320READELF=$ac_cv_path_READELF
18321if test -n "$READELF"; then
18322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18323$as_echo "$READELF" >&6; }
18324else
18325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18326$as_echo "no" >&6; }
18327fi
18328
18329
18330        if test "x$READELF" = x; then
18331          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18332        fi
18333      else
18334        # Otherwise we believe it is a complete path. Use it as it is.
18335        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18336$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18337        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18338$as_echo_n "checking for READELF... " >&6; }
18339        if test ! -x "$tool_specified"; then
18340          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18341$as_echo "not found" >&6; }
18342          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18343        fi
18344        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18345$as_echo "$tool_specified" >&6; }
18346      fi
18347    fi
18348  fi
18349
18350
18351
18352
18353  # Publish this variable in the help.
18354
18355
18356  if test "x$HG" = x; then
18357    # The variable is not set by user, try to locate tool using the code snippet
18358    for ac_prog in hg
18359do
18360  # Extract the first word of "$ac_prog", so it can be a program name with args.
18361set dummy $ac_prog; ac_word=$2
18362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18363$as_echo_n "checking for $ac_word... " >&6; }
18364if ${ac_cv_path_HG+:} false; then :
18365  $as_echo_n "(cached) " >&6
18366else
18367  case $HG in
18368  [\\/]* | ?:[\\/]*)
18369  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18370  ;;
18371  *)
18372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18373for as_dir in $PATH
18374do
18375  IFS=$as_save_IFS
18376  test -z "$as_dir" && as_dir=.
18377    for ac_exec_ext in '' $ac_executable_extensions; do
18378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18379    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18381    break 2
18382  fi
18383done
18384  done
18385IFS=$as_save_IFS
18386
18387  ;;
18388esac
18389fi
18390HG=$ac_cv_path_HG
18391if test -n "$HG"; then
18392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18393$as_echo "$HG" >&6; }
18394else
18395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18396$as_echo "no" >&6; }
18397fi
18398
18399
18400  test -n "$HG" && break
18401done
18402
18403  else
18404    # The variable is set, but is it from the command line or the environment?
18405
18406    # Try to remove the string !HG! from our list.
18407    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18408    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18409      # If it failed, the variable was not from the command line. Ignore it,
18410      # but warn the user (except for BASH, which is always set by the calling BASH).
18411      if test "xHG" != xBASH; then
18412        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18413$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18414      fi
18415      # Try to locate tool using the code snippet
18416      for ac_prog in hg
18417do
18418  # Extract the first word of "$ac_prog", so it can be a program name with args.
18419set dummy $ac_prog; ac_word=$2
18420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18421$as_echo_n "checking for $ac_word... " >&6; }
18422if ${ac_cv_path_HG+:} false; then :
18423  $as_echo_n "(cached) " >&6
18424else
18425  case $HG in
18426  [\\/]* | ?:[\\/]*)
18427  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18428  ;;
18429  *)
18430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18431for as_dir in $PATH
18432do
18433  IFS=$as_save_IFS
18434  test -z "$as_dir" && as_dir=.
18435    for ac_exec_ext in '' $ac_executable_extensions; do
18436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18437    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18439    break 2
18440  fi
18441done
18442  done
18443IFS=$as_save_IFS
18444
18445  ;;
18446esac
18447fi
18448HG=$ac_cv_path_HG
18449if test -n "$HG"; then
18450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18451$as_echo "$HG" >&6; }
18452else
18453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18454$as_echo "no" >&6; }
18455fi
18456
18457
18458  test -n "$HG" && break
18459done
18460
18461    else
18462      # If it succeeded, then it was overridden by the user. We will use it
18463      # for the tool.
18464
18465      # First remove it from the list of overridden variables, so we can test
18466      # for unknown variables in the end.
18467      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18468
18469      # Check if the provided tool contains a complete path.
18470      tool_specified="$HG"
18471      tool_basename="${tool_specified##*/}"
18472      if test "x$tool_basename" = "x$tool_specified"; then
18473        # A command without a complete path is provided, search $PATH.
18474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18475$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18476        # Extract the first word of "$tool_basename", so it can be a program name with args.
18477set dummy $tool_basename; ac_word=$2
18478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18479$as_echo_n "checking for $ac_word... " >&6; }
18480if ${ac_cv_path_HG+:} false; then :
18481  $as_echo_n "(cached) " >&6
18482else
18483  case $HG in
18484  [\\/]* | ?:[\\/]*)
18485  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18486  ;;
18487  *)
18488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18489for as_dir in $PATH
18490do
18491  IFS=$as_save_IFS
18492  test -z "$as_dir" && as_dir=.
18493    for ac_exec_ext in '' $ac_executable_extensions; do
18494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18495    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18497    break 2
18498  fi
18499done
18500  done
18501IFS=$as_save_IFS
18502
18503  ;;
18504esac
18505fi
18506HG=$ac_cv_path_HG
18507if test -n "$HG"; then
18508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18509$as_echo "$HG" >&6; }
18510else
18511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18512$as_echo "no" >&6; }
18513fi
18514
18515
18516        if test "x$HG" = x; then
18517          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18518        fi
18519      else
18520        # Otherwise we believe it is a complete path. Use it as it is.
18521        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18522$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18524$as_echo_n "checking for HG... " >&6; }
18525        if test ! -x "$tool_specified"; then
18526          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18527$as_echo "not found" >&6; }
18528          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18529        fi
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18531$as_echo "$tool_specified" >&6; }
18532      fi
18533    fi
18534  fi
18535
18536
18537
18538
18539  # Publish this variable in the help.
18540
18541
18542  if test "x$STAT" = x; then
18543    # The variable is not set by user, try to locate tool using the code snippet
18544    for ac_prog in stat
18545do
18546  # Extract the first word of "$ac_prog", so it can be a program name with args.
18547set dummy $ac_prog; ac_word=$2
18548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18549$as_echo_n "checking for $ac_word... " >&6; }
18550if ${ac_cv_path_STAT+:} false; then :
18551  $as_echo_n "(cached) " >&6
18552else
18553  case $STAT in
18554  [\\/]* | ?:[\\/]*)
18555  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18556  ;;
18557  *)
18558  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18559for as_dir in $PATH
18560do
18561  IFS=$as_save_IFS
18562  test -z "$as_dir" && as_dir=.
18563    for ac_exec_ext in '' $ac_executable_extensions; do
18564  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18565    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18566    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18567    break 2
18568  fi
18569done
18570  done
18571IFS=$as_save_IFS
18572
18573  ;;
18574esac
18575fi
18576STAT=$ac_cv_path_STAT
18577if test -n "$STAT"; then
18578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18579$as_echo "$STAT" >&6; }
18580else
18581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18582$as_echo "no" >&6; }
18583fi
18584
18585
18586  test -n "$STAT" && break
18587done
18588
18589  else
18590    # The variable is set, but is it from the command line or the environment?
18591
18592    # Try to remove the string !STAT! from our list.
18593    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18594    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18595      # If it failed, the variable was not from the command line. Ignore it,
18596      # but warn the user (except for BASH, which is always set by the calling BASH).
18597      if test "xSTAT" != xBASH; then
18598        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18599$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18600      fi
18601      # Try to locate tool using the code snippet
18602      for ac_prog in stat
18603do
18604  # Extract the first word of "$ac_prog", so it can be a program name with args.
18605set dummy $ac_prog; ac_word=$2
18606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18607$as_echo_n "checking for $ac_word... " >&6; }
18608if ${ac_cv_path_STAT+:} false; then :
18609  $as_echo_n "(cached) " >&6
18610else
18611  case $STAT in
18612  [\\/]* | ?:[\\/]*)
18613  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18614  ;;
18615  *)
18616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18617for as_dir in $PATH
18618do
18619  IFS=$as_save_IFS
18620  test -z "$as_dir" && as_dir=.
18621    for ac_exec_ext in '' $ac_executable_extensions; do
18622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18623    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18625    break 2
18626  fi
18627done
18628  done
18629IFS=$as_save_IFS
18630
18631  ;;
18632esac
18633fi
18634STAT=$ac_cv_path_STAT
18635if test -n "$STAT"; then
18636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18637$as_echo "$STAT" >&6; }
18638else
18639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18640$as_echo "no" >&6; }
18641fi
18642
18643
18644  test -n "$STAT" && break
18645done
18646
18647    else
18648      # If it succeeded, then it was overridden by the user. We will use it
18649      # for the tool.
18650
18651      # First remove it from the list of overridden variables, so we can test
18652      # for unknown variables in the end.
18653      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18654
18655      # Check if the provided tool contains a complete path.
18656      tool_specified="$STAT"
18657      tool_basename="${tool_specified##*/}"
18658      if test "x$tool_basename" = "x$tool_specified"; then
18659        # A command without a complete path is provided, search $PATH.
18660        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18661$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18662        # Extract the first word of "$tool_basename", so it can be a program name with args.
18663set dummy $tool_basename; ac_word=$2
18664{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18665$as_echo_n "checking for $ac_word... " >&6; }
18666if ${ac_cv_path_STAT+:} false; then :
18667  $as_echo_n "(cached) " >&6
18668else
18669  case $STAT in
18670  [\\/]* | ?:[\\/]*)
18671  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18672  ;;
18673  *)
18674  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18675for as_dir in $PATH
18676do
18677  IFS=$as_save_IFS
18678  test -z "$as_dir" && as_dir=.
18679    for ac_exec_ext in '' $ac_executable_extensions; do
18680  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18681    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18682    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18683    break 2
18684  fi
18685done
18686  done
18687IFS=$as_save_IFS
18688
18689  ;;
18690esac
18691fi
18692STAT=$ac_cv_path_STAT
18693if test -n "$STAT"; then
18694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18695$as_echo "$STAT" >&6; }
18696else
18697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18698$as_echo "no" >&6; }
18699fi
18700
18701
18702        if test "x$STAT" = x; then
18703          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18704        fi
18705      else
18706        # Otherwise we believe it is a complete path. Use it as it is.
18707        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18708$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18709        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18710$as_echo_n "checking for STAT... " >&6; }
18711        if test ! -x "$tool_specified"; then
18712          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18713$as_echo "not found" >&6; }
18714          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18715        fi
18716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18717$as_echo "$tool_specified" >&6; }
18718      fi
18719    fi
18720  fi
18721
18722
18723
18724
18725  # Publish this variable in the help.
18726
18727
18728  if test "x$TIME" = x; then
18729    # The variable is not set by user, try to locate tool using the code snippet
18730    for ac_prog in time
18731do
18732  # Extract the first word of "$ac_prog", so it can be a program name with args.
18733set dummy $ac_prog; ac_word=$2
18734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18735$as_echo_n "checking for $ac_word... " >&6; }
18736if ${ac_cv_path_TIME+:} false; then :
18737  $as_echo_n "(cached) " >&6
18738else
18739  case $TIME in
18740  [\\/]* | ?:[\\/]*)
18741  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18742  ;;
18743  *)
18744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18745for as_dir in $PATH
18746do
18747  IFS=$as_save_IFS
18748  test -z "$as_dir" && as_dir=.
18749    for ac_exec_ext in '' $ac_executable_extensions; do
18750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18751    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18753    break 2
18754  fi
18755done
18756  done
18757IFS=$as_save_IFS
18758
18759  ;;
18760esac
18761fi
18762TIME=$ac_cv_path_TIME
18763if test -n "$TIME"; then
18764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18765$as_echo "$TIME" >&6; }
18766else
18767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18768$as_echo "no" >&6; }
18769fi
18770
18771
18772  test -n "$TIME" && break
18773done
18774
18775  else
18776    # The variable is set, but is it from the command line or the environment?
18777
18778    # Try to remove the string !TIME! from our list.
18779    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18780    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18781      # If it failed, the variable was not from the command line. Ignore it,
18782      # but warn the user (except for BASH, which is always set by the calling BASH).
18783      if test "xTIME" != xBASH; then
18784        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18785$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18786      fi
18787      # Try to locate tool using the code snippet
18788      for ac_prog in time
18789do
18790  # Extract the first word of "$ac_prog", so it can be a program name with args.
18791set dummy $ac_prog; ac_word=$2
18792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18793$as_echo_n "checking for $ac_word... " >&6; }
18794if ${ac_cv_path_TIME+:} false; then :
18795  $as_echo_n "(cached) " >&6
18796else
18797  case $TIME in
18798  [\\/]* | ?:[\\/]*)
18799  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18800  ;;
18801  *)
18802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18803for as_dir in $PATH
18804do
18805  IFS=$as_save_IFS
18806  test -z "$as_dir" && as_dir=.
18807    for ac_exec_ext in '' $ac_executable_extensions; do
18808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18809    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18811    break 2
18812  fi
18813done
18814  done
18815IFS=$as_save_IFS
18816
18817  ;;
18818esac
18819fi
18820TIME=$ac_cv_path_TIME
18821if test -n "$TIME"; then
18822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18823$as_echo "$TIME" >&6; }
18824else
18825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18826$as_echo "no" >&6; }
18827fi
18828
18829
18830  test -n "$TIME" && break
18831done
18832
18833    else
18834      # If it succeeded, then it was overridden by the user. We will use it
18835      # for the tool.
18836
18837      # First remove it from the list of overridden variables, so we can test
18838      # for unknown variables in the end.
18839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18840
18841      # Check if the provided tool contains a complete path.
18842      tool_specified="$TIME"
18843      tool_basename="${tool_specified##*/}"
18844      if test "x$tool_basename" = "x$tool_specified"; then
18845        # A command without a complete path is provided, search $PATH.
18846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18847$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18848        # Extract the first word of "$tool_basename", so it can be a program name with args.
18849set dummy $tool_basename; ac_word=$2
18850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18851$as_echo_n "checking for $ac_word... " >&6; }
18852if ${ac_cv_path_TIME+:} false; then :
18853  $as_echo_n "(cached) " >&6
18854else
18855  case $TIME in
18856  [\\/]* | ?:[\\/]*)
18857  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18858  ;;
18859  *)
18860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18861for as_dir in $PATH
18862do
18863  IFS=$as_save_IFS
18864  test -z "$as_dir" && as_dir=.
18865    for ac_exec_ext in '' $ac_executable_extensions; do
18866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18867    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18869    break 2
18870  fi
18871done
18872  done
18873IFS=$as_save_IFS
18874
18875  ;;
18876esac
18877fi
18878TIME=$ac_cv_path_TIME
18879if test -n "$TIME"; then
18880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18881$as_echo "$TIME" >&6; }
18882else
18883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18884$as_echo "no" >&6; }
18885fi
18886
18887
18888        if test "x$TIME" = x; then
18889          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18890        fi
18891      else
18892        # Otherwise we believe it is a complete path. Use it as it is.
18893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18894$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18896$as_echo_n "checking for TIME... " >&6; }
18897        if test ! -x "$tool_specified"; then
18898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18899$as_echo "not found" >&6; }
18900          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18901        fi
18902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18903$as_echo "$tool_specified" >&6; }
18904      fi
18905    fi
18906  fi
18907
18908
18909  # Check if it's GNU time
18910  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18911  if test "x$IS_GNU_TIME" != x; then
18912    IS_GNU_TIME=yes
18913  else
18914    IS_GNU_TIME=no
18915  fi
18916
18917
18918  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18919
18920
18921
18922  # Publish this variable in the help.
18923
18924
18925  if test "x$DSYMUTIL" = x; then
18926    # The variable is not set by user, try to locate tool using the code snippet
18927    for ac_prog in dsymutil
18928do
18929  # Extract the first word of "$ac_prog", so it can be a program name with args.
18930set dummy $ac_prog; ac_word=$2
18931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18932$as_echo_n "checking for $ac_word... " >&6; }
18933if ${ac_cv_path_DSYMUTIL+:} false; then :
18934  $as_echo_n "(cached) " >&6
18935else
18936  case $DSYMUTIL in
18937  [\\/]* | ?:[\\/]*)
18938  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18939  ;;
18940  *)
18941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18942for as_dir in $PATH
18943do
18944  IFS=$as_save_IFS
18945  test -z "$as_dir" && as_dir=.
18946    for ac_exec_ext in '' $ac_executable_extensions; do
18947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18948    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18950    break 2
18951  fi
18952done
18953  done
18954IFS=$as_save_IFS
18955
18956  ;;
18957esac
18958fi
18959DSYMUTIL=$ac_cv_path_DSYMUTIL
18960if test -n "$DSYMUTIL"; then
18961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18962$as_echo "$DSYMUTIL" >&6; }
18963else
18964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18965$as_echo "no" >&6; }
18966fi
18967
18968
18969  test -n "$DSYMUTIL" && break
18970done
18971
18972  else
18973    # The variable is set, but is it from the command line or the environment?
18974
18975    # Try to remove the string !DSYMUTIL! from our list.
18976    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18977    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18978      # If it failed, the variable was not from the command line. Ignore it,
18979      # but warn the user (except for BASH, which is always set by the calling BASH).
18980      if test "xDSYMUTIL" != xBASH; then
18981        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18982$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18983      fi
18984      # Try to locate tool using the code snippet
18985      for ac_prog in dsymutil
18986do
18987  # Extract the first word of "$ac_prog", so it can be a program name with args.
18988set dummy $ac_prog; ac_word=$2
18989{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18990$as_echo_n "checking for $ac_word... " >&6; }
18991if ${ac_cv_path_DSYMUTIL+:} false; then :
18992  $as_echo_n "(cached) " >&6
18993else
18994  case $DSYMUTIL in
18995  [\\/]* | ?:[\\/]*)
18996  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18997  ;;
18998  *)
18999  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19000for as_dir in $PATH
19001do
19002  IFS=$as_save_IFS
19003  test -z "$as_dir" && as_dir=.
19004    for ac_exec_ext in '' $ac_executable_extensions; do
19005  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19006    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19007    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19008    break 2
19009  fi
19010done
19011  done
19012IFS=$as_save_IFS
19013
19014  ;;
19015esac
19016fi
19017DSYMUTIL=$ac_cv_path_DSYMUTIL
19018if test -n "$DSYMUTIL"; then
19019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19020$as_echo "$DSYMUTIL" >&6; }
19021else
19022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19023$as_echo "no" >&6; }
19024fi
19025
19026
19027  test -n "$DSYMUTIL" && break
19028done
19029
19030    else
19031      # If it succeeded, then it was overridden by the user. We will use it
19032      # for the tool.
19033
19034      # First remove it from the list of overridden variables, so we can test
19035      # for unknown variables in the end.
19036      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19037
19038      # Check if the provided tool contains a complete path.
19039      tool_specified="$DSYMUTIL"
19040      tool_basename="${tool_specified##*/}"
19041      if test "x$tool_basename" = "x$tool_specified"; then
19042        # A command without a complete path is provided, search $PATH.
19043        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19044$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19045        # Extract the first word of "$tool_basename", so it can be a program name with args.
19046set dummy $tool_basename; ac_word=$2
19047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19048$as_echo_n "checking for $ac_word... " >&6; }
19049if ${ac_cv_path_DSYMUTIL+:} false; then :
19050  $as_echo_n "(cached) " >&6
19051else
19052  case $DSYMUTIL in
19053  [\\/]* | ?:[\\/]*)
19054  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19055  ;;
19056  *)
19057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19058for as_dir in $PATH
19059do
19060  IFS=$as_save_IFS
19061  test -z "$as_dir" && as_dir=.
19062    for ac_exec_ext in '' $ac_executable_extensions; do
19063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19064    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19066    break 2
19067  fi
19068done
19069  done
19070IFS=$as_save_IFS
19071
19072  ;;
19073esac
19074fi
19075DSYMUTIL=$ac_cv_path_DSYMUTIL
19076if test -n "$DSYMUTIL"; then
19077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19078$as_echo "$DSYMUTIL" >&6; }
19079else
19080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19081$as_echo "no" >&6; }
19082fi
19083
19084
19085        if test "x$DSYMUTIL" = x; then
19086          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19087        fi
19088      else
19089        # Otherwise we believe it is a complete path. Use it as it is.
19090        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19091$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19092        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19093$as_echo_n "checking for DSYMUTIL... " >&6; }
19094        if test ! -x "$tool_specified"; then
19095          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19096$as_echo "not found" >&6; }
19097          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19098        fi
19099        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19100$as_echo "$tool_specified" >&6; }
19101      fi
19102    fi
19103  fi
19104
19105
19106
19107  if test "x$DSYMUTIL" = x; then
19108    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19109  fi
19110
19111
19112
19113
19114
19115  # Publish this variable in the help.
19116
19117
19118  if test "x$XATTR" = x; then
19119    # The variable is not set by user, try to locate tool using the code snippet
19120    for ac_prog in xattr
19121do
19122  # Extract the first word of "$ac_prog", so it can be a program name with args.
19123set dummy $ac_prog; ac_word=$2
19124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19125$as_echo_n "checking for $ac_word... " >&6; }
19126if ${ac_cv_path_XATTR+:} false; then :
19127  $as_echo_n "(cached) " >&6
19128else
19129  case $XATTR in
19130  [\\/]* | ?:[\\/]*)
19131  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19132  ;;
19133  *)
19134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19135for as_dir in $PATH
19136do
19137  IFS=$as_save_IFS
19138  test -z "$as_dir" && as_dir=.
19139    for ac_exec_ext in '' $ac_executable_extensions; do
19140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19141    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19143    break 2
19144  fi
19145done
19146  done
19147IFS=$as_save_IFS
19148
19149  ;;
19150esac
19151fi
19152XATTR=$ac_cv_path_XATTR
19153if test -n "$XATTR"; then
19154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19155$as_echo "$XATTR" >&6; }
19156else
19157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19158$as_echo "no" >&6; }
19159fi
19160
19161
19162  test -n "$XATTR" && break
19163done
19164
19165  else
19166    # The variable is set, but is it from the command line or the environment?
19167
19168    # Try to remove the string !XATTR! from our list.
19169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19171      # If it failed, the variable was not from the command line. Ignore it,
19172      # but warn the user (except for BASH, which is always set by the calling BASH).
19173      if test "xXATTR" != xBASH; then
19174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19175$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19176      fi
19177      # Try to locate tool using the code snippet
19178      for ac_prog in xattr
19179do
19180  # Extract the first word of "$ac_prog", so it can be a program name with args.
19181set dummy $ac_prog; ac_word=$2
19182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19183$as_echo_n "checking for $ac_word... " >&6; }
19184if ${ac_cv_path_XATTR+:} false; then :
19185  $as_echo_n "(cached) " >&6
19186else
19187  case $XATTR in
19188  [\\/]* | ?:[\\/]*)
19189  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19190  ;;
19191  *)
19192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19193for as_dir in $PATH
19194do
19195  IFS=$as_save_IFS
19196  test -z "$as_dir" && as_dir=.
19197    for ac_exec_ext in '' $ac_executable_extensions; do
19198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19199    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19201    break 2
19202  fi
19203done
19204  done
19205IFS=$as_save_IFS
19206
19207  ;;
19208esac
19209fi
19210XATTR=$ac_cv_path_XATTR
19211if test -n "$XATTR"; then
19212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19213$as_echo "$XATTR" >&6; }
19214else
19215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19216$as_echo "no" >&6; }
19217fi
19218
19219
19220  test -n "$XATTR" && break
19221done
19222
19223    else
19224      # If it succeeded, then it was overridden by the user. We will use it
19225      # for the tool.
19226
19227      # First remove it from the list of overridden variables, so we can test
19228      # for unknown variables in the end.
19229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19230
19231      # Check if the provided tool contains a complete path.
19232      tool_specified="$XATTR"
19233      tool_basename="${tool_specified##*/}"
19234      if test "x$tool_basename" = "x$tool_specified"; then
19235        # A command without a complete path is provided, search $PATH.
19236        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19237$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19238        # Extract the first word of "$tool_basename", so it can be a program name with args.
19239set dummy $tool_basename; ac_word=$2
19240{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19241$as_echo_n "checking for $ac_word... " >&6; }
19242if ${ac_cv_path_XATTR+:} false; then :
19243  $as_echo_n "(cached) " >&6
19244else
19245  case $XATTR in
19246  [\\/]* | ?:[\\/]*)
19247  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19248  ;;
19249  *)
19250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19251for as_dir in $PATH
19252do
19253  IFS=$as_save_IFS
19254  test -z "$as_dir" && as_dir=.
19255    for ac_exec_ext in '' $ac_executable_extensions; do
19256  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19257    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19258    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19259    break 2
19260  fi
19261done
19262  done
19263IFS=$as_save_IFS
19264
19265  ;;
19266esac
19267fi
19268XATTR=$ac_cv_path_XATTR
19269if test -n "$XATTR"; then
19270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19271$as_echo "$XATTR" >&6; }
19272else
19273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19274$as_echo "no" >&6; }
19275fi
19276
19277
19278        if test "x$XATTR" = x; then
19279          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19280        fi
19281      else
19282        # Otherwise we believe it is a complete path. Use it as it is.
19283        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19284$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19285        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19286$as_echo_n "checking for XATTR... " >&6; }
19287        if test ! -x "$tool_specified"; then
19288          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19289$as_echo "not found" >&6; }
19290          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19291        fi
19292        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19293$as_echo "$tool_specified" >&6; }
19294      fi
19295    fi
19296  fi
19297
19298
19299
19300  if test "x$XATTR" = x; then
19301    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19302  fi
19303
19304
19305
19306
19307  # Publish this variable in the help.
19308
19309
19310  if test "x$CODESIGN" = x; then
19311    # The variable is not set by user, try to locate tool using the code snippet
19312    for ac_prog in codesign
19313do
19314  # Extract the first word of "$ac_prog", so it can be a program name with args.
19315set dummy $ac_prog; ac_word=$2
19316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19317$as_echo_n "checking for $ac_word... " >&6; }
19318if ${ac_cv_path_CODESIGN+:} false; then :
19319  $as_echo_n "(cached) " >&6
19320else
19321  case $CODESIGN in
19322  [\\/]* | ?:[\\/]*)
19323  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19324  ;;
19325  *)
19326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19327for as_dir in $PATH
19328do
19329  IFS=$as_save_IFS
19330  test -z "$as_dir" && as_dir=.
19331    for ac_exec_ext in '' $ac_executable_extensions; do
19332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19333    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19335    break 2
19336  fi
19337done
19338  done
19339IFS=$as_save_IFS
19340
19341  ;;
19342esac
19343fi
19344CODESIGN=$ac_cv_path_CODESIGN
19345if test -n "$CODESIGN"; then
19346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19347$as_echo "$CODESIGN" >&6; }
19348else
19349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19350$as_echo "no" >&6; }
19351fi
19352
19353
19354  test -n "$CODESIGN" && break
19355done
19356
19357  else
19358    # The variable is set, but is it from the command line or the environment?
19359
19360    # Try to remove the string !CODESIGN! from our list.
19361    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19362    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19363      # If it failed, the variable was not from the command line. Ignore it,
19364      # but warn the user (except for BASH, which is always set by the calling BASH).
19365      if test "xCODESIGN" != xBASH; then
19366        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19367$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19368      fi
19369      # Try to locate tool using the code snippet
19370      for ac_prog in codesign
19371do
19372  # Extract the first word of "$ac_prog", so it can be a program name with args.
19373set dummy $ac_prog; ac_word=$2
19374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19375$as_echo_n "checking for $ac_word... " >&6; }
19376if ${ac_cv_path_CODESIGN+:} false; then :
19377  $as_echo_n "(cached) " >&6
19378else
19379  case $CODESIGN in
19380  [\\/]* | ?:[\\/]*)
19381  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19382  ;;
19383  *)
19384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19385for as_dir in $PATH
19386do
19387  IFS=$as_save_IFS
19388  test -z "$as_dir" && as_dir=.
19389    for ac_exec_ext in '' $ac_executable_extensions; do
19390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19391    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19393    break 2
19394  fi
19395done
19396  done
19397IFS=$as_save_IFS
19398
19399  ;;
19400esac
19401fi
19402CODESIGN=$ac_cv_path_CODESIGN
19403if test -n "$CODESIGN"; then
19404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19405$as_echo "$CODESIGN" >&6; }
19406else
19407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19408$as_echo "no" >&6; }
19409fi
19410
19411
19412  test -n "$CODESIGN" && break
19413done
19414
19415    else
19416      # If it succeeded, then it was overridden by the user. We will use it
19417      # for the tool.
19418
19419      # First remove it from the list of overridden variables, so we can test
19420      # for unknown variables in the end.
19421      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19422
19423      # Check if the provided tool contains a complete path.
19424      tool_specified="$CODESIGN"
19425      tool_basename="${tool_specified##*/}"
19426      if test "x$tool_basename" = "x$tool_specified"; then
19427        # A command without a complete path is provided, search $PATH.
19428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19429$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19430        # Extract the first word of "$tool_basename", so it can be a program name with args.
19431set dummy $tool_basename; ac_word=$2
19432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19433$as_echo_n "checking for $ac_word... " >&6; }
19434if ${ac_cv_path_CODESIGN+:} false; then :
19435  $as_echo_n "(cached) " >&6
19436else
19437  case $CODESIGN in
19438  [\\/]* | ?:[\\/]*)
19439  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19440  ;;
19441  *)
19442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19443for as_dir in $PATH
19444do
19445  IFS=$as_save_IFS
19446  test -z "$as_dir" && as_dir=.
19447    for ac_exec_ext in '' $ac_executable_extensions; do
19448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19449    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19451    break 2
19452  fi
19453done
19454  done
19455IFS=$as_save_IFS
19456
19457  ;;
19458esac
19459fi
19460CODESIGN=$ac_cv_path_CODESIGN
19461if test -n "$CODESIGN"; then
19462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19463$as_echo "$CODESIGN" >&6; }
19464else
19465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19466$as_echo "no" >&6; }
19467fi
19468
19469
19470        if test "x$CODESIGN" = x; then
19471          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19472        fi
19473      else
19474        # Otherwise we believe it is a complete path. Use it as it is.
19475        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19476$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19477        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19478$as_echo_n "checking for CODESIGN... " >&6; }
19479        if test ! -x "$tool_specified"; then
19480          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19481$as_echo "not found" >&6; }
19482          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19483        fi
19484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19485$as_echo "$tool_specified" >&6; }
19486      fi
19487    fi
19488  fi
19489
19490
19491    if test "x$CODESIGN" != "x"; then
19492      # Verify that the openjdk_codesign certificate is present
19493      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19494$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19495      rm -f codesign-testfile
19496      touch codesign-testfile
19497      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19498      rm -f codesign-testfile
19499      if test "x$CODESIGN" = x; then
19500        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19501$as_echo "no" >&6; }
19502      else
19503        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19504$as_echo "yes" >&6; }
19505      fi
19506    fi
19507  fi
19508
19509
19510  # Test if bash supports pipefail.
19511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
19512$as_echo_n "checking if bash supports pipefail... " >&6; }
19513  if ${BASH} -c 'set -o pipefail'; then
19514    BASH_ARGS="$BASH_ARGS -o pipefail"
19515    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19516$as_echo "yes" >&6; }
19517  else
19518    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19519$as_echo "no" >&6; }
19520  fi
19521
19522  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
19523$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
19524  if ${BASH} -e -c 'true'; then
19525    BASH_ARGS="$BASH_ARGS -e"
19526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19527$as_echo "yes" >&6; }
19528  else
19529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19530$as_echo "no" >&6; }
19531  fi
19532
19533
19534
19535
19536# Check if pkg-config is available.
19537
19538
19539if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19540	if test -n "$ac_tool_prefix"; then
19541  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19542set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19544$as_echo_n "checking for $ac_word... " >&6; }
19545if ${ac_cv_path_PKG_CONFIG+:} false; then :
19546  $as_echo_n "(cached) " >&6
19547else
19548  case $PKG_CONFIG in
19549  [\\/]* | ?:[\\/]*)
19550  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19551  ;;
19552  *)
19553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19554for as_dir in $PATH
19555do
19556  IFS=$as_save_IFS
19557  test -z "$as_dir" && as_dir=.
19558    for ac_exec_ext in '' $ac_executable_extensions; do
19559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19560    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19562    break 2
19563  fi
19564done
19565  done
19566IFS=$as_save_IFS
19567
19568  ;;
19569esac
19570fi
19571PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19572if test -n "$PKG_CONFIG"; then
19573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19574$as_echo "$PKG_CONFIG" >&6; }
19575else
19576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19577$as_echo "no" >&6; }
19578fi
19579
19580
19581fi
19582if test -z "$ac_cv_path_PKG_CONFIG"; then
19583  ac_pt_PKG_CONFIG=$PKG_CONFIG
19584  # Extract the first word of "pkg-config", so it can be a program name with args.
19585set dummy pkg-config; ac_word=$2
19586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19587$as_echo_n "checking for $ac_word... " >&6; }
19588if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19589  $as_echo_n "(cached) " >&6
19590else
19591  case $ac_pt_PKG_CONFIG in
19592  [\\/]* | ?:[\\/]*)
19593  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19594  ;;
19595  *)
19596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19597for as_dir in $PATH
19598do
19599  IFS=$as_save_IFS
19600  test -z "$as_dir" && as_dir=.
19601    for ac_exec_ext in '' $ac_executable_extensions; do
19602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19603    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19605    break 2
19606  fi
19607done
19608  done
19609IFS=$as_save_IFS
19610
19611  ;;
19612esac
19613fi
19614ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19615if test -n "$ac_pt_PKG_CONFIG"; then
19616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19617$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19618else
19619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19620$as_echo "no" >&6; }
19621fi
19622
19623  if test "x$ac_pt_PKG_CONFIG" = x; then
19624    PKG_CONFIG=""
19625  else
19626    case $cross_compiling:$ac_tool_warned in
19627yes:)
19628{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19629$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19630ac_tool_warned=yes ;;
19631esac
19632    PKG_CONFIG=$ac_pt_PKG_CONFIG
19633  fi
19634else
19635  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19636fi
19637
19638fi
19639if test -n "$PKG_CONFIG"; then
19640	_pkg_min_version=0.9.0
19641	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19642$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19643	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19644		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19645$as_echo "yes" >&6; }
19646	else
19647		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19648$as_echo "no" >&6; }
19649		PKG_CONFIG=""
19650	fi
19651
19652fi
19653
19654# After basic tools have been setup, we can check build os specific details.
19655
19656  ###############################################################################
19657
19658  # Note that this is the build platform OS version!
19659
19660  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19661  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19662  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19663  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19664
19665
19666
19667
19668
19669# Setup builddeps, for automatic downloading of tools we need.
19670# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19671# boot-jdk setup, but we need to have basic tools setup first.
19672
19673
19674# Check whether --with-builddeps-conf was given.
19675if test "${with_builddeps_conf+set}" = set; then :
19676  withval=$with_builddeps_conf;
19677fi
19678
19679
19680
19681# Check whether --with-builddeps-server was given.
19682if test "${with_builddeps_server+set}" = set; then :
19683  withval=$with_builddeps_server;
19684fi
19685
19686
19687
19688# Check whether --with-builddeps-dir was given.
19689if test "${with_builddeps_dir+set}" = set; then :
19690  withval=$with_builddeps_dir;
19691else
19692  with_builddeps_dir=/localhome/builddeps
19693fi
19694
19695
19696
19697# Check whether --with-builddeps-group was given.
19698if test "${with_builddeps_group+set}" = set; then :
19699  withval=$with_builddeps_group;
19700fi
19701
19702
19703
19704
19705  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19706    if test "x$with_builddeps_conf" != x; then
19707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19708$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19709      builddepsfile=$with_builddeps_conf
19710      if test -s $builddepsfile; then
19711        . $builddepsfile
19712        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19713$as_echo "loaded!" >&6; }
19714      else
19715        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19716      fi
19717    else
19718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19719$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19720      builddepsfile=`mktemp`
19721      touch $builddepsfile
19722      # Put all found confs into a single file.
19723      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19724      # Source the file to acquire the variables
19725      if test -s $builddepsfile; then
19726        . $builddepsfile
19727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19728$as_echo "found at least one!" >&6; }
19729      else
19730        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19731      fi
19732    fi
19733    # Create build and target names that use _ instead of "-" and ".".
19734    # This is necessary to use them in variable names.
19735    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19736    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19737    # Extract rewrite information for build and target
19738    eval rewritten_build=\${REWRITE_${build_var}}
19739    if test "x$rewritten_build" = x; then
19740      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19741      echo Build stays the same $rewritten_build
19742    else
19743      echo Rewriting build for builddeps into $rewritten_build
19744    fi
19745    eval rewritten_target=\${REWRITE_${target_var}}
19746    if test "x$rewritten_target" = x; then
19747      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19748      echo Target stays the same $rewritten_target
19749    else
19750      echo Rewriting target for builddeps into $rewritten_target
19751    fi
19752    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19753    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19754  fi
19755  for ac_prog in 7z unzip
19756do
19757  # Extract the first word of "$ac_prog", so it can be a program name with args.
19758set dummy $ac_prog; ac_word=$2
19759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19760$as_echo_n "checking for $ac_word... " >&6; }
19761if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19762  $as_echo_n "(cached) " >&6
19763else
19764  if test -n "$BDEPS_UNZIP"; then
19765  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19766else
19767as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19768for as_dir in $PATH
19769do
19770  IFS=$as_save_IFS
19771  test -z "$as_dir" && as_dir=.
19772    for ac_exec_ext in '' $ac_executable_extensions; do
19773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19774    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19776    break 2
19777  fi
19778done
19779  done
19780IFS=$as_save_IFS
19781
19782fi
19783fi
19784BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19785if test -n "$BDEPS_UNZIP"; then
19786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19787$as_echo "$BDEPS_UNZIP" >&6; }
19788else
19789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19790$as_echo "no" >&6; }
19791fi
19792
19793
19794  test -n "$BDEPS_UNZIP" && break
19795done
19796
19797  if test "x$BDEPS_UNZIP" = x7z; then
19798    BDEPS_UNZIP="7z x"
19799  fi
19800
19801  for ac_prog in wget lftp ftp
19802do
19803  # Extract the first word of "$ac_prog", so it can be a program name with args.
19804set dummy $ac_prog; ac_word=$2
19805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19806$as_echo_n "checking for $ac_word... " >&6; }
19807if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19808  $as_echo_n "(cached) " >&6
19809else
19810  if test -n "$BDEPS_FTP"; then
19811  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19812else
19813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19814for as_dir in $PATH
19815do
19816  IFS=$as_save_IFS
19817  test -z "$as_dir" && as_dir=.
19818    for ac_exec_ext in '' $ac_executable_extensions; do
19819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19820    ac_cv_prog_BDEPS_FTP="$ac_prog"
19821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19822    break 2
19823  fi
19824done
19825  done
19826IFS=$as_save_IFS
19827
19828fi
19829fi
19830BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19831if test -n "$BDEPS_FTP"; then
19832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19833$as_echo "$BDEPS_FTP" >&6; }
19834else
19835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19836$as_echo "no" >&6; }
19837fi
19838
19839
19840  test -n "$BDEPS_FTP" && break
19841done
19842
19843
19844
19845###############################################################################
19846#
19847# Determine OpenJDK variants, options and version numbers.
19848#
19849###############################################################################
19850
19851# We need build & target for this.
19852
19853
19854  ###############################################################################
19855  #
19856  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19857  # We always build headless support.
19858  #
19859  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19860$as_echo_n "checking headful support... " >&6; }
19861  # Check whether --enable-headful was given.
19862if test "${enable_headful+set}" = set; then :
19863  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19864else
19865  SUPPORT_HEADFUL=yes
19866fi
19867
19868
19869  SUPPORT_HEADLESS=yes
19870  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19871
19872  if test "x$SUPPORT_HEADFUL" = xyes; then
19873    # We are building both headful and headless.
19874    headful_msg="include support for both headful and headless"
19875  fi
19876
19877  if test "x$SUPPORT_HEADFUL" = xno; then
19878    # Thus we are building headless only.
19879    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19880    headful_msg="headless only"
19881  fi
19882
19883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19884$as_echo "$headful_msg" >&6; }
19885
19886
19887
19888
19889
19890  # Control wether Hotspot runs Queens test after build.
19891  # Check whether --enable-hotspot-test-in-build was given.
19892if test "${enable_hotspot_test_in_build+set}" = set; then :
19893  enableval=$enable_hotspot_test_in_build;
19894else
19895  enable_hotspot_test_in_build=no
19896fi
19897
19898  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19899    TEST_IN_BUILD=true
19900  else
19901    TEST_IN_BUILD=false
19902  fi
19903
19904
19905  ###############################################################################
19906  #
19907  # Choose cacerts source file
19908  #
19909
19910# Check whether --with-cacerts-file was given.
19911if test "${with_cacerts_file+set}" = set; then :
19912  withval=$with_cacerts_file;
19913fi
19914
19915  if test "x$with_cacerts_file" != x; then
19916    CACERTS_FILE=$with_cacerts_file
19917  fi
19918
19919
19920  ###############################################################################
19921  #
19922  # Enable or disable unlimited crypto
19923  #
19924  # Check whether --enable-unlimited-crypto was given.
19925if test "${enable_unlimited_crypto+set}" = set; then :
19926  enableval=$enable_unlimited_crypto;
19927else
19928  enable_unlimited_crypto=no
19929fi
19930
19931  if test "x$enable_unlimited_crypto" = "xyes"; then
19932    UNLIMITED_CRYPTO=true
19933  else
19934    UNLIMITED_CRYPTO=false
19935  fi
19936
19937
19938  ###############################################################################
19939  #
19940  # Enable or disable the elliptic curve crypto implementation
19941  #
19942
19943
19944  ###############################################################################
19945  #
19946  # --enable-rmiconnector-iiop
19947  #
19948  # Check whether --enable-rmiconnector-iiop was given.
19949if test "${enable_rmiconnector_iiop+set}" = set; then :
19950  enableval=$enable_rmiconnector_iiop;
19951fi
19952
19953  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19954    RMICONNECTOR_IIOP=true
19955  else
19956    RMICONNECTOR_IIOP=false
19957  fi
19958
19959
19960  ###############################################################################
19961  #
19962  # Compress jars
19963  #
19964  COMPRESS_JARS=false
19965
19966
19967
19968
19969  # Source the version numbers
19970  . $AUTOCONF_DIR/version-numbers
19971
19972  # Get the settings from parameters
19973
19974# Check whether --with-milestone was given.
19975if test "${with_milestone+set}" = set; then :
19976  withval=$with_milestone;
19977fi
19978
19979  if test "x$with_milestone" = xyes; then
19980    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19981  elif test "x$with_milestone" != x; then
19982    MILESTONE="$with_milestone"
19983  fi
19984  if test "x$MILESTONE" = x; then
19985    MILESTONE=internal
19986  fi
19987
19988
19989# Check whether --with-update-version was given.
19990if test "${with_update_version+set}" = set; then :
19991  withval=$with_update_version;
19992fi
19993
19994  if test "x$with_update_version" = xyes; then
19995    as_fn_error $? "Update version must have a value" "$LINENO" 5
19996  elif test "x$with_update_version" != x; then
19997    JDK_UPDATE_VERSION="$with_update_version"
19998    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19999    # to a bug in expr (which reduces it to just X). To work around this, we
20000    # always add a 0 to one digit update versions.
20001    if test "${#JDK_UPDATE_VERSION}" = "1"; then
20002      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
20003    fi
20004  fi
20005
20006
20007# Check whether --with-user-release-suffix was given.
20008if test "${with_user_release_suffix+set}" = set; then :
20009  withval=$with_user_release_suffix;
20010fi
20011
20012  if test "x$with_user_release_suffix" = xyes; then
20013    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
20014  elif test "x$with_user_release_suffix" != x; then
20015    USER_RELEASE_SUFFIX="$with_user_release_suffix"
20016  fi
20017
20018
20019# Check whether --with-build-number was given.
20020if test "${with_build_number+set}" = set; then :
20021  withval=$with_build_number;
20022fi
20023
20024  if test "x$with_build_number" = xyes; then
20025    as_fn_error $? "Build number must have a value" "$LINENO" 5
20026  elif test "x$with_build_number" != x; then
20027    JDK_BUILD_NUMBER="$with_build_number"
20028  fi
20029  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
20030  if test "x$JDK_BUILD_NUMBER" = x; then
20031    JDK_BUILD_NUMBER=b00
20032    if test "x$USER_RELEASE_SUFFIX" = x; then
20033      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
20034      # Avoid [:alnum:] since it depends on the locale.
20035      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
20036      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20037    fi
20038  fi
20039
20040  # Now set the JDK version, milestone, build number etc.
20041
20042
20043
20044
20045
20046
20047
20048
20049
20050
20051
20052
20053
20054
20055
20056
20057# Check whether --with-copyright-year was given.
20058if test "${with_copyright_year+set}" = set; then :
20059  withval=$with_copyright_year;
20060fi
20061
20062  if test "x$with_copyright_year" = xyes; then
20063    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
20064  elif test "x$with_copyright_year" != x; then
20065    COPYRIGHT_YEAR="$with_copyright_year"
20066  else
20067    COPYRIGHT_YEAR=`date +'%Y'`
20068  fi
20069
20070
20071  if test "x$JDK_UPDATE_VERSION" != x; then
20072    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20073  else
20074    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20075  fi
20076
20077
20078  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20079
20080
20081
20082###############################################################################
20083#
20084# Setup BootJDK, used to bootstrap the build.
20085#
20086###############################################################################
20087
20088
20089  BOOT_JDK_FOUND=no
20090
20091# Check whether --with-boot-jdk was given.
20092if test "${with_boot_jdk+set}" = set; then :
20093  withval=$with_boot_jdk;
20094fi
20095
20096
20097  # We look for the Boot JDK through various means, going from more certain to
20098  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20099  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20100  # must check if this is indeed valid; otherwise we'll continue looking.
20101
20102  # Test: Is bootjdk explicitely set by command line arguments?
20103
20104  if test "x$BOOT_JDK_FOUND" = xno; then
20105    # Now execute the test
20106
20107  if test "x$with_boot_jdk" != x; then
20108    BOOT_JDK=$with_boot_jdk
20109    BOOT_JDK_FOUND=maybe
20110    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20111$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20112  fi
20113
20114
20115    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20116    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20117      # Do we have a bin/java?
20118      if test ! -x "$BOOT_JDK/bin/java"; then
20119        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20120$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20121        BOOT_JDK_FOUND=no
20122      else
20123        # Do we have a bin/javac?
20124        if test ! -x "$BOOT_JDK/bin/javac"; then
20125          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20127          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20128$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20129          BOOT_JDK_FOUND=no
20130        else
20131          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20132          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20133
20134          # Extra M4 quote needed to protect [] in grep expression.
20135          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20136          if test "x$FOUND_CORRECT_VERSION" = x; then
20137            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20138$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20139            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20140$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20141            BOOT_JDK_FOUND=no
20142          else
20143            # We're done! :-)
20144            BOOT_JDK_FOUND=yes
20145
20146  # Only process if variable expands to non-empty
20147
20148  if test "x$BOOT_JDK" != x; then
20149    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20150
20151  # Input might be given as Windows format, start by converting to
20152  # unix format.
20153  path="$BOOT_JDK"
20154  new_path=`$CYGPATH -u "$path"`
20155
20156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20159  # "foo.exe" is OK but "foo" is an error.
20160  #
20161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20162  # It is also a way to make sure we got the proper file name for the real test later on.
20163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20164  if test "x$test_shortpath" = x; then
20165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20167    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20168  fi
20169
20170  # Call helper function which possibly converts this using DOS-style short mode.
20171  # If so, the updated path is stored in $new_path.
20172
20173  input_path="$new_path"
20174  # Check if we need to convert this using DOS-style short mode. If the path
20175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20176  # take no chances and rewrite it.
20177  # Note: m4 eats our [], so we need to use [ and ] instead.
20178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20179  if test "x$has_forbidden_chars" != x; then
20180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20184      # Going to short mode and back again did indeed matter. Since short mode is
20185      # case insensitive, let's make it lowercase to improve readability.
20186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20187      # Now convert it back to Unix-stile (cygpath)
20188      input_path=`$CYGPATH -u "$shortmode_path"`
20189      new_path="$input_path"
20190    fi
20191  fi
20192
20193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20194  if test "x$test_cygdrive_prefix" = x; then
20195    # As a simple fix, exclude /usr/bin since it's not a real path.
20196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20198      # a path prefixed by /cygdrive for fixpath to work.
20199      new_path="$CYGWIN_ROOT_PATH$input_path"
20200    fi
20201  fi
20202
20203
20204  if test "x$path" != "x$new_path"; then
20205    BOOT_JDK="$new_path"
20206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20208  fi
20209
20210    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20211
20212  path="$BOOT_JDK"
20213  has_colon=`$ECHO $path | $GREP ^.:`
20214  new_path="$path"
20215  if test "x$has_colon" = x; then
20216    # Not in mixed or Windows style, start by that.
20217    new_path=`cmd //c echo $path`
20218  fi
20219
20220
20221  input_path="$new_path"
20222  # Check if we need to convert this using DOS-style short mode. If the path
20223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20224  # take no chances and rewrite it.
20225  # Note: m4 eats our [], so we need to use [ and ] instead.
20226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20227  if test "x$has_forbidden_chars" != x; then
20228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20230  fi
20231
20232
20233  windows_path="$new_path"
20234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20235    unix_path=`$CYGPATH -u "$windows_path"`
20236    new_path="$unix_path"
20237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20239    new_path="$unix_path"
20240  fi
20241
20242  if test "x$path" != "x$new_path"; then
20243    BOOT_JDK="$new_path"
20244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20246  fi
20247
20248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20250
20251    else
20252      # We're on a unix platform. Hooray! :)
20253      path="$BOOT_JDK"
20254      has_space=`$ECHO "$path" | $GREP " "`
20255      if test "x$has_space" != x; then
20256        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20258        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20259      fi
20260
20261      # Use eval to expand a potential ~
20262      eval path="$path"
20263      if test ! -f "$path" && test ! -d "$path"; then
20264        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20265      fi
20266
20267      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20268    fi
20269  fi
20270
20271            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20272$as_echo_n "checking for Boot JDK... " >&6; }
20273            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20274$as_echo "$BOOT_JDK" >&6; }
20275            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20276$as_echo_n "checking Boot JDK version... " >&6; }
20277            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20279$as_echo "$BOOT_JDK_VERSION" >&6; }
20280          fi # end check jdk version
20281        fi # end check javac
20282      fi # end check java
20283    fi # end check boot jdk found
20284  fi
20285
20286  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20287    # Having specified an argument which is incorrect will produce an instant failure;
20288    # we should not go on looking
20289    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20290  fi
20291
20292  # Test: Is bootjdk available from builddeps?
20293
20294  if test "x$BOOT_JDK_FOUND" = xno; then
20295    # Now execute the test
20296
20297
20298
20299  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20300    # Source the builddeps file again, to make sure it uses the latest variables!
20301    . $builddepsfile
20302    # Look for a target and build machine specific resource!
20303    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20304    if test "x$resource" = x; then
20305      # Ok, lets instead look for a target specific resource
20306      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20307    fi
20308    if test "x$resource" = x; then
20309      # Ok, lets instead look for a build specific resource
20310      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20311    fi
20312    if test "x$resource" = x; then
20313      # Ok, lets instead look for a generic resource
20314      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20315      resource=${builddep_bootjdk}
20316    fi
20317    if test "x$resource" != x; then
20318      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20319$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20320      # If the resource in the builddeps.conf file is an existing directory,
20321      # for example /java/linux/cups
20322      if test -d ${resource}; then
20323        depdir=${resource}
20324      else
20325
20326  # bootjdk is for example mymodule
20327  # $resource is for example libs/general/libmymod_1_2_3.zip
20328  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20329  # $with_builddeps_dir is for example /localhome/builddeps
20330  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20331  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20332  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20333  filename=`basename $resource`
20334  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20335  filebase=${filename%%.*}
20336  extension=${filename#*.}
20337  installdir=$with_builddeps_dir/$filebase
20338  if test ! -f $installdir/$filename.unpacked; then
20339    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20340$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20341    if test ! -d $installdir; then
20342      mkdir -p $installdir
20343    fi
20344    if test ! -d $installdir; then
20345      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20346    fi
20347    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20348    touch $tmpfile
20349    if test ! -f $tmpfile; then
20350      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20351    fi
20352
20353  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20354  # $tmpfile is the local file name for the downloaded file.
20355  VALID_TOOL=no
20356  if test "x$BDEPS_FTP" = xwget; then
20357    VALID_TOOL=yes
20358    wget -O $tmpfile $with_builddeps_server/$resource
20359  fi
20360  if test "x$BDEPS_FTP" = xlftp; then
20361    VALID_TOOL=yes
20362    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20363  fi
20364  if test "x$BDEPS_FTP" = xftp; then
20365    VALID_TOOL=yes
20366    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20367    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20368    FTPUSERPWD=${FTPSERVER%%@*}
20369    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20370      FTPUSER=${userpwd%%:*}
20371      FTPPWD=${userpwd#*@}
20372      FTPSERVER=${FTPSERVER#*@}
20373    else
20374      FTPUSER=ftp
20375      FTPPWD=ftp
20376    fi
20377    # the "pass" command does not work on some
20378    # ftp clients (read ftp.exe) but if it works,
20379    # passive mode is better!
20380    ( \
20381        echo "user $FTPUSER $FTPPWD"        ; \
20382        echo "pass"                         ; \
20383        echo "bin"                          ; \
20384        echo "get $FTPPATH $tmpfile"              ; \
20385    ) | ftp -in $FTPSERVER
20386  fi
20387  if test "x$VALID_TOOL" != xyes; then
20388    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20389  fi
20390
20391    mv $tmpfile $installdir/$filename
20392    if test ! -s $installdir/$filename; then
20393      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20394    fi
20395    case "$extension" in
20396      zip)  echo "Unzipping $installdir/$filename..."
20397        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20398        ;;
20399      tar.gz) echo "Untaring $installdir/$filename..."
20400        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20401        ;;
20402      tgz) echo "Untaring $installdir/$filename..."
20403        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20404        ;;
20405      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20406        ;;
20407    esac
20408  fi
20409  if test -f $installdir/$filename.unpacked; then
20410    depdir=$installdir
20411  fi
20412
20413      fi
20414      # Source the builddeps file again, because in the previous command, the depdir
20415      # was updated to point at the current build dependency install directory.
20416      . $builddepsfile
20417      # Now extract variables from the builddeps.conf files.
20418      theroot=${builddep_bootjdk_ROOT}
20419      thecflags=${builddep_bootjdk_CFLAGS}
20420      thelibs=${builddep_bootjdk_LIBS}
20421      if test "x$depdir" = x; then
20422        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20423      fi
20424      BOOT_JDK=$depdir
20425      if test "x$theroot" != x; then
20426        BOOT_JDK="$theroot"
20427      fi
20428      if test "x$thecflags" != x; then
20429        BOOT_JDK_CFLAGS="$thecflags"
20430      fi
20431      if test "x$thelibs" != x; then
20432        BOOT_JDK_LIBS="$thelibs"
20433      fi
20434      BOOT_JDK_FOUND=maybe
20435      else BOOT_JDK_FOUND=no
20436
20437    fi
20438    else BOOT_JDK_FOUND=no
20439
20440  fi
20441
20442
20443
20444    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20445    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20446      # Do we have a bin/java?
20447      if test ! -x "$BOOT_JDK/bin/java"; then
20448        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20449$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20450        BOOT_JDK_FOUND=no
20451      else
20452        # Do we have a bin/javac?
20453        if test ! -x "$BOOT_JDK/bin/javac"; then
20454          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20456          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20457$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20458          BOOT_JDK_FOUND=no
20459        else
20460          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20461          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20462
20463          # Extra M4 quote needed to protect [] in grep expression.
20464          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20465          if test "x$FOUND_CORRECT_VERSION" = x; then
20466            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20467$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20468            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20469$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20470            BOOT_JDK_FOUND=no
20471          else
20472            # We're done! :-)
20473            BOOT_JDK_FOUND=yes
20474
20475  # Only process if variable expands to non-empty
20476
20477  if test "x$BOOT_JDK" != x; then
20478    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20479
20480  # Input might be given as Windows format, start by converting to
20481  # unix format.
20482  path="$BOOT_JDK"
20483  new_path=`$CYGPATH -u "$path"`
20484
20485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20488  # "foo.exe" is OK but "foo" is an error.
20489  #
20490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20491  # It is also a way to make sure we got the proper file name for the real test later on.
20492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20493  if test "x$test_shortpath" = x; then
20494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20495$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20496    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20497  fi
20498
20499  # Call helper function which possibly converts this using DOS-style short mode.
20500  # If so, the updated path is stored in $new_path.
20501
20502  input_path="$new_path"
20503  # Check if we need to convert this using DOS-style short mode. If the path
20504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20505  # take no chances and rewrite it.
20506  # Note: m4 eats our [], so we need to use [ and ] instead.
20507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20508  if test "x$has_forbidden_chars" != x; then
20509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20513      # Going to short mode and back again did indeed matter. Since short mode is
20514      # case insensitive, let's make it lowercase to improve readability.
20515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20516      # Now convert it back to Unix-stile (cygpath)
20517      input_path=`$CYGPATH -u "$shortmode_path"`
20518      new_path="$input_path"
20519    fi
20520  fi
20521
20522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20523  if test "x$test_cygdrive_prefix" = x; then
20524    # As a simple fix, exclude /usr/bin since it's not a real path.
20525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20527      # a path prefixed by /cygdrive for fixpath to work.
20528      new_path="$CYGWIN_ROOT_PATH$input_path"
20529    fi
20530  fi
20531
20532
20533  if test "x$path" != "x$new_path"; then
20534    BOOT_JDK="$new_path"
20535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20536$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20537  fi
20538
20539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20540
20541  path="$BOOT_JDK"
20542  has_colon=`$ECHO $path | $GREP ^.:`
20543  new_path="$path"
20544  if test "x$has_colon" = x; then
20545    # Not in mixed or Windows style, start by that.
20546    new_path=`cmd //c echo $path`
20547  fi
20548
20549
20550  input_path="$new_path"
20551  # Check if we need to convert this using DOS-style short mode. If the path
20552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20553  # take no chances and rewrite it.
20554  # Note: m4 eats our [], so we need to use [ and ] instead.
20555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20556  if test "x$has_forbidden_chars" != x; then
20557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20559  fi
20560
20561
20562  windows_path="$new_path"
20563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20564    unix_path=`$CYGPATH -u "$windows_path"`
20565    new_path="$unix_path"
20566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20568    new_path="$unix_path"
20569  fi
20570
20571  if test "x$path" != "x$new_path"; then
20572    BOOT_JDK="$new_path"
20573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20574$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20575  fi
20576
20577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20579
20580    else
20581      # We're on a unix platform. Hooray! :)
20582      path="$BOOT_JDK"
20583      has_space=`$ECHO "$path" | $GREP " "`
20584      if test "x$has_space" != x; then
20585        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20586$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20587        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20588      fi
20589
20590      # Use eval to expand a potential ~
20591      eval path="$path"
20592      if test ! -f "$path" && test ! -d "$path"; then
20593        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20594      fi
20595
20596      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20597    fi
20598  fi
20599
20600            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20601$as_echo_n "checking for Boot JDK... " >&6; }
20602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20603$as_echo "$BOOT_JDK" >&6; }
20604            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20605$as_echo_n "checking Boot JDK version... " >&6; }
20606            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20607            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20608$as_echo "$BOOT_JDK_VERSION" >&6; }
20609          fi # end check jdk version
20610        fi # end check javac
20611      fi # end check java
20612    fi # end check boot jdk found
20613  fi
20614
20615
20616  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20617
20618  if test "x$BOOT_JDK_FOUND" = xno; then
20619    # Now execute the test
20620
20621  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20622    # First check at user selected default
20623
20624  if test "x$BOOT_JDK_FOUND" = xno; then
20625    # Now execute the test
20626
20627  if test -x /usr/libexec/java_home; then
20628    BOOT_JDK=`/usr/libexec/java_home `
20629    BOOT_JDK_FOUND=maybe
20630    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20631$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20632  fi
20633
20634
20635    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20636    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20637      # Do we have a bin/java?
20638      if test ! -x "$BOOT_JDK/bin/java"; then
20639        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20641        BOOT_JDK_FOUND=no
20642      else
20643        # Do we have a bin/javac?
20644        if test ! -x "$BOOT_JDK/bin/javac"; then
20645          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20647          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20648$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20649          BOOT_JDK_FOUND=no
20650        else
20651          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20652          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20653
20654          # Extra M4 quote needed to protect [] in grep expression.
20655          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20656          if test "x$FOUND_CORRECT_VERSION" = x; then
20657            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20659            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20660$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20661            BOOT_JDK_FOUND=no
20662          else
20663            # We're done! :-)
20664            BOOT_JDK_FOUND=yes
20665
20666  # Only process if variable expands to non-empty
20667
20668  if test "x$BOOT_JDK" != x; then
20669    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20670
20671  # Input might be given as Windows format, start by converting to
20672  # unix format.
20673  path="$BOOT_JDK"
20674  new_path=`$CYGPATH -u "$path"`
20675
20676  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20677  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20678  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20679  # "foo.exe" is OK but "foo" is an error.
20680  #
20681  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20682  # It is also a way to make sure we got the proper file name for the real test later on.
20683  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20684  if test "x$test_shortpath" = x; then
20685    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20687    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20688  fi
20689
20690  # Call helper function which possibly converts this using DOS-style short mode.
20691  # If so, the updated path is stored in $new_path.
20692
20693  input_path="$new_path"
20694  # Check if we need to convert this using DOS-style short mode. If the path
20695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20696  # take no chances and rewrite it.
20697  # Note: m4 eats our [], so we need to use [ and ] instead.
20698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20699  if test "x$has_forbidden_chars" != x; then
20700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20704      # Going to short mode and back again did indeed matter. Since short mode is
20705      # case insensitive, let's make it lowercase to improve readability.
20706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20707      # Now convert it back to Unix-stile (cygpath)
20708      input_path=`$CYGPATH -u "$shortmode_path"`
20709      new_path="$input_path"
20710    fi
20711  fi
20712
20713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20714  if test "x$test_cygdrive_prefix" = x; then
20715    # As a simple fix, exclude /usr/bin since it's not a real path.
20716    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20718      # a path prefixed by /cygdrive for fixpath to work.
20719      new_path="$CYGWIN_ROOT_PATH$input_path"
20720    fi
20721  fi
20722
20723
20724  if test "x$path" != "x$new_path"; then
20725    BOOT_JDK="$new_path"
20726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20728  fi
20729
20730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20731
20732  path="$BOOT_JDK"
20733  has_colon=`$ECHO $path | $GREP ^.:`
20734  new_path="$path"
20735  if test "x$has_colon" = x; then
20736    # Not in mixed or Windows style, start by that.
20737    new_path=`cmd //c echo $path`
20738  fi
20739
20740
20741  input_path="$new_path"
20742  # Check if we need to convert this using DOS-style short mode. If the path
20743  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20744  # take no chances and rewrite it.
20745  # Note: m4 eats our [], so we need to use [ and ] instead.
20746  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20747  if test "x$has_forbidden_chars" != x; then
20748    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20749    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20750  fi
20751
20752
20753  windows_path="$new_path"
20754  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20755    unix_path=`$CYGPATH -u "$windows_path"`
20756    new_path="$unix_path"
20757  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20758    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20759    new_path="$unix_path"
20760  fi
20761
20762  if test "x$path" != "x$new_path"; then
20763    BOOT_JDK="$new_path"
20764    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20765$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20766  fi
20767
20768  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20769  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20770
20771    else
20772      # We're on a unix platform. Hooray! :)
20773      path="$BOOT_JDK"
20774      has_space=`$ECHO "$path" | $GREP " "`
20775      if test "x$has_space" != x; then
20776        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20777$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20778        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20779      fi
20780
20781      # Use eval to expand a potential ~
20782      eval path="$path"
20783      if test ! -f "$path" && test ! -d "$path"; then
20784        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20785      fi
20786
20787      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20788    fi
20789  fi
20790
20791            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20792$as_echo_n "checking for Boot JDK... " >&6; }
20793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20794$as_echo "$BOOT_JDK" >&6; }
20795            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20796$as_echo_n "checking Boot JDK version... " >&6; }
20797            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20799$as_echo "$BOOT_JDK_VERSION" >&6; }
20800          fi # end check jdk version
20801        fi # end check javac
20802      fi # end check java
20803    fi # end check boot jdk found
20804  fi
20805
20806    # If that did not work out (e.g. too old), try explicit versions instead
20807
20808  if test "x$BOOT_JDK_FOUND" = xno; then
20809    # Now execute the test
20810
20811  if test -x /usr/libexec/java_home; then
20812    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20813    BOOT_JDK_FOUND=maybe
20814    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20815$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20816  fi
20817
20818
20819    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20820    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20821      # Do we have a bin/java?
20822      if test ! -x "$BOOT_JDK/bin/java"; then
20823        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20825        BOOT_JDK_FOUND=no
20826      else
20827        # Do we have a bin/javac?
20828        if test ! -x "$BOOT_JDK/bin/javac"; then
20829          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20830$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20831          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20832$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20833          BOOT_JDK_FOUND=no
20834        else
20835          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20836          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20837
20838          # Extra M4 quote needed to protect [] in grep expression.
20839          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20840          if test "x$FOUND_CORRECT_VERSION" = x; then
20841            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20843            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20844$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20845            BOOT_JDK_FOUND=no
20846          else
20847            # We're done! :-)
20848            BOOT_JDK_FOUND=yes
20849
20850  # Only process if variable expands to non-empty
20851
20852  if test "x$BOOT_JDK" != x; then
20853    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20854
20855  # Input might be given as Windows format, start by converting to
20856  # unix format.
20857  path="$BOOT_JDK"
20858  new_path=`$CYGPATH -u "$path"`
20859
20860  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20861  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20862  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20863  # "foo.exe" is OK but "foo" is an error.
20864  #
20865  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20866  # It is also a way to make sure we got the proper file name for the real test later on.
20867  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20868  if test "x$test_shortpath" = x; then
20869    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20870$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20871    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20872  fi
20873
20874  # Call helper function which possibly converts this using DOS-style short mode.
20875  # If so, the updated path is stored in $new_path.
20876
20877  input_path="$new_path"
20878  # Check if we need to convert this using DOS-style short mode. If the path
20879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20880  # take no chances and rewrite it.
20881  # Note: m4 eats our [], so we need to use [ and ] instead.
20882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20883  if test "x$has_forbidden_chars" != x; then
20884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20885    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20886    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20887    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20888      # Going to short mode and back again did indeed matter. Since short mode is
20889      # case insensitive, let's make it lowercase to improve readability.
20890      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20891      # Now convert it back to Unix-stile (cygpath)
20892      input_path=`$CYGPATH -u "$shortmode_path"`
20893      new_path="$input_path"
20894    fi
20895  fi
20896
20897  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20898  if test "x$test_cygdrive_prefix" = x; then
20899    # As a simple fix, exclude /usr/bin since it's not a real path.
20900    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20901      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20902      # a path prefixed by /cygdrive for fixpath to work.
20903      new_path="$CYGWIN_ROOT_PATH$input_path"
20904    fi
20905  fi
20906
20907
20908  if test "x$path" != "x$new_path"; then
20909    BOOT_JDK="$new_path"
20910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20912  fi
20913
20914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20915
20916  path="$BOOT_JDK"
20917  has_colon=`$ECHO $path | $GREP ^.:`
20918  new_path="$path"
20919  if test "x$has_colon" = x; then
20920    # Not in mixed or Windows style, start by that.
20921    new_path=`cmd //c echo $path`
20922  fi
20923
20924
20925  input_path="$new_path"
20926  # Check if we need to convert this using DOS-style short mode. If the path
20927  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20928  # take no chances and rewrite it.
20929  # Note: m4 eats our [], so we need to use [ and ] instead.
20930  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20931  if test "x$has_forbidden_chars" != x; then
20932    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20933    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20934  fi
20935
20936
20937  windows_path="$new_path"
20938  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20939    unix_path=`$CYGPATH -u "$windows_path"`
20940    new_path="$unix_path"
20941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20942    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20943    new_path="$unix_path"
20944  fi
20945
20946  if test "x$path" != "x$new_path"; then
20947    BOOT_JDK="$new_path"
20948    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20949$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20950  fi
20951
20952  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20953  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20954
20955    else
20956      # We're on a unix platform. Hooray! :)
20957      path="$BOOT_JDK"
20958      has_space=`$ECHO "$path" | $GREP " "`
20959      if test "x$has_space" != x; then
20960        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20961$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20962        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20963      fi
20964
20965      # Use eval to expand a potential ~
20966      eval path="$path"
20967      if test ! -f "$path" && test ! -d "$path"; then
20968        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20969      fi
20970
20971      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20972    fi
20973  fi
20974
20975            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20976$as_echo_n "checking for Boot JDK... " >&6; }
20977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20978$as_echo "$BOOT_JDK" >&6; }
20979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20980$as_echo_n "checking Boot JDK version... " >&6; }
20981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20983$as_echo "$BOOT_JDK_VERSION" >&6; }
20984          fi # end check jdk version
20985        fi # end check javac
20986      fi # end check java
20987    fi # end check boot jdk found
20988  fi
20989
20990
20991  if test "x$BOOT_JDK_FOUND" = xno; then
20992    # Now execute the test
20993
20994  if test -x /usr/libexec/java_home; then
20995    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20996    BOOT_JDK_FOUND=maybe
20997    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20998$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20999  fi
21000
21001
21002    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21003    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21004      # Do we have a bin/java?
21005      if test ! -x "$BOOT_JDK/bin/java"; then
21006        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21007$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21008        BOOT_JDK_FOUND=no
21009      else
21010        # Do we have a bin/javac?
21011        if test ! -x "$BOOT_JDK/bin/javac"; then
21012          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21014          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21015$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21016          BOOT_JDK_FOUND=no
21017        else
21018          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21019          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21020
21021          # Extra M4 quote needed to protect [] in grep expression.
21022          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21023          if test "x$FOUND_CORRECT_VERSION" = x; then
21024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21026            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21027$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21028            BOOT_JDK_FOUND=no
21029          else
21030            # We're done! :-)
21031            BOOT_JDK_FOUND=yes
21032
21033  # Only process if variable expands to non-empty
21034
21035  if test "x$BOOT_JDK" != x; then
21036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21037
21038  # Input might be given as Windows format, start by converting to
21039  # unix format.
21040  path="$BOOT_JDK"
21041  new_path=`$CYGPATH -u "$path"`
21042
21043  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21044  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21045  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21046  # "foo.exe" is OK but "foo" is an error.
21047  #
21048  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21049  # It is also a way to make sure we got the proper file name for the real test later on.
21050  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21051  if test "x$test_shortpath" = x; then
21052    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21053$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21054    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21055  fi
21056
21057  # Call helper function which possibly converts this using DOS-style short mode.
21058  # If so, the updated path is stored in $new_path.
21059
21060  input_path="$new_path"
21061  # Check if we need to convert this using DOS-style short mode. If the path
21062  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21063  # take no chances and rewrite it.
21064  # Note: m4 eats our [], so we need to use [ and ] instead.
21065  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21066  if test "x$has_forbidden_chars" != x; then
21067    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21068    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21069    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21070    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21071      # Going to short mode and back again did indeed matter. Since short mode is
21072      # case insensitive, let's make it lowercase to improve readability.
21073      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21074      # Now convert it back to Unix-stile (cygpath)
21075      input_path=`$CYGPATH -u "$shortmode_path"`
21076      new_path="$input_path"
21077    fi
21078  fi
21079
21080  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21081  if test "x$test_cygdrive_prefix" = x; then
21082    # As a simple fix, exclude /usr/bin since it's not a real path.
21083    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21084      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21085      # a path prefixed by /cygdrive for fixpath to work.
21086      new_path="$CYGWIN_ROOT_PATH$input_path"
21087    fi
21088  fi
21089
21090
21091  if test "x$path" != "x$new_path"; then
21092    BOOT_JDK="$new_path"
21093    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21094$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21095  fi
21096
21097    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21098
21099  path="$BOOT_JDK"
21100  has_colon=`$ECHO $path | $GREP ^.:`
21101  new_path="$path"
21102  if test "x$has_colon" = x; then
21103    # Not in mixed or Windows style, start by that.
21104    new_path=`cmd //c echo $path`
21105  fi
21106
21107
21108  input_path="$new_path"
21109  # Check if we need to convert this using DOS-style short mode. If the path
21110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21111  # take no chances and rewrite it.
21112  # Note: m4 eats our [], so we need to use [ and ] instead.
21113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21114  if test "x$has_forbidden_chars" != x; then
21115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21117  fi
21118
21119
21120  windows_path="$new_path"
21121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21122    unix_path=`$CYGPATH -u "$windows_path"`
21123    new_path="$unix_path"
21124  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21125    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21126    new_path="$unix_path"
21127  fi
21128
21129  if test "x$path" != "x$new_path"; then
21130    BOOT_JDK="$new_path"
21131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21132$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21133  fi
21134
21135  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21136  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21137
21138    else
21139      # We're on a unix platform. Hooray! :)
21140      path="$BOOT_JDK"
21141      has_space=`$ECHO "$path" | $GREP " "`
21142      if test "x$has_space" != x; then
21143        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21145        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21146      fi
21147
21148      # Use eval to expand a potential ~
21149      eval path="$path"
21150      if test ! -f "$path" && test ! -d "$path"; then
21151        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21152      fi
21153
21154      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21155    fi
21156  fi
21157
21158            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21159$as_echo_n "checking for Boot JDK... " >&6; }
21160            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21161$as_echo "$BOOT_JDK" >&6; }
21162            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21163$as_echo_n "checking Boot JDK version... " >&6; }
21164            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21165            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21166$as_echo "$BOOT_JDK_VERSION" >&6; }
21167          fi # end check jdk version
21168        fi # end check javac
21169      fi # end check java
21170    fi # end check boot jdk found
21171  fi
21172
21173
21174  if test "x$BOOT_JDK_FOUND" = xno; then
21175    # Now execute the test
21176
21177  if test -x /usr/libexec/java_home; then
21178    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21179    BOOT_JDK_FOUND=maybe
21180    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21181$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21182  fi
21183
21184
21185    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21186    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21187      # Do we have a bin/java?
21188      if test ! -x "$BOOT_JDK/bin/java"; then
21189        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21190$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21191        BOOT_JDK_FOUND=no
21192      else
21193        # Do we have a bin/javac?
21194        if test ! -x "$BOOT_JDK/bin/javac"; then
21195          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21196$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21197          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21198$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21199          BOOT_JDK_FOUND=no
21200        else
21201          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21202          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21203
21204          # Extra M4 quote needed to protect [] in grep expression.
21205          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21206          if test "x$FOUND_CORRECT_VERSION" = x; then
21207            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21209            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21210$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21211            BOOT_JDK_FOUND=no
21212          else
21213            # We're done! :-)
21214            BOOT_JDK_FOUND=yes
21215
21216  # Only process if variable expands to non-empty
21217
21218  if test "x$BOOT_JDK" != x; then
21219    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21220
21221  # Input might be given as Windows format, start by converting to
21222  # unix format.
21223  path="$BOOT_JDK"
21224  new_path=`$CYGPATH -u "$path"`
21225
21226  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21227  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21228  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21229  # "foo.exe" is OK but "foo" is an error.
21230  #
21231  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21232  # It is also a way to make sure we got the proper file name for the real test later on.
21233  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21234  if test "x$test_shortpath" = x; then
21235    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21236$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21237    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21238  fi
21239
21240  # Call helper function which possibly converts this using DOS-style short mode.
21241  # If so, the updated path is stored in $new_path.
21242
21243  input_path="$new_path"
21244  # Check if we need to convert this using DOS-style short mode. If the path
21245  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21246  # take no chances and rewrite it.
21247  # Note: m4 eats our [], so we need to use [ and ] instead.
21248  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21249  if test "x$has_forbidden_chars" != x; then
21250    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21251    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21252    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21253    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21254      # Going to short mode and back again did indeed matter. Since short mode is
21255      # case insensitive, let's make it lowercase to improve readability.
21256      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21257      # Now convert it back to Unix-stile (cygpath)
21258      input_path=`$CYGPATH -u "$shortmode_path"`
21259      new_path="$input_path"
21260    fi
21261  fi
21262
21263  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21264  if test "x$test_cygdrive_prefix" = x; then
21265    # As a simple fix, exclude /usr/bin since it's not a real path.
21266    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21267      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21268      # a path prefixed by /cygdrive for fixpath to work.
21269      new_path="$CYGWIN_ROOT_PATH$input_path"
21270    fi
21271  fi
21272
21273
21274  if test "x$path" != "x$new_path"; then
21275    BOOT_JDK="$new_path"
21276    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21277$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21278  fi
21279
21280    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21281
21282  path="$BOOT_JDK"
21283  has_colon=`$ECHO $path | $GREP ^.:`
21284  new_path="$path"
21285  if test "x$has_colon" = x; then
21286    # Not in mixed or Windows style, start by that.
21287    new_path=`cmd //c echo $path`
21288  fi
21289
21290
21291  input_path="$new_path"
21292  # Check if we need to convert this using DOS-style short mode. If the path
21293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21294  # take no chances and rewrite it.
21295  # Note: m4 eats our [], so we need to use [ and ] instead.
21296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21297  if test "x$has_forbidden_chars" != x; then
21298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21299    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21300  fi
21301
21302
21303  windows_path="$new_path"
21304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21305    unix_path=`$CYGPATH -u "$windows_path"`
21306    new_path="$unix_path"
21307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21309    new_path="$unix_path"
21310  fi
21311
21312  if test "x$path" != "x$new_path"; then
21313    BOOT_JDK="$new_path"
21314    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21315$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21316  fi
21317
21318  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21319  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21320
21321    else
21322      # We're on a unix platform. Hooray! :)
21323      path="$BOOT_JDK"
21324      has_space=`$ECHO "$path" | $GREP " "`
21325      if test "x$has_space" != x; then
21326        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21327$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21328        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21329      fi
21330
21331      # Use eval to expand a potential ~
21332      eval path="$path"
21333      if test ! -f "$path" && test ! -d "$path"; then
21334        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21335      fi
21336
21337      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21338    fi
21339  fi
21340
21341            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21342$as_echo_n "checking for Boot JDK... " >&6; }
21343            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21344$as_echo "$BOOT_JDK" >&6; }
21345            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21346$as_echo_n "checking Boot JDK version... " >&6; }
21347            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21348            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21349$as_echo "$BOOT_JDK_VERSION" >&6; }
21350          fi # end check jdk version
21351        fi # end check javac
21352      fi # end check java
21353    fi # end check boot jdk found
21354  fi
21355
21356  fi
21357
21358
21359    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21360    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21361      # Do we have a bin/java?
21362      if test ! -x "$BOOT_JDK/bin/java"; then
21363        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21364$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21365        BOOT_JDK_FOUND=no
21366      else
21367        # Do we have a bin/javac?
21368        if test ! -x "$BOOT_JDK/bin/javac"; then
21369          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21371          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21372$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21373          BOOT_JDK_FOUND=no
21374        else
21375          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21376          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21377
21378          # Extra M4 quote needed to protect [] in grep expression.
21379          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21380          if test "x$FOUND_CORRECT_VERSION" = x; then
21381            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21382$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21383            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21384$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21385            BOOT_JDK_FOUND=no
21386          else
21387            # We're done! :-)
21388            BOOT_JDK_FOUND=yes
21389
21390  # Only process if variable expands to non-empty
21391
21392  if test "x$BOOT_JDK" != x; then
21393    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21394
21395  # Input might be given as Windows format, start by converting to
21396  # unix format.
21397  path="$BOOT_JDK"
21398  new_path=`$CYGPATH -u "$path"`
21399
21400  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21401  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21402  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21403  # "foo.exe" is OK but "foo" is an error.
21404  #
21405  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21406  # It is also a way to make sure we got the proper file name for the real test later on.
21407  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21408  if test "x$test_shortpath" = x; then
21409    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21410$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21411    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21412  fi
21413
21414  # Call helper function which possibly converts this using DOS-style short mode.
21415  # If so, the updated path is stored in $new_path.
21416
21417  input_path="$new_path"
21418  # Check if we need to convert this using DOS-style short mode. If the path
21419  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21420  # take no chances and rewrite it.
21421  # Note: m4 eats our [], so we need to use [ and ] instead.
21422  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21423  if test "x$has_forbidden_chars" != x; then
21424    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21425    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21426    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21427    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21428      # Going to short mode and back again did indeed matter. Since short mode is
21429      # case insensitive, let's make it lowercase to improve readability.
21430      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21431      # Now convert it back to Unix-stile (cygpath)
21432      input_path=`$CYGPATH -u "$shortmode_path"`
21433      new_path="$input_path"
21434    fi
21435  fi
21436
21437  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21438  if test "x$test_cygdrive_prefix" = x; then
21439    # As a simple fix, exclude /usr/bin since it's not a real path.
21440    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21441      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21442      # a path prefixed by /cygdrive for fixpath to work.
21443      new_path="$CYGWIN_ROOT_PATH$input_path"
21444    fi
21445  fi
21446
21447
21448  if test "x$path" != "x$new_path"; then
21449    BOOT_JDK="$new_path"
21450    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21451$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21452  fi
21453
21454    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21455
21456  path="$BOOT_JDK"
21457  has_colon=`$ECHO $path | $GREP ^.:`
21458  new_path="$path"
21459  if test "x$has_colon" = x; then
21460    # Not in mixed or Windows style, start by that.
21461    new_path=`cmd //c echo $path`
21462  fi
21463
21464
21465  input_path="$new_path"
21466  # Check if we need to convert this using DOS-style short mode. If the path
21467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21468  # take no chances and rewrite it.
21469  # Note: m4 eats our [], so we need to use [ and ] instead.
21470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21471  if test "x$has_forbidden_chars" != x; then
21472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21473    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21474  fi
21475
21476
21477  windows_path="$new_path"
21478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21479    unix_path=`$CYGPATH -u "$windows_path"`
21480    new_path="$unix_path"
21481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21483    new_path="$unix_path"
21484  fi
21485
21486  if test "x$path" != "x$new_path"; then
21487    BOOT_JDK="$new_path"
21488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21490  fi
21491
21492  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21493  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21494
21495    else
21496      # We're on a unix platform. Hooray! :)
21497      path="$BOOT_JDK"
21498      has_space=`$ECHO "$path" | $GREP " "`
21499      if test "x$has_space" != x; then
21500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21502        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21503      fi
21504
21505      # Use eval to expand a potential ~
21506      eval path="$path"
21507      if test ! -f "$path" && test ! -d "$path"; then
21508        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21509      fi
21510
21511      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21512    fi
21513  fi
21514
21515            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21516$as_echo_n "checking for Boot JDK... " >&6; }
21517            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21518$as_echo "$BOOT_JDK" >&6; }
21519            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21520$as_echo_n "checking Boot JDK version... " >&6; }
21521            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21522            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21523$as_echo "$BOOT_JDK_VERSION" >&6; }
21524          fi # end check jdk version
21525        fi # end check javac
21526      fi # end check java
21527    fi # end check boot jdk found
21528  fi
21529
21530
21531  # Test: Is $JAVA_HOME set?
21532
21533  if test "x$BOOT_JDK_FOUND" = xno; then
21534    # Now execute the test
21535
21536  if test "x$JAVA_HOME" != x; then
21537    JAVA_HOME_PROCESSED="$JAVA_HOME"
21538
21539  # Only process if variable expands to non-empty
21540
21541  if test "x$JAVA_HOME_PROCESSED" != x; then
21542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21543
21544  # Input might be given as Windows format, start by converting to
21545  # unix format.
21546  path="$JAVA_HOME_PROCESSED"
21547  new_path=`$CYGPATH -u "$path"`
21548
21549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21552  # "foo.exe" is OK but "foo" is an error.
21553  #
21554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21555  # It is also a way to make sure we got the proper file name for the real test later on.
21556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21557  if test "x$test_shortpath" = x; then
21558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21559$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21560    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21561  fi
21562
21563  # Call helper function which possibly converts this using DOS-style short mode.
21564  # If so, the updated path is stored in $new_path.
21565
21566  input_path="$new_path"
21567  # Check if we need to convert this using DOS-style short mode. If the path
21568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21569  # take no chances and rewrite it.
21570  # Note: m4 eats our [], so we need to use [ and ] instead.
21571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21572  if test "x$has_forbidden_chars" != x; then
21573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21577      # Going to short mode and back again did indeed matter. Since short mode is
21578      # case insensitive, let's make it lowercase to improve readability.
21579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21580      # Now convert it back to Unix-stile (cygpath)
21581      input_path=`$CYGPATH -u "$shortmode_path"`
21582      new_path="$input_path"
21583    fi
21584  fi
21585
21586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21587  if test "x$test_cygdrive_prefix" = x; then
21588    # As a simple fix, exclude /usr/bin since it's not a real path.
21589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21591      # a path prefixed by /cygdrive for fixpath to work.
21592      new_path="$CYGWIN_ROOT_PATH$input_path"
21593    fi
21594  fi
21595
21596
21597  if test "x$path" != "x$new_path"; then
21598    JAVA_HOME_PROCESSED="$new_path"
21599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21600$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21601  fi
21602
21603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21604
21605  path="$JAVA_HOME_PROCESSED"
21606  has_colon=`$ECHO $path | $GREP ^.:`
21607  new_path="$path"
21608  if test "x$has_colon" = x; then
21609    # Not in mixed or Windows style, start by that.
21610    new_path=`cmd //c echo $path`
21611  fi
21612
21613
21614  input_path="$new_path"
21615  # Check if we need to convert this using DOS-style short mode. If the path
21616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21617  # take no chances and rewrite it.
21618  # Note: m4 eats our [], so we need to use [ and ] instead.
21619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21620  if test "x$has_forbidden_chars" != x; then
21621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21623  fi
21624
21625
21626  windows_path="$new_path"
21627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21628    unix_path=`$CYGPATH -u "$windows_path"`
21629    new_path="$unix_path"
21630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21632    new_path="$unix_path"
21633  fi
21634
21635  if test "x$path" != "x$new_path"; then
21636    JAVA_HOME_PROCESSED="$new_path"
21637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21638$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21639  fi
21640
21641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21643
21644    else
21645      # We're on a unix platform. Hooray! :)
21646      path="$JAVA_HOME_PROCESSED"
21647      has_space=`$ECHO "$path" | $GREP " "`
21648      if test "x$has_space" != x; then
21649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21650$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21652      fi
21653
21654      # Use eval to expand a potential ~
21655      eval path="$path"
21656      if test ! -f "$path" && test ! -d "$path"; then
21657        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21658      fi
21659
21660      JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21661    fi
21662  fi
21663
21664    if test ! -d "$JAVA_HOME_PROCESSED"; then
21665      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21666$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21667    else
21668      # Aha, the user has set a JAVA_HOME
21669      # let us use that as the Boot JDK.
21670      BOOT_JDK="$JAVA_HOME_PROCESSED"
21671      BOOT_JDK_FOUND=maybe
21672      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21673$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21674    fi
21675  fi
21676
21677
21678    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21679    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21680      # Do we have a bin/java?
21681      if test ! -x "$BOOT_JDK/bin/java"; then
21682        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21684        BOOT_JDK_FOUND=no
21685      else
21686        # Do we have a bin/javac?
21687        if test ! -x "$BOOT_JDK/bin/javac"; then
21688          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21689$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21690          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21691$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21692          BOOT_JDK_FOUND=no
21693        else
21694          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21695          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21696
21697          # Extra M4 quote needed to protect [] in grep expression.
21698          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21699          if test "x$FOUND_CORRECT_VERSION" = x; then
21700            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21701$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21702            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21703$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21704            BOOT_JDK_FOUND=no
21705          else
21706            # We're done! :-)
21707            BOOT_JDK_FOUND=yes
21708
21709  # Only process if variable expands to non-empty
21710
21711  if test "x$BOOT_JDK" != x; then
21712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21713
21714  # Input might be given as Windows format, start by converting to
21715  # unix format.
21716  path="$BOOT_JDK"
21717  new_path=`$CYGPATH -u "$path"`
21718
21719  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21720  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21721  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21722  # "foo.exe" is OK but "foo" is an error.
21723  #
21724  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21725  # It is also a way to make sure we got the proper file name for the real test later on.
21726  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21727  if test "x$test_shortpath" = x; then
21728    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21729$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21730    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21731  fi
21732
21733  # Call helper function which possibly converts this using DOS-style short mode.
21734  # If so, the updated path is stored in $new_path.
21735
21736  input_path="$new_path"
21737  # Check if we need to convert this using DOS-style short mode. If the path
21738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21739  # take no chances and rewrite it.
21740  # Note: m4 eats our [], so we need to use [ and ] instead.
21741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21742  if test "x$has_forbidden_chars" != x; then
21743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21747      # Going to short mode and back again did indeed matter. Since short mode is
21748      # case insensitive, let's make it lowercase to improve readability.
21749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21750      # Now convert it back to Unix-stile (cygpath)
21751      input_path=`$CYGPATH -u "$shortmode_path"`
21752      new_path="$input_path"
21753    fi
21754  fi
21755
21756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21757  if test "x$test_cygdrive_prefix" = x; then
21758    # As a simple fix, exclude /usr/bin since it's not a real path.
21759    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21761      # a path prefixed by /cygdrive for fixpath to work.
21762      new_path="$CYGWIN_ROOT_PATH$input_path"
21763    fi
21764  fi
21765
21766
21767  if test "x$path" != "x$new_path"; then
21768    BOOT_JDK="$new_path"
21769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21771  fi
21772
21773    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21774
21775  path="$BOOT_JDK"
21776  has_colon=`$ECHO $path | $GREP ^.:`
21777  new_path="$path"
21778  if test "x$has_colon" = x; then
21779    # Not in mixed or Windows style, start by that.
21780    new_path=`cmd //c echo $path`
21781  fi
21782
21783
21784  input_path="$new_path"
21785  # Check if we need to convert this using DOS-style short mode. If the path
21786  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21787  # take no chances and rewrite it.
21788  # Note: m4 eats our [], so we need to use [ and ] instead.
21789  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21790  if test "x$has_forbidden_chars" != x; then
21791    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21792    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21793  fi
21794
21795
21796  windows_path="$new_path"
21797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21798    unix_path=`$CYGPATH -u "$windows_path"`
21799    new_path="$unix_path"
21800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21802    new_path="$unix_path"
21803  fi
21804
21805  if test "x$path" != "x$new_path"; then
21806    BOOT_JDK="$new_path"
21807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21809  fi
21810
21811  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21812  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21813
21814    else
21815      # We're on a unix platform. Hooray! :)
21816      path="$BOOT_JDK"
21817      has_space=`$ECHO "$path" | $GREP " "`
21818      if test "x$has_space" != x; then
21819        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21820$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21821        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21822      fi
21823
21824      # Use eval to expand a potential ~
21825      eval path="$path"
21826      if test ! -f "$path" && test ! -d "$path"; then
21827        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21828      fi
21829
21830      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21831    fi
21832  fi
21833
21834            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21835$as_echo_n "checking for Boot JDK... " >&6; }
21836            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21837$as_echo "$BOOT_JDK" >&6; }
21838            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21839$as_echo_n "checking Boot JDK version... " >&6; }
21840            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21841            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21842$as_echo "$BOOT_JDK_VERSION" >&6; }
21843          fi # end check jdk version
21844        fi # end check javac
21845      fi # end check java
21846    fi # end check boot jdk found
21847  fi
21848
21849
21850  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21851
21852  if test "x$BOOT_JDK_FOUND" = xno; then
21853    # Now execute the test
21854
21855  # Extract the first word of "javac", so it can be a program name with args.
21856set dummy javac; ac_word=$2
21857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21858$as_echo_n "checking for $ac_word... " >&6; }
21859if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21860  $as_echo_n "(cached) " >&6
21861else
21862  case $JAVAC_CHECK in
21863  [\\/]* | ?:[\\/]*)
21864  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21865  ;;
21866  *)
21867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21868for as_dir in $PATH
21869do
21870  IFS=$as_save_IFS
21871  test -z "$as_dir" && as_dir=.
21872    for ac_exec_ext in '' $ac_executable_extensions; do
21873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21874    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21876    break 2
21877  fi
21878done
21879  done
21880IFS=$as_save_IFS
21881
21882  ;;
21883esac
21884fi
21885JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21886if test -n "$JAVAC_CHECK"; then
21887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21888$as_echo "$JAVAC_CHECK" >&6; }
21889else
21890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21891$as_echo "no" >&6; }
21892fi
21893
21894
21895  # Extract the first word of "java", so it can be a program name with args.
21896set dummy java; ac_word=$2
21897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21898$as_echo_n "checking for $ac_word... " >&6; }
21899if ${ac_cv_path_JAVA_CHECK+:} false; then :
21900  $as_echo_n "(cached) " >&6
21901else
21902  case $JAVA_CHECK in
21903  [\\/]* | ?:[\\/]*)
21904  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21905  ;;
21906  *)
21907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21908for as_dir in $PATH
21909do
21910  IFS=$as_save_IFS
21911  test -z "$as_dir" && as_dir=.
21912    for ac_exec_ext in '' $ac_executable_extensions; do
21913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21914    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21916    break 2
21917  fi
21918done
21919  done
21920IFS=$as_save_IFS
21921
21922  ;;
21923esac
21924fi
21925JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21926if test -n "$JAVA_CHECK"; then
21927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21928$as_echo "$JAVA_CHECK" >&6; }
21929else
21930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21931$as_echo "no" >&6; }
21932fi
21933
21934
21935  BINARY="$JAVAC_CHECK"
21936  if test "x$JAVAC_CHECK" = x; then
21937    BINARY="$JAVA_CHECK"
21938  fi
21939  if test "x$BINARY" != x; then
21940    # So there is a java(c) binary, it might be part of a JDK.
21941    # Lets find the JDK/JRE directory by following symbolic links.
21942    # Linux/GNU systems often have links from /usr/bin/java to
21943    # /etc/alternatives/java to the real JDK binary.
21944
21945  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21946    # Follow a chain of symbolic links. Use readlink
21947    # where it exists, else fall back to horribly
21948    # complicated shell code.
21949    if test "x$READLINK_TESTED" != yes; then
21950      # On MacOSX there is a readlink tool with a different
21951      # purpose than the GNU readlink tool. Check the found readlink.
21952      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21953      if test "x$ISGNU" = x; then
21954        # A readlink that we do not know how to use.
21955        # Are there other non-GNU readlinks out there?
21956        READLINK_TESTED=yes
21957        READLINK=
21958      fi
21959    fi
21960
21961    if test "x$READLINK" != x; then
21962      BINARY=`$READLINK -f $BINARY`
21963    else
21964      # Save the current directory for restoring afterwards
21965      STARTDIR=$PWD
21966      COUNTER=0
21967      sym_link_dir=`$DIRNAME $BINARY`
21968      sym_link_file=`$BASENAME $BINARY`
21969      cd $sym_link_dir
21970      # Use -P flag to resolve symlinks in directories.
21971      cd `$THEPWDCMD -P`
21972      sym_link_dir=`$THEPWDCMD -P`
21973      # Resolve file symlinks
21974      while test $COUNTER -lt 20; do
21975        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21976        if test "x$ISLINK" == x; then
21977          # This is not a symbolic link! We are done!
21978          break
21979        fi
21980        # Again resolve directory symlinks since the target of the just found
21981        # link could be in a different directory
21982        cd `$DIRNAME $ISLINK`
21983        sym_link_dir=`$THEPWDCMD -P`
21984        sym_link_file=`$BASENAME $ISLINK`
21985        let COUNTER=COUNTER+1
21986      done
21987      cd $STARTDIR
21988      BINARY=$sym_link_dir/$sym_link_file
21989    fi
21990  fi
21991
21992    BOOT_JDK=`dirname "$BINARY"`
21993    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21994    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21995      # Looks like we found ourselves an JDK
21996      BOOT_JDK_FOUND=maybe
21997      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21998$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21999    fi
22000  fi
22001
22002
22003    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22004    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22005      # Do we have a bin/java?
22006      if test ! -x "$BOOT_JDK/bin/java"; then
22007        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22009        BOOT_JDK_FOUND=no
22010      else
22011        # Do we have a bin/javac?
22012        if test ! -x "$BOOT_JDK/bin/javac"; then
22013          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22014$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22015          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22016$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22017          BOOT_JDK_FOUND=no
22018        else
22019          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22020          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22021
22022          # Extra M4 quote needed to protect [] in grep expression.
22023          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22024          if test "x$FOUND_CORRECT_VERSION" = x; then
22025            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22026$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22027            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22028$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22029            BOOT_JDK_FOUND=no
22030          else
22031            # We're done! :-)
22032            BOOT_JDK_FOUND=yes
22033
22034  # Only process if variable expands to non-empty
22035
22036  if test "x$BOOT_JDK" != x; then
22037    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22038
22039  # Input might be given as Windows format, start by converting to
22040  # unix format.
22041  path="$BOOT_JDK"
22042  new_path=`$CYGPATH -u "$path"`
22043
22044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22047  # "foo.exe" is OK but "foo" is an error.
22048  #
22049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22050  # It is also a way to make sure we got the proper file name for the real test later on.
22051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22052  if test "x$test_shortpath" = x; then
22053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22055    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22056  fi
22057
22058  # Call helper function which possibly converts this using DOS-style short mode.
22059  # If so, the updated path is stored in $new_path.
22060
22061  input_path="$new_path"
22062  # Check if we need to convert this using DOS-style short mode. If the path
22063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22064  # take no chances and rewrite it.
22065  # Note: m4 eats our [], so we need to use [ and ] instead.
22066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22067  if test "x$has_forbidden_chars" != x; then
22068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22072      # Going to short mode and back again did indeed matter. Since short mode is
22073      # case insensitive, let's make it lowercase to improve readability.
22074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22075      # Now convert it back to Unix-stile (cygpath)
22076      input_path=`$CYGPATH -u "$shortmode_path"`
22077      new_path="$input_path"
22078    fi
22079  fi
22080
22081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22082  if test "x$test_cygdrive_prefix" = x; then
22083    # As a simple fix, exclude /usr/bin since it's not a real path.
22084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22086      # a path prefixed by /cygdrive for fixpath to work.
22087      new_path="$CYGWIN_ROOT_PATH$input_path"
22088    fi
22089  fi
22090
22091
22092  if test "x$path" != "x$new_path"; then
22093    BOOT_JDK="$new_path"
22094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22096  fi
22097
22098    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22099
22100  path="$BOOT_JDK"
22101  has_colon=`$ECHO $path | $GREP ^.:`
22102  new_path="$path"
22103  if test "x$has_colon" = x; then
22104    # Not in mixed or Windows style, start by that.
22105    new_path=`cmd //c echo $path`
22106  fi
22107
22108
22109  input_path="$new_path"
22110  # Check if we need to convert this using DOS-style short mode. If the path
22111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22112  # take no chances and rewrite it.
22113  # Note: m4 eats our [], so we need to use [ and ] instead.
22114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22115  if test "x$has_forbidden_chars" != x; then
22116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22118  fi
22119
22120
22121  windows_path="$new_path"
22122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22123    unix_path=`$CYGPATH -u "$windows_path"`
22124    new_path="$unix_path"
22125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22127    new_path="$unix_path"
22128  fi
22129
22130  if test "x$path" != "x$new_path"; then
22131    BOOT_JDK="$new_path"
22132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22134  fi
22135
22136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22138
22139    else
22140      # We're on a unix platform. Hooray! :)
22141      path="$BOOT_JDK"
22142      has_space=`$ECHO "$path" | $GREP " "`
22143      if test "x$has_space" != x; then
22144        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22146        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22147      fi
22148
22149      # Use eval to expand a potential ~
22150      eval path="$path"
22151      if test ! -f "$path" && test ! -d "$path"; then
22152        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22153      fi
22154
22155      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22156    fi
22157  fi
22158
22159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22160$as_echo_n "checking for Boot JDK... " >&6; }
22161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22162$as_echo "$BOOT_JDK" >&6; }
22163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22164$as_echo_n "checking Boot JDK version... " >&6; }
22165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22167$as_echo "$BOOT_JDK_VERSION" >&6; }
22168          fi # end check jdk version
22169        fi # end check javac
22170      fi # end check java
22171    fi # end check boot jdk found
22172  fi
22173
22174
22175  # Test: Is there a JDK installed in default, well-known locations?
22176
22177  if test "x$BOOT_JDK_FOUND" = xno; then
22178    # Now execute the test
22179
22180  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22181
22182  if test "x$BOOT_JDK_FOUND" = xno; then
22183    # Now execute the test
22184
22185  if test "x$ProgramW6432" != x; then
22186    VIRTUAL_DIR="$ProgramW6432/Java"
22187
22188  windows_path="$VIRTUAL_DIR"
22189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22190    unix_path=`$CYGPATH -u "$windows_path"`
22191    VIRTUAL_DIR="$unix_path"
22192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22194    VIRTUAL_DIR="$unix_path"
22195  fi
22196
22197
22198  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22199  BOOT_JDK_SUFFIX=""
22200  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22201  if test "x$ALL_JDKS_FOUND" != x; then
22202    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22203
22204  if test "x$BOOT_JDK_FOUND" = xno; then
22205    # Now execute the test
22206
22207        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22208        if test -d "$BOOT_JDK"; then
22209          BOOT_JDK_FOUND=maybe
22210          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22211$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22212        fi
22213
22214
22215    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22216    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22217      # Do we have a bin/java?
22218      if test ! -x "$BOOT_JDK/bin/java"; then
22219        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22220$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22221        BOOT_JDK_FOUND=no
22222      else
22223        # Do we have a bin/javac?
22224        if test ! -x "$BOOT_JDK/bin/javac"; then
22225          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22227          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22228$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22229          BOOT_JDK_FOUND=no
22230        else
22231          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22232          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22233
22234          # Extra M4 quote needed to protect [] in grep expression.
22235          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22236          if test "x$FOUND_CORRECT_VERSION" = x; then
22237            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22238$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22239            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22240$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22241            BOOT_JDK_FOUND=no
22242          else
22243            # We're done! :-)
22244            BOOT_JDK_FOUND=yes
22245
22246  # Only process if variable expands to non-empty
22247
22248  if test "x$BOOT_JDK" != x; then
22249    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22250
22251  # Input might be given as Windows format, start by converting to
22252  # unix format.
22253  path="$BOOT_JDK"
22254  new_path=`$CYGPATH -u "$path"`
22255
22256  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22257  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22258  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22259  # "foo.exe" is OK but "foo" is an error.
22260  #
22261  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22262  # It is also a way to make sure we got the proper file name for the real test later on.
22263  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22264  if test "x$test_shortpath" = x; then
22265    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22266$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22267    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22268  fi
22269
22270  # Call helper function which possibly converts this using DOS-style short mode.
22271  # If so, the updated path is stored in $new_path.
22272
22273  input_path="$new_path"
22274  # Check if we need to convert this using DOS-style short mode. If the path
22275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22276  # take no chances and rewrite it.
22277  # Note: m4 eats our [], so we need to use [ and ] instead.
22278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22279  if test "x$has_forbidden_chars" != x; then
22280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22281    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22282    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22283    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22284      # Going to short mode and back again did indeed matter. Since short mode is
22285      # case insensitive, let's make it lowercase to improve readability.
22286      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22287      # Now convert it back to Unix-stile (cygpath)
22288      input_path=`$CYGPATH -u "$shortmode_path"`
22289      new_path="$input_path"
22290    fi
22291  fi
22292
22293  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22294  if test "x$test_cygdrive_prefix" = x; then
22295    # As a simple fix, exclude /usr/bin since it's not a real path.
22296    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22297      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22298      # a path prefixed by /cygdrive for fixpath to work.
22299      new_path="$CYGWIN_ROOT_PATH$input_path"
22300    fi
22301  fi
22302
22303
22304  if test "x$path" != "x$new_path"; then
22305    BOOT_JDK="$new_path"
22306    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22307$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22308  fi
22309
22310    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22311
22312  path="$BOOT_JDK"
22313  has_colon=`$ECHO $path | $GREP ^.:`
22314  new_path="$path"
22315  if test "x$has_colon" = x; then
22316    # Not in mixed or Windows style, start by that.
22317    new_path=`cmd //c echo $path`
22318  fi
22319
22320
22321  input_path="$new_path"
22322  # Check if we need to convert this using DOS-style short mode. If the path
22323  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22324  # take no chances and rewrite it.
22325  # Note: m4 eats our [], so we need to use [ and ] instead.
22326  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22327  if test "x$has_forbidden_chars" != x; then
22328    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22329    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22330  fi
22331
22332
22333  windows_path="$new_path"
22334  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22335    unix_path=`$CYGPATH -u "$windows_path"`
22336    new_path="$unix_path"
22337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22338    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22339    new_path="$unix_path"
22340  fi
22341
22342  if test "x$path" != "x$new_path"; then
22343    BOOT_JDK="$new_path"
22344    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22345$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22346  fi
22347
22348  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22349  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22350
22351    else
22352      # We're on a unix platform. Hooray! :)
22353      path="$BOOT_JDK"
22354      has_space=`$ECHO "$path" | $GREP " "`
22355      if test "x$has_space" != x; then
22356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22357$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22358        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22359      fi
22360
22361      # Use eval to expand a potential ~
22362      eval path="$path"
22363      if test ! -f "$path" && test ! -d "$path"; then
22364        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22365      fi
22366
22367      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22368    fi
22369  fi
22370
22371            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22372$as_echo_n "checking for Boot JDK... " >&6; }
22373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22374$as_echo "$BOOT_JDK" >&6; }
22375            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22376$as_echo_n "checking Boot JDK version... " >&6; }
22377            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22378            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22379$as_echo "$BOOT_JDK_VERSION" >&6; }
22380          fi # end check jdk version
22381        fi # end check javac
22382      fi # end check java
22383    fi # end check boot jdk found
22384  fi
22385
22386    done
22387  fi
22388
22389  fi
22390
22391
22392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22394      # Do we have a bin/java?
22395      if test ! -x "$BOOT_JDK/bin/java"; then
22396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22398        BOOT_JDK_FOUND=no
22399      else
22400        # Do we have a bin/javac?
22401        if test ! -x "$BOOT_JDK/bin/javac"; then
22402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22406          BOOT_JDK_FOUND=no
22407        else
22408          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22409          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22410
22411          # Extra M4 quote needed to protect [] in grep expression.
22412          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22413          if test "x$FOUND_CORRECT_VERSION" = x; then
22414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22416            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22418            BOOT_JDK_FOUND=no
22419          else
22420            # We're done! :-)
22421            BOOT_JDK_FOUND=yes
22422
22423  # Only process if variable expands to non-empty
22424
22425  if test "x$BOOT_JDK" != x; then
22426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22427
22428  # Input might be given as Windows format, start by converting to
22429  # unix format.
22430  path="$BOOT_JDK"
22431  new_path=`$CYGPATH -u "$path"`
22432
22433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22436  # "foo.exe" is OK but "foo" is an error.
22437  #
22438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22439  # It is also a way to make sure we got the proper file name for the real test later on.
22440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22441  if test "x$test_shortpath" = x; then
22442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22445  fi
22446
22447  # Call helper function which possibly converts this using DOS-style short mode.
22448  # If so, the updated path is stored in $new_path.
22449
22450  input_path="$new_path"
22451  # Check if we need to convert this using DOS-style short mode. If the path
22452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22453  # take no chances and rewrite it.
22454  # Note: m4 eats our [], so we need to use [ and ] instead.
22455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22456  if test "x$has_forbidden_chars" != x; then
22457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22461      # Going to short mode and back again did indeed matter. Since short mode is
22462      # case insensitive, let's make it lowercase to improve readability.
22463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22464      # Now convert it back to Unix-stile (cygpath)
22465      input_path=`$CYGPATH -u "$shortmode_path"`
22466      new_path="$input_path"
22467    fi
22468  fi
22469
22470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22471  if test "x$test_cygdrive_prefix" = x; then
22472    # As a simple fix, exclude /usr/bin since it's not a real path.
22473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22475      # a path prefixed by /cygdrive for fixpath to work.
22476      new_path="$CYGWIN_ROOT_PATH$input_path"
22477    fi
22478  fi
22479
22480
22481  if test "x$path" != "x$new_path"; then
22482    BOOT_JDK="$new_path"
22483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22485  fi
22486
22487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22488
22489  path="$BOOT_JDK"
22490  has_colon=`$ECHO $path | $GREP ^.:`
22491  new_path="$path"
22492  if test "x$has_colon" = x; then
22493    # Not in mixed or Windows style, start by that.
22494    new_path=`cmd //c echo $path`
22495  fi
22496
22497
22498  input_path="$new_path"
22499  # Check if we need to convert this using DOS-style short mode. If the path
22500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22501  # take no chances and rewrite it.
22502  # Note: m4 eats our [], so we need to use [ and ] instead.
22503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22504  if test "x$has_forbidden_chars" != x; then
22505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22507  fi
22508
22509
22510  windows_path="$new_path"
22511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22512    unix_path=`$CYGPATH -u "$windows_path"`
22513    new_path="$unix_path"
22514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22516    new_path="$unix_path"
22517  fi
22518
22519  if test "x$path" != "x$new_path"; then
22520    BOOT_JDK="$new_path"
22521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22523  fi
22524
22525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22527
22528    else
22529      # We're on a unix platform. Hooray! :)
22530      path="$BOOT_JDK"
22531      has_space=`$ECHO "$path" | $GREP " "`
22532      if test "x$has_space" != x; then
22533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22536      fi
22537
22538      # Use eval to expand a potential ~
22539      eval path="$path"
22540      if test ! -f "$path" && test ! -d "$path"; then
22541        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22542      fi
22543
22544      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22545    fi
22546  fi
22547
22548            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22549$as_echo_n "checking for Boot JDK... " >&6; }
22550            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22551$as_echo "$BOOT_JDK" >&6; }
22552            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22553$as_echo_n "checking Boot JDK version... " >&6; }
22554            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22555            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22556$as_echo "$BOOT_JDK_VERSION" >&6; }
22557          fi # end check jdk version
22558        fi # end check javac
22559      fi # end check java
22560    fi # end check boot jdk found
22561  fi
22562
22563
22564  if test "x$BOOT_JDK_FOUND" = xno; then
22565    # Now execute the test
22566
22567  if test "x$PROGRAMW6432" != x; then
22568    VIRTUAL_DIR="$PROGRAMW6432/Java"
22569
22570  windows_path="$VIRTUAL_DIR"
22571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22572    unix_path=`$CYGPATH -u "$windows_path"`
22573    VIRTUAL_DIR="$unix_path"
22574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22576    VIRTUAL_DIR="$unix_path"
22577  fi
22578
22579
22580  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22581  BOOT_JDK_SUFFIX=""
22582  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22583  if test "x$ALL_JDKS_FOUND" != x; then
22584    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22585
22586  if test "x$BOOT_JDK_FOUND" = xno; then
22587    # Now execute the test
22588
22589        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22590        if test -d "$BOOT_JDK"; then
22591          BOOT_JDK_FOUND=maybe
22592          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22593$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22594        fi
22595
22596
22597    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22598    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22599      # Do we have a bin/java?
22600      if test ! -x "$BOOT_JDK/bin/java"; then
22601        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22603        BOOT_JDK_FOUND=no
22604      else
22605        # Do we have a bin/javac?
22606        if test ! -x "$BOOT_JDK/bin/javac"; then
22607          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22608$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22609          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22610$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22611          BOOT_JDK_FOUND=no
22612        else
22613          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22614          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22615
22616          # Extra M4 quote needed to protect [] in grep expression.
22617          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22618          if test "x$FOUND_CORRECT_VERSION" = x; then
22619            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22620$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22621            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22622$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22623            BOOT_JDK_FOUND=no
22624          else
22625            # We're done! :-)
22626            BOOT_JDK_FOUND=yes
22627
22628  # Only process if variable expands to non-empty
22629
22630  if test "x$BOOT_JDK" != x; then
22631    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22632
22633  # Input might be given as Windows format, start by converting to
22634  # unix format.
22635  path="$BOOT_JDK"
22636  new_path=`$CYGPATH -u "$path"`
22637
22638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22641  # "foo.exe" is OK but "foo" is an error.
22642  #
22643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22644  # It is also a way to make sure we got the proper file name for the real test later on.
22645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22646  if test "x$test_shortpath" = x; then
22647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22648$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22649    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22650  fi
22651
22652  # Call helper function which possibly converts this using DOS-style short mode.
22653  # If so, the updated path is stored in $new_path.
22654
22655  input_path="$new_path"
22656  # Check if we need to convert this using DOS-style short mode. If the path
22657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22658  # take no chances and rewrite it.
22659  # Note: m4 eats our [], so we need to use [ and ] instead.
22660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22661  if test "x$has_forbidden_chars" != x; then
22662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22666      # Going to short mode and back again did indeed matter. Since short mode is
22667      # case insensitive, let's make it lowercase to improve readability.
22668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22669      # Now convert it back to Unix-stile (cygpath)
22670      input_path=`$CYGPATH -u "$shortmode_path"`
22671      new_path="$input_path"
22672    fi
22673  fi
22674
22675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22676  if test "x$test_cygdrive_prefix" = x; then
22677    # As a simple fix, exclude /usr/bin since it's not a real path.
22678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22680      # a path prefixed by /cygdrive for fixpath to work.
22681      new_path="$CYGWIN_ROOT_PATH$input_path"
22682    fi
22683  fi
22684
22685
22686  if test "x$path" != "x$new_path"; then
22687    BOOT_JDK="$new_path"
22688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22689$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22690  fi
22691
22692    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22693
22694  path="$BOOT_JDK"
22695  has_colon=`$ECHO $path | $GREP ^.:`
22696  new_path="$path"
22697  if test "x$has_colon" = x; then
22698    # Not in mixed or Windows style, start by that.
22699    new_path=`cmd //c echo $path`
22700  fi
22701
22702
22703  input_path="$new_path"
22704  # Check if we need to convert this using DOS-style short mode. If the path
22705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22706  # take no chances and rewrite it.
22707  # Note: m4 eats our [], so we need to use [ and ] instead.
22708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22709  if test "x$has_forbidden_chars" != x; then
22710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22712  fi
22713
22714
22715  windows_path="$new_path"
22716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22717    unix_path=`$CYGPATH -u "$windows_path"`
22718    new_path="$unix_path"
22719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22721    new_path="$unix_path"
22722  fi
22723
22724  if test "x$path" != "x$new_path"; then
22725    BOOT_JDK="$new_path"
22726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22727$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22728  fi
22729
22730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22732
22733    else
22734      # We're on a unix platform. Hooray! :)
22735      path="$BOOT_JDK"
22736      has_space=`$ECHO "$path" | $GREP " "`
22737      if test "x$has_space" != x; then
22738        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22739$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22740        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22741      fi
22742
22743      # Use eval to expand a potential ~
22744      eval path="$path"
22745      if test ! -f "$path" && test ! -d "$path"; then
22746        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22747      fi
22748
22749      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22750    fi
22751  fi
22752
22753            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22754$as_echo_n "checking for Boot JDK... " >&6; }
22755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22756$as_echo "$BOOT_JDK" >&6; }
22757            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22758$as_echo_n "checking Boot JDK version... " >&6; }
22759            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22760            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22761$as_echo "$BOOT_JDK_VERSION" >&6; }
22762          fi # end check jdk version
22763        fi # end check javac
22764      fi # end check java
22765    fi # end check boot jdk found
22766  fi
22767
22768    done
22769  fi
22770
22771  fi
22772
22773
22774    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22775    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22776      # Do we have a bin/java?
22777      if test ! -x "$BOOT_JDK/bin/java"; then
22778        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22780        BOOT_JDK_FOUND=no
22781      else
22782        # Do we have a bin/javac?
22783        if test ! -x "$BOOT_JDK/bin/javac"; then
22784          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22785$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22786          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22787$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22788          BOOT_JDK_FOUND=no
22789        else
22790          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22791          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22792
22793          # Extra M4 quote needed to protect [] in grep expression.
22794          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22795          if test "x$FOUND_CORRECT_VERSION" = x; then
22796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22798            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22799$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22800            BOOT_JDK_FOUND=no
22801          else
22802            # We're done! :-)
22803            BOOT_JDK_FOUND=yes
22804
22805  # Only process if variable expands to non-empty
22806
22807  if test "x$BOOT_JDK" != x; then
22808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22809
22810  # Input might be given as Windows format, start by converting to
22811  # unix format.
22812  path="$BOOT_JDK"
22813  new_path=`$CYGPATH -u "$path"`
22814
22815  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22816  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22817  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22818  # "foo.exe" is OK but "foo" is an error.
22819  #
22820  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22821  # It is also a way to make sure we got the proper file name for the real test later on.
22822  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22823  if test "x$test_shortpath" = x; then
22824    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22825$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22826    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22827  fi
22828
22829  # Call helper function which possibly converts this using DOS-style short mode.
22830  # If so, the updated path is stored in $new_path.
22831
22832  input_path="$new_path"
22833  # Check if we need to convert this using DOS-style short mode. If the path
22834  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22835  # take no chances and rewrite it.
22836  # Note: m4 eats our [], so we need to use [ and ] instead.
22837  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22838  if test "x$has_forbidden_chars" != x; then
22839    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22840    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22841    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22842    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22843      # Going to short mode and back again did indeed matter. Since short mode is
22844      # case insensitive, let's make it lowercase to improve readability.
22845      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22846      # Now convert it back to Unix-stile (cygpath)
22847      input_path=`$CYGPATH -u "$shortmode_path"`
22848      new_path="$input_path"
22849    fi
22850  fi
22851
22852  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22853  if test "x$test_cygdrive_prefix" = x; then
22854    # As a simple fix, exclude /usr/bin since it's not a real path.
22855    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22856      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22857      # a path prefixed by /cygdrive for fixpath to work.
22858      new_path="$CYGWIN_ROOT_PATH$input_path"
22859    fi
22860  fi
22861
22862
22863  if test "x$path" != "x$new_path"; then
22864    BOOT_JDK="$new_path"
22865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22866$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22867  fi
22868
22869    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22870
22871  path="$BOOT_JDK"
22872  has_colon=`$ECHO $path | $GREP ^.:`
22873  new_path="$path"
22874  if test "x$has_colon" = x; then
22875    # Not in mixed or Windows style, start by that.
22876    new_path=`cmd //c echo $path`
22877  fi
22878
22879
22880  input_path="$new_path"
22881  # Check if we need to convert this using DOS-style short mode. If the path
22882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22883  # take no chances and rewrite it.
22884  # Note: m4 eats our [], so we need to use [ and ] instead.
22885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22886  if test "x$has_forbidden_chars" != x; then
22887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22888    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22889  fi
22890
22891
22892  windows_path="$new_path"
22893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22894    unix_path=`$CYGPATH -u "$windows_path"`
22895    new_path="$unix_path"
22896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22897    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22898    new_path="$unix_path"
22899  fi
22900
22901  if test "x$path" != "x$new_path"; then
22902    BOOT_JDK="$new_path"
22903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22904$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22905  fi
22906
22907  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22908  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22909
22910    else
22911      # We're on a unix platform. Hooray! :)
22912      path="$BOOT_JDK"
22913      has_space=`$ECHO "$path" | $GREP " "`
22914      if test "x$has_space" != x; then
22915        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22916$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22917        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22918      fi
22919
22920      # Use eval to expand a potential ~
22921      eval path="$path"
22922      if test ! -f "$path" && test ! -d "$path"; then
22923        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22924      fi
22925
22926      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22927    fi
22928  fi
22929
22930            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22931$as_echo_n "checking for Boot JDK... " >&6; }
22932            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22933$as_echo "$BOOT_JDK" >&6; }
22934            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22935$as_echo_n "checking Boot JDK version... " >&6; }
22936            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22937            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22938$as_echo "$BOOT_JDK_VERSION" >&6; }
22939          fi # end check jdk version
22940        fi # end check javac
22941      fi # end check java
22942    fi # end check boot jdk found
22943  fi
22944
22945
22946  if test "x$BOOT_JDK_FOUND" = xno; then
22947    # Now execute the test
22948
22949  if test "x$PROGRAMFILES" != x; then
22950    VIRTUAL_DIR="$PROGRAMFILES/Java"
22951
22952  windows_path="$VIRTUAL_DIR"
22953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22954    unix_path=`$CYGPATH -u "$windows_path"`
22955    VIRTUAL_DIR="$unix_path"
22956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22958    VIRTUAL_DIR="$unix_path"
22959  fi
22960
22961
22962  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22963  BOOT_JDK_SUFFIX=""
22964  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22965  if test "x$ALL_JDKS_FOUND" != x; then
22966    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22967
22968  if test "x$BOOT_JDK_FOUND" = xno; then
22969    # Now execute the test
22970
22971        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22972        if test -d "$BOOT_JDK"; then
22973          BOOT_JDK_FOUND=maybe
22974          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22975$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22976        fi
22977
22978
22979    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22980    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22981      # Do we have a bin/java?
22982      if test ! -x "$BOOT_JDK/bin/java"; then
22983        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22985        BOOT_JDK_FOUND=no
22986      else
22987        # Do we have a bin/javac?
22988        if test ! -x "$BOOT_JDK/bin/javac"; then
22989          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22990$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22991          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22992$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22993          BOOT_JDK_FOUND=no
22994        else
22995          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22996          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22997
22998          # Extra M4 quote needed to protect [] in grep expression.
22999          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23000          if test "x$FOUND_CORRECT_VERSION" = x; then
23001            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23003            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23004$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23005            BOOT_JDK_FOUND=no
23006          else
23007            # We're done! :-)
23008            BOOT_JDK_FOUND=yes
23009
23010  # Only process if variable expands to non-empty
23011
23012  if test "x$BOOT_JDK" != x; then
23013    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23014
23015  # Input might be given as Windows format, start by converting to
23016  # unix format.
23017  path="$BOOT_JDK"
23018  new_path=`$CYGPATH -u "$path"`
23019
23020  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23021  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23022  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23023  # "foo.exe" is OK but "foo" is an error.
23024  #
23025  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23026  # It is also a way to make sure we got the proper file name for the real test later on.
23027  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23028  if test "x$test_shortpath" = x; then
23029    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23030$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23031    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23032  fi
23033
23034  # Call helper function which possibly converts this using DOS-style short mode.
23035  # If so, the updated path is stored in $new_path.
23036
23037  input_path="$new_path"
23038  # Check if we need to convert this using DOS-style short mode. If the path
23039  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23040  # take no chances and rewrite it.
23041  # Note: m4 eats our [], so we need to use [ and ] instead.
23042  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23043  if test "x$has_forbidden_chars" != x; then
23044    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23045    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23046    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23047    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23048      # Going to short mode and back again did indeed matter. Since short mode is
23049      # case insensitive, let's make it lowercase to improve readability.
23050      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23051      # Now convert it back to Unix-stile (cygpath)
23052      input_path=`$CYGPATH -u "$shortmode_path"`
23053      new_path="$input_path"
23054    fi
23055  fi
23056
23057  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23058  if test "x$test_cygdrive_prefix" = x; then
23059    # As a simple fix, exclude /usr/bin since it's not a real path.
23060    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23061      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23062      # a path prefixed by /cygdrive for fixpath to work.
23063      new_path="$CYGWIN_ROOT_PATH$input_path"
23064    fi
23065  fi
23066
23067
23068  if test "x$path" != "x$new_path"; then
23069    BOOT_JDK="$new_path"
23070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23072  fi
23073
23074    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23075
23076  path="$BOOT_JDK"
23077  has_colon=`$ECHO $path | $GREP ^.:`
23078  new_path="$path"
23079  if test "x$has_colon" = x; then
23080    # Not in mixed or Windows style, start by that.
23081    new_path=`cmd //c echo $path`
23082  fi
23083
23084
23085  input_path="$new_path"
23086  # Check if we need to convert this using DOS-style short mode. If the path
23087  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23088  # take no chances and rewrite it.
23089  # Note: m4 eats our [], so we need to use [ and ] instead.
23090  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23091  if test "x$has_forbidden_chars" != x; then
23092    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23093    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23094  fi
23095
23096
23097  windows_path="$new_path"
23098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23099    unix_path=`$CYGPATH -u "$windows_path"`
23100    new_path="$unix_path"
23101  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23102    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23103    new_path="$unix_path"
23104  fi
23105
23106  if test "x$path" != "x$new_path"; then
23107    BOOT_JDK="$new_path"
23108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23109$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23110  fi
23111
23112  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23113  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23114
23115    else
23116      # We're on a unix platform. Hooray! :)
23117      path="$BOOT_JDK"
23118      has_space=`$ECHO "$path" | $GREP " "`
23119      if test "x$has_space" != x; then
23120        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23121$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23122        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23123      fi
23124
23125      # Use eval to expand a potential ~
23126      eval path="$path"
23127      if test ! -f "$path" && test ! -d "$path"; then
23128        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23129      fi
23130
23131      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23132    fi
23133  fi
23134
23135            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23136$as_echo_n "checking for Boot JDK... " >&6; }
23137            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23138$as_echo "$BOOT_JDK" >&6; }
23139            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23140$as_echo_n "checking Boot JDK version... " >&6; }
23141            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23142            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23143$as_echo "$BOOT_JDK_VERSION" >&6; }
23144          fi # end check jdk version
23145        fi # end check javac
23146      fi # end check java
23147    fi # end check boot jdk found
23148  fi
23149
23150    done
23151  fi
23152
23153  fi
23154
23155
23156    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23157    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23158      # Do we have a bin/java?
23159      if test ! -x "$BOOT_JDK/bin/java"; then
23160        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23162        BOOT_JDK_FOUND=no
23163      else
23164        # Do we have a bin/javac?
23165        if test ! -x "$BOOT_JDK/bin/javac"; then
23166          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23168          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23169$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23170          BOOT_JDK_FOUND=no
23171        else
23172          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23173          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23174
23175          # Extra M4 quote needed to protect [] in grep expression.
23176          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23177          if test "x$FOUND_CORRECT_VERSION" = x; then
23178            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23179$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23180            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23181$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23182            BOOT_JDK_FOUND=no
23183          else
23184            # We're done! :-)
23185            BOOT_JDK_FOUND=yes
23186
23187  # Only process if variable expands to non-empty
23188
23189  if test "x$BOOT_JDK" != x; then
23190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23191
23192  # Input might be given as Windows format, start by converting to
23193  # unix format.
23194  path="$BOOT_JDK"
23195  new_path=`$CYGPATH -u "$path"`
23196
23197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23200  # "foo.exe" is OK but "foo" is an error.
23201  #
23202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23203  # It is also a way to make sure we got the proper file name for the real test later on.
23204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23205  if test "x$test_shortpath" = x; then
23206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23207$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23208    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23209  fi
23210
23211  # Call helper function which possibly converts this using DOS-style short mode.
23212  # If so, the updated path is stored in $new_path.
23213
23214  input_path="$new_path"
23215  # Check if we need to convert this using DOS-style short mode. If the path
23216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23217  # take no chances and rewrite it.
23218  # Note: m4 eats our [], so we need to use [ and ] instead.
23219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23220  if test "x$has_forbidden_chars" != x; then
23221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23225      # Going to short mode and back again did indeed matter. Since short mode is
23226      # case insensitive, let's make it lowercase to improve readability.
23227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23228      # Now convert it back to Unix-stile (cygpath)
23229      input_path=`$CYGPATH -u "$shortmode_path"`
23230      new_path="$input_path"
23231    fi
23232  fi
23233
23234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23235  if test "x$test_cygdrive_prefix" = x; then
23236    # As a simple fix, exclude /usr/bin since it's not a real path.
23237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23239      # a path prefixed by /cygdrive for fixpath to work.
23240      new_path="$CYGWIN_ROOT_PATH$input_path"
23241    fi
23242  fi
23243
23244
23245  if test "x$path" != "x$new_path"; then
23246    BOOT_JDK="$new_path"
23247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23248$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23249  fi
23250
23251    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23252
23253  path="$BOOT_JDK"
23254  has_colon=`$ECHO $path | $GREP ^.:`
23255  new_path="$path"
23256  if test "x$has_colon" = x; then
23257    # Not in mixed or Windows style, start by that.
23258    new_path=`cmd //c echo $path`
23259  fi
23260
23261
23262  input_path="$new_path"
23263  # Check if we need to convert this using DOS-style short mode. If the path
23264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23265  # take no chances and rewrite it.
23266  # Note: m4 eats our [], so we need to use [ and ] instead.
23267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23268  if test "x$has_forbidden_chars" != x; then
23269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23271  fi
23272
23273
23274  windows_path="$new_path"
23275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23276    unix_path=`$CYGPATH -u "$windows_path"`
23277    new_path="$unix_path"
23278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23280    new_path="$unix_path"
23281  fi
23282
23283  if test "x$path" != "x$new_path"; then
23284    BOOT_JDK="$new_path"
23285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23286$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23287  fi
23288
23289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23291
23292    else
23293      # We're on a unix platform. Hooray! :)
23294      path="$BOOT_JDK"
23295      has_space=`$ECHO "$path" | $GREP " "`
23296      if test "x$has_space" != x; then
23297        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23298$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23299        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23300      fi
23301
23302      # Use eval to expand a potential ~
23303      eval path="$path"
23304      if test ! -f "$path" && test ! -d "$path"; then
23305        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23306      fi
23307
23308      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23309    fi
23310  fi
23311
23312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23313$as_echo_n "checking for Boot JDK... " >&6; }
23314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23315$as_echo "$BOOT_JDK" >&6; }
23316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23317$as_echo_n "checking Boot JDK version... " >&6; }
23318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23320$as_echo "$BOOT_JDK_VERSION" >&6; }
23321          fi # end check jdk version
23322        fi # end check javac
23323      fi # end check java
23324    fi # end check boot jdk found
23325  fi
23326
23327
23328  if test "x$BOOT_JDK_FOUND" = xno; then
23329    # Now execute the test
23330
23331  if test "x$ProgramFiles" != x; then
23332    VIRTUAL_DIR="$ProgramFiles/Java"
23333
23334  windows_path="$VIRTUAL_DIR"
23335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23336    unix_path=`$CYGPATH -u "$windows_path"`
23337    VIRTUAL_DIR="$unix_path"
23338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23340    VIRTUAL_DIR="$unix_path"
23341  fi
23342
23343
23344  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23345  BOOT_JDK_SUFFIX=""
23346  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23347  if test "x$ALL_JDKS_FOUND" != x; then
23348    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23349
23350  if test "x$BOOT_JDK_FOUND" = xno; then
23351    # Now execute the test
23352
23353        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23354        if test -d "$BOOT_JDK"; then
23355          BOOT_JDK_FOUND=maybe
23356          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23357$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23358        fi
23359
23360
23361    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23362    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23363      # Do we have a bin/java?
23364      if test ! -x "$BOOT_JDK/bin/java"; then
23365        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23367        BOOT_JDK_FOUND=no
23368      else
23369        # Do we have a bin/javac?
23370        if test ! -x "$BOOT_JDK/bin/javac"; then
23371          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23372$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23373          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23374$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23375          BOOT_JDK_FOUND=no
23376        else
23377          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23378          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23379
23380          # Extra M4 quote needed to protect [] in grep expression.
23381          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23382          if test "x$FOUND_CORRECT_VERSION" = x; then
23383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23385            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23386$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23387            BOOT_JDK_FOUND=no
23388          else
23389            # We're done! :-)
23390            BOOT_JDK_FOUND=yes
23391
23392  # Only process if variable expands to non-empty
23393
23394  if test "x$BOOT_JDK" != x; then
23395    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23396
23397  # Input might be given as Windows format, start by converting to
23398  # unix format.
23399  path="$BOOT_JDK"
23400  new_path=`$CYGPATH -u "$path"`
23401
23402  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23403  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23404  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23405  # "foo.exe" is OK but "foo" is an error.
23406  #
23407  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23408  # It is also a way to make sure we got the proper file name for the real test later on.
23409  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23410  if test "x$test_shortpath" = x; then
23411    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23413    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23414  fi
23415
23416  # Call helper function which possibly converts this using DOS-style short mode.
23417  # If so, the updated path is stored in $new_path.
23418
23419  input_path="$new_path"
23420  # Check if we need to convert this using DOS-style short mode. If the path
23421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23422  # take no chances and rewrite it.
23423  # Note: m4 eats our [], so we need to use [ and ] instead.
23424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23425  if test "x$has_forbidden_chars" != x; then
23426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23430      # Going to short mode and back again did indeed matter. Since short mode is
23431      # case insensitive, let's make it lowercase to improve readability.
23432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23433      # Now convert it back to Unix-stile (cygpath)
23434      input_path=`$CYGPATH -u "$shortmode_path"`
23435      new_path="$input_path"
23436    fi
23437  fi
23438
23439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23440  if test "x$test_cygdrive_prefix" = x; then
23441    # As a simple fix, exclude /usr/bin since it's not a real path.
23442    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23444      # a path prefixed by /cygdrive for fixpath to work.
23445      new_path="$CYGWIN_ROOT_PATH$input_path"
23446    fi
23447  fi
23448
23449
23450  if test "x$path" != "x$new_path"; then
23451    BOOT_JDK="$new_path"
23452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23453$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23454  fi
23455
23456    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23457
23458  path="$BOOT_JDK"
23459  has_colon=`$ECHO $path | $GREP ^.:`
23460  new_path="$path"
23461  if test "x$has_colon" = x; then
23462    # Not in mixed or Windows style, start by that.
23463    new_path=`cmd //c echo $path`
23464  fi
23465
23466
23467  input_path="$new_path"
23468  # Check if we need to convert this using DOS-style short mode. If the path
23469  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23470  # take no chances and rewrite it.
23471  # Note: m4 eats our [], so we need to use [ and ] instead.
23472  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23473  if test "x$has_forbidden_chars" != x; then
23474    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23475    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23476  fi
23477
23478
23479  windows_path="$new_path"
23480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23481    unix_path=`$CYGPATH -u "$windows_path"`
23482    new_path="$unix_path"
23483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23484    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23485    new_path="$unix_path"
23486  fi
23487
23488  if test "x$path" != "x$new_path"; then
23489    BOOT_JDK="$new_path"
23490    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23491$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23492  fi
23493
23494  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23495  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23496
23497    else
23498      # We're on a unix platform. Hooray! :)
23499      path="$BOOT_JDK"
23500      has_space=`$ECHO "$path" | $GREP " "`
23501      if test "x$has_space" != x; then
23502        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23504        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23505      fi
23506
23507      # Use eval to expand a potential ~
23508      eval path="$path"
23509      if test ! -f "$path" && test ! -d "$path"; then
23510        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23511      fi
23512
23513      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23514    fi
23515  fi
23516
23517            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23518$as_echo_n "checking for Boot JDK... " >&6; }
23519            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23520$as_echo "$BOOT_JDK" >&6; }
23521            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23522$as_echo_n "checking Boot JDK version... " >&6; }
23523            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23524            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23525$as_echo "$BOOT_JDK_VERSION" >&6; }
23526          fi # end check jdk version
23527        fi # end check javac
23528      fi # end check java
23529    fi # end check boot jdk found
23530  fi
23531
23532    done
23533  fi
23534
23535  fi
23536
23537
23538    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23539    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23540      # Do we have a bin/java?
23541      if test ! -x "$BOOT_JDK/bin/java"; then
23542        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23544        BOOT_JDK_FOUND=no
23545      else
23546        # Do we have a bin/javac?
23547        if test ! -x "$BOOT_JDK/bin/javac"; then
23548          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23550          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23551$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23552          BOOT_JDK_FOUND=no
23553        else
23554          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23555          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23556
23557          # Extra M4 quote needed to protect [] in grep expression.
23558          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23559          if test "x$FOUND_CORRECT_VERSION" = x; then
23560            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23561$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23562            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23563$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23564            BOOT_JDK_FOUND=no
23565          else
23566            # We're done! :-)
23567            BOOT_JDK_FOUND=yes
23568
23569  # Only process if variable expands to non-empty
23570
23571  if test "x$BOOT_JDK" != x; then
23572    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23573
23574  # Input might be given as Windows format, start by converting to
23575  # unix format.
23576  path="$BOOT_JDK"
23577  new_path=`$CYGPATH -u "$path"`
23578
23579  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23580  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23581  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23582  # "foo.exe" is OK but "foo" is an error.
23583  #
23584  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23585  # It is also a way to make sure we got the proper file name for the real test later on.
23586  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23587  if test "x$test_shortpath" = x; then
23588    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23589$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23590    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23591  fi
23592
23593  # Call helper function which possibly converts this using DOS-style short mode.
23594  # If so, the updated path is stored in $new_path.
23595
23596  input_path="$new_path"
23597  # Check if we need to convert this using DOS-style short mode. If the path
23598  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23599  # take no chances and rewrite it.
23600  # Note: m4 eats our [], so we need to use [ and ] instead.
23601  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23602  if test "x$has_forbidden_chars" != x; then
23603    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23604    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23605    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23606    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23607      # Going to short mode and back again did indeed matter. Since short mode is
23608      # case insensitive, let's make it lowercase to improve readability.
23609      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23610      # Now convert it back to Unix-stile (cygpath)
23611      input_path=`$CYGPATH -u "$shortmode_path"`
23612      new_path="$input_path"
23613    fi
23614  fi
23615
23616  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23617  if test "x$test_cygdrive_prefix" = x; then
23618    # As a simple fix, exclude /usr/bin since it's not a real path.
23619    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23620      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23621      # a path prefixed by /cygdrive for fixpath to work.
23622      new_path="$CYGWIN_ROOT_PATH$input_path"
23623    fi
23624  fi
23625
23626
23627  if test "x$path" != "x$new_path"; then
23628    BOOT_JDK="$new_path"
23629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23630$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23631  fi
23632
23633    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23634
23635  path="$BOOT_JDK"
23636  has_colon=`$ECHO $path | $GREP ^.:`
23637  new_path="$path"
23638  if test "x$has_colon" = x; then
23639    # Not in mixed or Windows style, start by that.
23640    new_path=`cmd //c echo $path`
23641  fi
23642
23643
23644  input_path="$new_path"
23645  # Check if we need to convert this using DOS-style short mode. If the path
23646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23647  # take no chances and rewrite it.
23648  # Note: m4 eats our [], so we need to use [ and ] instead.
23649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23650  if test "x$has_forbidden_chars" != x; then
23651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23653  fi
23654
23655
23656  windows_path="$new_path"
23657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23658    unix_path=`$CYGPATH -u "$windows_path"`
23659    new_path="$unix_path"
23660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23662    new_path="$unix_path"
23663  fi
23664
23665  if test "x$path" != "x$new_path"; then
23666    BOOT_JDK="$new_path"
23667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23668$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23669  fi
23670
23671  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23672  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23673
23674    else
23675      # We're on a unix platform. Hooray! :)
23676      path="$BOOT_JDK"
23677      has_space=`$ECHO "$path" | $GREP " "`
23678      if test "x$has_space" != x; then
23679        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23680$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23681        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23682      fi
23683
23684      # Use eval to expand a potential ~
23685      eval path="$path"
23686      if test ! -f "$path" && test ! -d "$path"; then
23687        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23688      fi
23689
23690      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23691    fi
23692  fi
23693
23694            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23695$as_echo_n "checking for Boot JDK... " >&6; }
23696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23697$as_echo "$BOOT_JDK" >&6; }
23698            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23699$as_echo_n "checking Boot JDK version... " >&6; }
23700            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23702$as_echo "$BOOT_JDK_VERSION" >&6; }
23703          fi # end check jdk version
23704        fi # end check javac
23705      fi # end check java
23706    fi # end check boot jdk found
23707  fi
23708
23709
23710  if test "x$BOOT_JDK_FOUND" = xno; then
23711    # Now execute the test
23712
23713  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23714  BOOT_JDK_SUFFIX=""
23715  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23716  if test "x$ALL_JDKS_FOUND" != x; then
23717    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23718
23719  if test "x$BOOT_JDK_FOUND" = xno; then
23720    # Now execute the test
23721
23722        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23723        if test -d "$BOOT_JDK"; then
23724          BOOT_JDK_FOUND=maybe
23725          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23726$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23727        fi
23728
23729
23730    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23731    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23732      # Do we have a bin/java?
23733      if test ! -x "$BOOT_JDK/bin/java"; then
23734        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23736        BOOT_JDK_FOUND=no
23737      else
23738        # Do we have a bin/javac?
23739        if test ! -x "$BOOT_JDK/bin/javac"; then
23740          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23741$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23742          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23743$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23744          BOOT_JDK_FOUND=no
23745        else
23746          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23747          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23748
23749          # Extra M4 quote needed to protect [] in grep expression.
23750          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23751          if test "x$FOUND_CORRECT_VERSION" = x; then
23752            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23754            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23755$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23756            BOOT_JDK_FOUND=no
23757          else
23758            # We're done! :-)
23759            BOOT_JDK_FOUND=yes
23760
23761  # Only process if variable expands to non-empty
23762
23763  if test "x$BOOT_JDK" != x; then
23764    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23765
23766  # Input might be given as Windows format, start by converting to
23767  # unix format.
23768  path="$BOOT_JDK"
23769  new_path=`$CYGPATH -u "$path"`
23770
23771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23774  # "foo.exe" is OK but "foo" is an error.
23775  #
23776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23777  # It is also a way to make sure we got the proper file name for the real test later on.
23778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23779  if test "x$test_shortpath" = x; then
23780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23781$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23782    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23783  fi
23784
23785  # Call helper function which possibly converts this using DOS-style short mode.
23786  # If so, the updated path is stored in $new_path.
23787
23788  input_path="$new_path"
23789  # Check if we need to convert this using DOS-style short mode. If the path
23790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23791  # take no chances and rewrite it.
23792  # Note: m4 eats our [], so we need to use [ and ] instead.
23793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23794  if test "x$has_forbidden_chars" != x; then
23795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23799      # Going to short mode and back again did indeed matter. Since short mode is
23800      # case insensitive, let's make it lowercase to improve readability.
23801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23802      # Now convert it back to Unix-stile (cygpath)
23803      input_path=`$CYGPATH -u "$shortmode_path"`
23804      new_path="$input_path"
23805    fi
23806  fi
23807
23808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23809  if test "x$test_cygdrive_prefix" = x; then
23810    # As a simple fix, exclude /usr/bin since it's not a real path.
23811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23813      # a path prefixed by /cygdrive for fixpath to work.
23814      new_path="$CYGWIN_ROOT_PATH$input_path"
23815    fi
23816  fi
23817
23818
23819  if test "x$path" != "x$new_path"; then
23820    BOOT_JDK="$new_path"
23821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23822$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23823  fi
23824
23825    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23826
23827  path="$BOOT_JDK"
23828  has_colon=`$ECHO $path | $GREP ^.:`
23829  new_path="$path"
23830  if test "x$has_colon" = x; then
23831    # Not in mixed or Windows style, start by that.
23832    new_path=`cmd //c echo $path`
23833  fi
23834
23835
23836  input_path="$new_path"
23837  # Check if we need to convert this using DOS-style short mode. If the path
23838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23839  # take no chances and rewrite it.
23840  # Note: m4 eats our [], so we need to use [ and ] instead.
23841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23842  if test "x$has_forbidden_chars" != x; then
23843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23845  fi
23846
23847
23848  windows_path="$new_path"
23849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23850    unix_path=`$CYGPATH -u "$windows_path"`
23851    new_path="$unix_path"
23852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23854    new_path="$unix_path"
23855  fi
23856
23857  if test "x$path" != "x$new_path"; then
23858    BOOT_JDK="$new_path"
23859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23860$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23861  fi
23862
23863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23865
23866    else
23867      # We're on a unix platform. Hooray! :)
23868      path="$BOOT_JDK"
23869      has_space=`$ECHO "$path" | $GREP " "`
23870      if test "x$has_space" != x; then
23871        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23872$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23873        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23874      fi
23875
23876      # Use eval to expand a potential ~
23877      eval path="$path"
23878      if test ! -f "$path" && test ! -d "$path"; then
23879        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23880      fi
23881
23882      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23883    fi
23884  fi
23885
23886            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23887$as_echo_n "checking for Boot JDK... " >&6; }
23888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23889$as_echo "$BOOT_JDK" >&6; }
23890            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23891$as_echo_n "checking Boot JDK version... " >&6; }
23892            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23893            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23894$as_echo "$BOOT_JDK_VERSION" >&6; }
23895          fi # end check jdk version
23896        fi # end check javac
23897      fi # end check java
23898    fi # end check boot jdk found
23899  fi
23900
23901    done
23902  fi
23903
23904
23905    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23906    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23907      # Do we have a bin/java?
23908      if test ! -x "$BOOT_JDK/bin/java"; then
23909        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23911        BOOT_JDK_FOUND=no
23912      else
23913        # Do we have a bin/javac?
23914        if test ! -x "$BOOT_JDK/bin/javac"; then
23915          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23917          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23918$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23919          BOOT_JDK_FOUND=no
23920        else
23921          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23922          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23923
23924          # Extra M4 quote needed to protect [] in grep expression.
23925          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23926          if test "x$FOUND_CORRECT_VERSION" = x; then
23927            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23929            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23930$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23931            BOOT_JDK_FOUND=no
23932          else
23933            # We're done! :-)
23934            BOOT_JDK_FOUND=yes
23935
23936  # Only process if variable expands to non-empty
23937
23938  if test "x$BOOT_JDK" != x; then
23939    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23940
23941  # Input might be given as Windows format, start by converting to
23942  # unix format.
23943  path="$BOOT_JDK"
23944  new_path=`$CYGPATH -u "$path"`
23945
23946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23949  # "foo.exe" is OK but "foo" is an error.
23950  #
23951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23952  # It is also a way to make sure we got the proper file name for the real test later on.
23953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23954  if test "x$test_shortpath" = x; then
23955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23956$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23957    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23958  fi
23959
23960  # Call helper function which possibly converts this using DOS-style short mode.
23961  # If so, the updated path is stored in $new_path.
23962
23963  input_path="$new_path"
23964  # Check if we need to convert this using DOS-style short mode. If the path
23965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23966  # take no chances and rewrite it.
23967  # Note: m4 eats our [], so we need to use [ and ] instead.
23968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23969  if test "x$has_forbidden_chars" != x; then
23970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23974      # Going to short mode and back again did indeed matter. Since short mode is
23975      # case insensitive, let's make it lowercase to improve readability.
23976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23977      # Now convert it back to Unix-stile (cygpath)
23978      input_path=`$CYGPATH -u "$shortmode_path"`
23979      new_path="$input_path"
23980    fi
23981  fi
23982
23983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23984  if test "x$test_cygdrive_prefix" = x; then
23985    # As a simple fix, exclude /usr/bin since it's not a real path.
23986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23988      # a path prefixed by /cygdrive for fixpath to work.
23989      new_path="$CYGWIN_ROOT_PATH$input_path"
23990    fi
23991  fi
23992
23993
23994  if test "x$path" != "x$new_path"; then
23995    BOOT_JDK="$new_path"
23996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23997$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23998  fi
23999
24000    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24001
24002  path="$BOOT_JDK"
24003  has_colon=`$ECHO $path | $GREP ^.:`
24004  new_path="$path"
24005  if test "x$has_colon" = x; then
24006    # Not in mixed or Windows style, start by that.
24007    new_path=`cmd //c echo $path`
24008  fi
24009
24010
24011  input_path="$new_path"
24012  # Check if we need to convert this using DOS-style short mode. If the path
24013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24014  # take no chances and rewrite it.
24015  # Note: m4 eats our [], so we need to use [ and ] instead.
24016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24017  if test "x$has_forbidden_chars" != x; then
24018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24020  fi
24021
24022
24023  windows_path="$new_path"
24024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24025    unix_path=`$CYGPATH -u "$windows_path"`
24026    new_path="$unix_path"
24027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24029    new_path="$unix_path"
24030  fi
24031
24032  if test "x$path" != "x$new_path"; then
24033    BOOT_JDK="$new_path"
24034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24035$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24036  fi
24037
24038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24040
24041    else
24042      # We're on a unix platform. Hooray! :)
24043      path="$BOOT_JDK"
24044      has_space=`$ECHO "$path" | $GREP " "`
24045      if test "x$has_space" != x; then
24046        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24047$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24048        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24049      fi
24050
24051      # Use eval to expand a potential ~
24052      eval path="$path"
24053      if test ! -f "$path" && test ! -d "$path"; then
24054        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24055      fi
24056
24057      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24058    fi
24059  fi
24060
24061            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24062$as_echo_n "checking for Boot JDK... " >&6; }
24063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24064$as_echo "$BOOT_JDK" >&6; }
24065            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24066$as_echo_n "checking Boot JDK version... " >&6; }
24067            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24068            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24069$as_echo "$BOOT_JDK_VERSION" >&6; }
24070          fi # end check jdk version
24071        fi # end check javac
24072      fi # end check java
24073    fi # end check boot jdk found
24074  fi
24075
24076  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24077
24078  if test "x$BOOT_JDK_FOUND" = xno; then
24079    # Now execute the test
24080
24081  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24082  BOOT_JDK_SUFFIX="/Contents/Home"
24083  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24084  if test "x$ALL_JDKS_FOUND" != x; then
24085    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24086
24087  if test "x$BOOT_JDK_FOUND" = xno; then
24088    # Now execute the test
24089
24090        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24091        if test -d "$BOOT_JDK"; then
24092          BOOT_JDK_FOUND=maybe
24093          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24094$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24095        fi
24096
24097
24098    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24099    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24100      # Do we have a bin/java?
24101      if test ! -x "$BOOT_JDK/bin/java"; then
24102        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24104        BOOT_JDK_FOUND=no
24105      else
24106        # Do we have a bin/javac?
24107        if test ! -x "$BOOT_JDK/bin/javac"; then
24108          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24109$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24110          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24111$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24112          BOOT_JDK_FOUND=no
24113        else
24114          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24115          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24116
24117          # Extra M4 quote needed to protect [] in grep expression.
24118          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24119          if test "x$FOUND_CORRECT_VERSION" = x; then
24120            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24121$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24122            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24123$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24124            BOOT_JDK_FOUND=no
24125          else
24126            # We're done! :-)
24127            BOOT_JDK_FOUND=yes
24128
24129  # Only process if variable expands to non-empty
24130
24131  if test "x$BOOT_JDK" != x; then
24132    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24133
24134  # Input might be given as Windows format, start by converting to
24135  # unix format.
24136  path="$BOOT_JDK"
24137  new_path=`$CYGPATH -u "$path"`
24138
24139  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24140  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24141  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24142  # "foo.exe" is OK but "foo" is an error.
24143  #
24144  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24145  # It is also a way to make sure we got the proper file name for the real test later on.
24146  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24147  if test "x$test_shortpath" = x; then
24148    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24149$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24150    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24151  fi
24152
24153  # Call helper function which possibly converts this using DOS-style short mode.
24154  # If so, the updated path is stored in $new_path.
24155
24156  input_path="$new_path"
24157  # Check if we need to convert this using DOS-style short mode. If the path
24158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24159  # take no chances and rewrite it.
24160  # Note: m4 eats our [], so we need to use [ and ] instead.
24161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24162  if test "x$has_forbidden_chars" != x; then
24163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24164    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24165    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24166    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24167      # Going to short mode and back again did indeed matter. Since short mode is
24168      # case insensitive, let's make it lowercase to improve readability.
24169      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24170      # Now convert it back to Unix-stile (cygpath)
24171      input_path=`$CYGPATH -u "$shortmode_path"`
24172      new_path="$input_path"
24173    fi
24174  fi
24175
24176  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24177  if test "x$test_cygdrive_prefix" = x; then
24178    # As a simple fix, exclude /usr/bin since it's not a real path.
24179    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24180      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24181      # a path prefixed by /cygdrive for fixpath to work.
24182      new_path="$CYGWIN_ROOT_PATH$input_path"
24183    fi
24184  fi
24185
24186
24187  if test "x$path" != "x$new_path"; then
24188    BOOT_JDK="$new_path"
24189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24191  fi
24192
24193    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24194
24195  path="$BOOT_JDK"
24196  has_colon=`$ECHO $path | $GREP ^.:`
24197  new_path="$path"
24198  if test "x$has_colon" = x; then
24199    # Not in mixed or Windows style, start by that.
24200    new_path=`cmd //c echo $path`
24201  fi
24202
24203
24204  input_path="$new_path"
24205  # Check if we need to convert this using DOS-style short mode. If the path
24206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24207  # take no chances and rewrite it.
24208  # Note: m4 eats our [], so we need to use [ and ] instead.
24209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24210  if test "x$has_forbidden_chars" != x; then
24211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24212    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24213  fi
24214
24215
24216  windows_path="$new_path"
24217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24218    unix_path=`$CYGPATH -u "$windows_path"`
24219    new_path="$unix_path"
24220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24221    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24222    new_path="$unix_path"
24223  fi
24224
24225  if test "x$path" != "x$new_path"; then
24226    BOOT_JDK="$new_path"
24227    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24228$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24229  fi
24230
24231  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24232  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24233
24234    else
24235      # We're on a unix platform. Hooray! :)
24236      path="$BOOT_JDK"
24237      has_space=`$ECHO "$path" | $GREP " "`
24238      if test "x$has_space" != x; then
24239        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24240$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24241        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24242      fi
24243
24244      # Use eval to expand a potential ~
24245      eval path="$path"
24246      if test ! -f "$path" && test ! -d "$path"; then
24247        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24248      fi
24249
24250      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24251    fi
24252  fi
24253
24254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24255$as_echo_n "checking for Boot JDK... " >&6; }
24256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24257$as_echo "$BOOT_JDK" >&6; }
24258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24259$as_echo_n "checking Boot JDK version... " >&6; }
24260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24262$as_echo "$BOOT_JDK_VERSION" >&6; }
24263          fi # end check jdk version
24264        fi # end check javac
24265      fi # end check java
24266    fi # end check boot jdk found
24267  fi
24268
24269    done
24270  fi
24271
24272
24273    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24274    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24275      # Do we have a bin/java?
24276      if test ! -x "$BOOT_JDK/bin/java"; then
24277        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24279        BOOT_JDK_FOUND=no
24280      else
24281        # Do we have a bin/javac?
24282        if test ! -x "$BOOT_JDK/bin/javac"; then
24283          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24284$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24285          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24286$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24287          BOOT_JDK_FOUND=no
24288        else
24289          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24290          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24291
24292          # Extra M4 quote needed to protect [] in grep expression.
24293          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24294          if test "x$FOUND_CORRECT_VERSION" = x; then
24295            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24296$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24297            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24298$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24299            BOOT_JDK_FOUND=no
24300          else
24301            # We're done! :-)
24302            BOOT_JDK_FOUND=yes
24303
24304  # Only process if variable expands to non-empty
24305
24306  if test "x$BOOT_JDK" != x; then
24307    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24308
24309  # Input might be given as Windows format, start by converting to
24310  # unix format.
24311  path="$BOOT_JDK"
24312  new_path=`$CYGPATH -u "$path"`
24313
24314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24317  # "foo.exe" is OK but "foo" is an error.
24318  #
24319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24320  # It is also a way to make sure we got the proper file name for the real test later on.
24321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24322  if test "x$test_shortpath" = x; then
24323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24326  fi
24327
24328  # Call helper function which possibly converts this using DOS-style short mode.
24329  # If so, the updated path is stored in $new_path.
24330
24331  input_path="$new_path"
24332  # Check if we need to convert this using DOS-style short mode. If the path
24333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24334  # take no chances and rewrite it.
24335  # Note: m4 eats our [], so we need to use [ and ] instead.
24336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24337  if test "x$has_forbidden_chars" != x; then
24338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24342      # Going to short mode and back again did indeed matter. Since short mode is
24343      # case insensitive, let's make it lowercase to improve readability.
24344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24345      # Now convert it back to Unix-stile (cygpath)
24346      input_path=`$CYGPATH -u "$shortmode_path"`
24347      new_path="$input_path"
24348    fi
24349  fi
24350
24351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24352  if test "x$test_cygdrive_prefix" = x; then
24353    # As a simple fix, exclude /usr/bin since it's not a real path.
24354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24356      # a path prefixed by /cygdrive for fixpath to work.
24357      new_path="$CYGWIN_ROOT_PATH$input_path"
24358    fi
24359  fi
24360
24361
24362  if test "x$path" != "x$new_path"; then
24363    BOOT_JDK="$new_path"
24364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24366  fi
24367
24368    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24369
24370  path="$BOOT_JDK"
24371  has_colon=`$ECHO $path | $GREP ^.:`
24372  new_path="$path"
24373  if test "x$has_colon" = x; then
24374    # Not in mixed or Windows style, start by that.
24375    new_path=`cmd //c echo $path`
24376  fi
24377
24378
24379  input_path="$new_path"
24380  # Check if we need to convert this using DOS-style short mode. If the path
24381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24382  # take no chances and rewrite it.
24383  # Note: m4 eats our [], so we need to use [ and ] instead.
24384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24385  if test "x$has_forbidden_chars" != x; then
24386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24388  fi
24389
24390
24391  windows_path="$new_path"
24392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24393    unix_path=`$CYGPATH -u "$windows_path"`
24394    new_path="$unix_path"
24395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24397    new_path="$unix_path"
24398  fi
24399
24400  if test "x$path" != "x$new_path"; then
24401    BOOT_JDK="$new_path"
24402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24404  fi
24405
24406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24408
24409    else
24410      # We're on a unix platform. Hooray! :)
24411      path="$BOOT_JDK"
24412      has_space=`$ECHO "$path" | $GREP " "`
24413      if test "x$has_space" != x; then
24414        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24416        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24417      fi
24418
24419      # Use eval to expand a potential ~
24420      eval path="$path"
24421      if test ! -f "$path" && test ! -d "$path"; then
24422        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24423      fi
24424
24425      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24426    fi
24427  fi
24428
24429            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24430$as_echo_n "checking for Boot JDK... " >&6; }
24431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24432$as_echo "$BOOT_JDK" >&6; }
24433            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24434$as_echo_n "checking Boot JDK version... " >&6; }
24435            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24437$as_echo "$BOOT_JDK_VERSION" >&6; }
24438          fi # end check jdk version
24439        fi # end check javac
24440      fi # end check java
24441    fi # end check boot jdk found
24442  fi
24443
24444
24445  if test "x$BOOT_JDK_FOUND" = xno; then
24446    # Now execute the test
24447
24448  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24449  BOOT_JDK_SUFFIX="/Contents/Home"
24450  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24451  if test "x$ALL_JDKS_FOUND" != x; then
24452    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24453
24454  if test "x$BOOT_JDK_FOUND" = xno; then
24455    # Now execute the test
24456
24457        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24458        if test -d "$BOOT_JDK"; then
24459          BOOT_JDK_FOUND=maybe
24460          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24461$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24462        fi
24463
24464
24465    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24466    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24467      # Do we have a bin/java?
24468      if test ! -x "$BOOT_JDK/bin/java"; then
24469        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24470$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24471        BOOT_JDK_FOUND=no
24472      else
24473        # Do we have a bin/javac?
24474        if test ! -x "$BOOT_JDK/bin/javac"; then
24475          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24476$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24477          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24478$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24479          BOOT_JDK_FOUND=no
24480        else
24481          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24482          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24483
24484          # Extra M4 quote needed to protect [] in grep expression.
24485          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24486          if test "x$FOUND_CORRECT_VERSION" = x; then
24487            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24488$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24489            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24490$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24491            BOOT_JDK_FOUND=no
24492          else
24493            # We're done! :-)
24494            BOOT_JDK_FOUND=yes
24495
24496  # Only process if variable expands to non-empty
24497
24498  if test "x$BOOT_JDK" != x; then
24499    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24500
24501  # Input might be given as Windows format, start by converting to
24502  # unix format.
24503  path="$BOOT_JDK"
24504  new_path=`$CYGPATH -u "$path"`
24505
24506  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24507  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24508  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24509  # "foo.exe" is OK but "foo" is an error.
24510  #
24511  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24512  # It is also a way to make sure we got the proper file name for the real test later on.
24513  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24514  if test "x$test_shortpath" = x; then
24515    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24516$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24517    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24518  fi
24519
24520  # Call helper function which possibly converts this using DOS-style short mode.
24521  # If so, the updated path is stored in $new_path.
24522
24523  input_path="$new_path"
24524  # Check if we need to convert this using DOS-style short mode. If the path
24525  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24526  # take no chances and rewrite it.
24527  # Note: m4 eats our [], so we need to use [ and ] instead.
24528  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24529  if test "x$has_forbidden_chars" != x; then
24530    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24531    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24532    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24533    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24534      # Going to short mode and back again did indeed matter. Since short mode is
24535      # case insensitive, let's make it lowercase to improve readability.
24536      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24537      # Now convert it back to Unix-stile (cygpath)
24538      input_path=`$CYGPATH -u "$shortmode_path"`
24539      new_path="$input_path"
24540    fi
24541  fi
24542
24543  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24544  if test "x$test_cygdrive_prefix" = x; then
24545    # As a simple fix, exclude /usr/bin since it's not a real path.
24546    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24547      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24548      # a path prefixed by /cygdrive for fixpath to work.
24549      new_path="$CYGWIN_ROOT_PATH$input_path"
24550    fi
24551  fi
24552
24553
24554  if test "x$path" != "x$new_path"; then
24555    BOOT_JDK="$new_path"
24556    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24557$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24558  fi
24559
24560    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24561
24562  path="$BOOT_JDK"
24563  has_colon=`$ECHO $path | $GREP ^.:`
24564  new_path="$path"
24565  if test "x$has_colon" = x; then
24566    # Not in mixed or Windows style, start by that.
24567    new_path=`cmd //c echo $path`
24568  fi
24569
24570
24571  input_path="$new_path"
24572  # Check if we need to convert this using DOS-style short mode. If the path
24573  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24574  # take no chances and rewrite it.
24575  # Note: m4 eats our [], so we need to use [ and ] instead.
24576  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24577  if test "x$has_forbidden_chars" != x; then
24578    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24579    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24580  fi
24581
24582
24583  windows_path="$new_path"
24584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24585    unix_path=`$CYGPATH -u "$windows_path"`
24586    new_path="$unix_path"
24587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24589    new_path="$unix_path"
24590  fi
24591
24592  if test "x$path" != "x$new_path"; then
24593    BOOT_JDK="$new_path"
24594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24595$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24596  fi
24597
24598  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24599  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24600
24601    else
24602      # We're on a unix platform. Hooray! :)
24603      path="$BOOT_JDK"
24604      has_space=`$ECHO "$path" | $GREP " "`
24605      if test "x$has_space" != x; then
24606        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24608        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24609      fi
24610
24611      # Use eval to expand a potential ~
24612      eval path="$path"
24613      if test ! -f "$path" && test ! -d "$path"; then
24614        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24615      fi
24616
24617      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24618    fi
24619  fi
24620
24621            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24622$as_echo_n "checking for Boot JDK... " >&6; }
24623            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24624$as_echo "$BOOT_JDK" >&6; }
24625            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24626$as_echo_n "checking Boot JDK version... " >&6; }
24627            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24628            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24629$as_echo "$BOOT_JDK_VERSION" >&6; }
24630          fi # end check jdk version
24631        fi # end check javac
24632      fi # end check java
24633    fi # end check boot jdk found
24634  fi
24635
24636    done
24637  fi
24638
24639
24640    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24641    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24642      # Do we have a bin/java?
24643      if test ! -x "$BOOT_JDK/bin/java"; then
24644        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24645$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24646        BOOT_JDK_FOUND=no
24647      else
24648        # Do we have a bin/javac?
24649        if test ! -x "$BOOT_JDK/bin/javac"; then
24650          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24651$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24652          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24653$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24654          BOOT_JDK_FOUND=no
24655        else
24656          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24657          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24658
24659          # Extra M4 quote needed to protect [] in grep expression.
24660          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24661          if test "x$FOUND_CORRECT_VERSION" = x; then
24662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24664            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24665$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24666            BOOT_JDK_FOUND=no
24667          else
24668            # We're done! :-)
24669            BOOT_JDK_FOUND=yes
24670
24671  # Only process if variable expands to non-empty
24672
24673  if test "x$BOOT_JDK" != x; then
24674    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24675
24676  # Input might be given as Windows format, start by converting to
24677  # unix format.
24678  path="$BOOT_JDK"
24679  new_path=`$CYGPATH -u "$path"`
24680
24681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24684  # "foo.exe" is OK but "foo" is an error.
24685  #
24686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24687  # It is also a way to make sure we got the proper file name for the real test later on.
24688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24689  if test "x$test_shortpath" = x; then
24690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24692    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24693  fi
24694
24695  # Call helper function which possibly converts this using DOS-style short mode.
24696  # If so, the updated path is stored in $new_path.
24697
24698  input_path="$new_path"
24699  # Check if we need to convert this using DOS-style short mode. If the path
24700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24701  # take no chances and rewrite it.
24702  # Note: m4 eats our [], so we need to use [ and ] instead.
24703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24704  if test "x$has_forbidden_chars" != x; then
24705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24709      # Going to short mode and back again did indeed matter. Since short mode is
24710      # case insensitive, let's make it lowercase to improve readability.
24711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24712      # Now convert it back to Unix-stile (cygpath)
24713      input_path=`$CYGPATH -u "$shortmode_path"`
24714      new_path="$input_path"
24715    fi
24716  fi
24717
24718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24719  if test "x$test_cygdrive_prefix" = x; then
24720    # As a simple fix, exclude /usr/bin since it's not a real path.
24721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24723      # a path prefixed by /cygdrive for fixpath to work.
24724      new_path="$CYGWIN_ROOT_PATH$input_path"
24725    fi
24726  fi
24727
24728
24729  if test "x$path" != "x$new_path"; then
24730    BOOT_JDK="$new_path"
24731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24733  fi
24734
24735    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24736
24737  path="$BOOT_JDK"
24738  has_colon=`$ECHO $path | $GREP ^.:`
24739  new_path="$path"
24740  if test "x$has_colon" = x; then
24741    # Not in mixed or Windows style, start by that.
24742    new_path=`cmd //c echo $path`
24743  fi
24744
24745
24746  input_path="$new_path"
24747  # Check if we need to convert this using DOS-style short mode. If the path
24748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24749  # take no chances and rewrite it.
24750  # Note: m4 eats our [], so we need to use [ and ] instead.
24751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24752  if test "x$has_forbidden_chars" != x; then
24753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24755  fi
24756
24757
24758  windows_path="$new_path"
24759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24760    unix_path=`$CYGPATH -u "$windows_path"`
24761    new_path="$unix_path"
24762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24764    new_path="$unix_path"
24765  fi
24766
24767  if test "x$path" != "x$new_path"; then
24768    BOOT_JDK="$new_path"
24769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24771  fi
24772
24773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24775
24776    else
24777      # We're on a unix platform. Hooray! :)
24778      path="$BOOT_JDK"
24779      has_space=`$ECHO "$path" | $GREP " "`
24780      if test "x$has_space" != x; then
24781        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24783        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24784      fi
24785
24786      # Use eval to expand a potential ~
24787      eval path="$path"
24788      if test ! -f "$path" && test ! -d "$path"; then
24789        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24790      fi
24791
24792      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24793    fi
24794  fi
24795
24796            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24797$as_echo_n "checking for Boot JDK... " >&6; }
24798            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24799$as_echo "$BOOT_JDK" >&6; }
24800            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24801$as_echo_n "checking Boot JDK version... " >&6; }
24802            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24803            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24804$as_echo "$BOOT_JDK_VERSION" >&6; }
24805          fi # end check jdk version
24806        fi # end check javac
24807      fi # end check java
24808    fi # end check boot jdk found
24809  fi
24810
24811  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24812
24813  if test "x$BOOT_JDK_FOUND" = xno; then
24814    # Now execute the test
24815
24816  BOOT_JDK_PREFIX="/usr/lib/jvm"
24817  BOOT_JDK_SUFFIX=""
24818  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24819  if test "x$ALL_JDKS_FOUND" != x; then
24820    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24821
24822  if test "x$BOOT_JDK_FOUND" = xno; then
24823    # Now execute the test
24824
24825        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24826        if test -d "$BOOT_JDK"; then
24827          BOOT_JDK_FOUND=maybe
24828          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24829$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24830        fi
24831
24832
24833    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24834    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24835      # Do we have a bin/java?
24836      if test ! -x "$BOOT_JDK/bin/java"; then
24837        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24838$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24839        BOOT_JDK_FOUND=no
24840      else
24841        # Do we have a bin/javac?
24842        if test ! -x "$BOOT_JDK/bin/javac"; then
24843          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24844$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24845          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24846$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24847          BOOT_JDK_FOUND=no
24848        else
24849          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24850          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24851
24852          # Extra M4 quote needed to protect [] in grep expression.
24853          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24854          if test "x$FOUND_CORRECT_VERSION" = x; then
24855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24857            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24858$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24859            BOOT_JDK_FOUND=no
24860          else
24861            # We're done! :-)
24862            BOOT_JDK_FOUND=yes
24863
24864  # Only process if variable expands to non-empty
24865
24866  if test "x$BOOT_JDK" != x; then
24867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24868
24869  # Input might be given as Windows format, start by converting to
24870  # unix format.
24871  path="$BOOT_JDK"
24872  new_path=`$CYGPATH -u "$path"`
24873
24874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24877  # "foo.exe" is OK but "foo" is an error.
24878  #
24879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24880  # It is also a way to make sure we got the proper file name for the real test later on.
24881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24882  if test "x$test_shortpath" = x; then
24883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24885    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24886  fi
24887
24888  # Call helper function which possibly converts this using DOS-style short mode.
24889  # If so, the updated path is stored in $new_path.
24890
24891  input_path="$new_path"
24892  # Check if we need to convert this using DOS-style short mode. If the path
24893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24894  # take no chances and rewrite it.
24895  # Note: m4 eats our [], so we need to use [ and ] instead.
24896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24897  if test "x$has_forbidden_chars" != x; then
24898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24902      # Going to short mode and back again did indeed matter. Since short mode is
24903      # case insensitive, let's make it lowercase to improve readability.
24904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24905      # Now convert it back to Unix-stile (cygpath)
24906      input_path=`$CYGPATH -u "$shortmode_path"`
24907      new_path="$input_path"
24908    fi
24909  fi
24910
24911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24912  if test "x$test_cygdrive_prefix" = x; then
24913    # As a simple fix, exclude /usr/bin since it's not a real path.
24914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24916      # a path prefixed by /cygdrive for fixpath to work.
24917      new_path="$CYGWIN_ROOT_PATH$input_path"
24918    fi
24919  fi
24920
24921
24922  if test "x$path" != "x$new_path"; then
24923    BOOT_JDK="$new_path"
24924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24925$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24926  fi
24927
24928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24929
24930  path="$BOOT_JDK"
24931  has_colon=`$ECHO $path | $GREP ^.:`
24932  new_path="$path"
24933  if test "x$has_colon" = x; then
24934    # Not in mixed or Windows style, start by that.
24935    new_path=`cmd //c echo $path`
24936  fi
24937
24938
24939  input_path="$new_path"
24940  # Check if we need to convert this using DOS-style short mode. If the path
24941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24942  # take no chances and rewrite it.
24943  # Note: m4 eats our [], so we need to use [ and ] instead.
24944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24945  if test "x$has_forbidden_chars" != x; then
24946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24948  fi
24949
24950
24951  windows_path="$new_path"
24952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24953    unix_path=`$CYGPATH -u "$windows_path"`
24954    new_path="$unix_path"
24955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24957    new_path="$unix_path"
24958  fi
24959
24960  if test "x$path" != "x$new_path"; then
24961    BOOT_JDK="$new_path"
24962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24963$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24964  fi
24965
24966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24968
24969    else
24970      # We're on a unix platform. Hooray! :)
24971      path="$BOOT_JDK"
24972      has_space=`$ECHO "$path" | $GREP " "`
24973      if test "x$has_space" != x; then
24974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24975$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24977      fi
24978
24979      # Use eval to expand a potential ~
24980      eval path="$path"
24981      if test ! -f "$path" && test ! -d "$path"; then
24982        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24983      fi
24984
24985      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24986    fi
24987  fi
24988
24989            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24990$as_echo_n "checking for Boot JDK... " >&6; }
24991            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24992$as_echo "$BOOT_JDK" >&6; }
24993            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24994$as_echo_n "checking Boot JDK version... " >&6; }
24995            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24997$as_echo "$BOOT_JDK_VERSION" >&6; }
24998          fi # end check jdk version
24999        fi # end check javac
25000      fi # end check java
25001    fi # end check boot jdk found
25002  fi
25003
25004    done
25005  fi
25006
25007
25008    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25009    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25010      # Do we have a bin/java?
25011      if test ! -x "$BOOT_JDK/bin/java"; then
25012        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25013$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25014        BOOT_JDK_FOUND=no
25015      else
25016        # Do we have a bin/javac?
25017        if test ! -x "$BOOT_JDK/bin/javac"; then
25018          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25020          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25021$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25022          BOOT_JDK_FOUND=no
25023        else
25024          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25025          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25026
25027          # Extra M4 quote needed to protect [] in grep expression.
25028          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25029          if test "x$FOUND_CORRECT_VERSION" = x; then
25030            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25031$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25032            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25033$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25034            BOOT_JDK_FOUND=no
25035          else
25036            # We're done! :-)
25037            BOOT_JDK_FOUND=yes
25038
25039  # Only process if variable expands to non-empty
25040
25041  if test "x$BOOT_JDK" != x; then
25042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25043
25044  # Input might be given as Windows format, start by converting to
25045  # unix format.
25046  path="$BOOT_JDK"
25047  new_path=`$CYGPATH -u "$path"`
25048
25049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25052  # "foo.exe" is OK but "foo" is an error.
25053  #
25054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25055  # It is also a way to make sure we got the proper file name for the real test later on.
25056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25057  if test "x$test_shortpath" = x; then
25058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25059$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25060    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25061  fi
25062
25063  # Call helper function which possibly converts this using DOS-style short mode.
25064  # If so, the updated path is stored in $new_path.
25065
25066  input_path="$new_path"
25067  # Check if we need to convert this using DOS-style short mode. If the path
25068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25069  # take no chances and rewrite it.
25070  # Note: m4 eats our [], so we need to use [ and ] instead.
25071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25072  if test "x$has_forbidden_chars" != x; then
25073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25077      # Going to short mode and back again did indeed matter. Since short mode is
25078      # case insensitive, let's make it lowercase to improve readability.
25079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25080      # Now convert it back to Unix-stile (cygpath)
25081      input_path=`$CYGPATH -u "$shortmode_path"`
25082      new_path="$input_path"
25083    fi
25084  fi
25085
25086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25087  if test "x$test_cygdrive_prefix" = x; then
25088    # As a simple fix, exclude /usr/bin since it's not a real path.
25089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25091      # a path prefixed by /cygdrive for fixpath to work.
25092      new_path="$CYGWIN_ROOT_PATH$input_path"
25093    fi
25094  fi
25095
25096
25097  if test "x$path" != "x$new_path"; then
25098    BOOT_JDK="$new_path"
25099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25100$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25101  fi
25102
25103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25104
25105  path="$BOOT_JDK"
25106  has_colon=`$ECHO $path | $GREP ^.:`
25107  new_path="$path"
25108  if test "x$has_colon" = x; then
25109    # Not in mixed or Windows style, start by that.
25110    new_path=`cmd //c echo $path`
25111  fi
25112
25113
25114  input_path="$new_path"
25115  # Check if we need to convert this using DOS-style short mode. If the path
25116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25117  # take no chances and rewrite it.
25118  # Note: m4 eats our [], so we need to use [ and ] instead.
25119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25120  if test "x$has_forbidden_chars" != x; then
25121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25123  fi
25124
25125
25126  windows_path="$new_path"
25127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25128    unix_path=`$CYGPATH -u "$windows_path"`
25129    new_path="$unix_path"
25130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25132    new_path="$unix_path"
25133  fi
25134
25135  if test "x$path" != "x$new_path"; then
25136    BOOT_JDK="$new_path"
25137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25138$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25139  fi
25140
25141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25143
25144    else
25145      # We're on a unix platform. Hooray! :)
25146      path="$BOOT_JDK"
25147      has_space=`$ECHO "$path" | $GREP " "`
25148      if test "x$has_space" != x; then
25149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25150$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25152      fi
25153
25154      # Use eval to expand a potential ~
25155      eval path="$path"
25156      if test ! -f "$path" && test ! -d "$path"; then
25157        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25158      fi
25159
25160      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25161    fi
25162  fi
25163
25164            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25165$as_echo_n "checking for Boot JDK... " >&6; }
25166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25167$as_echo "$BOOT_JDK" >&6; }
25168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25169$as_echo_n "checking Boot JDK version... " >&6; }
25170            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25171            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25172$as_echo "$BOOT_JDK_VERSION" >&6; }
25173          fi # end check jdk version
25174        fi # end check javac
25175      fi # end check java
25176    fi # end check boot jdk found
25177  fi
25178
25179  fi
25180
25181
25182    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25183    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25184      # Do we have a bin/java?
25185      if test ! -x "$BOOT_JDK/bin/java"; then
25186        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25187$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25188        BOOT_JDK_FOUND=no
25189      else
25190        # Do we have a bin/javac?
25191        if test ! -x "$BOOT_JDK/bin/javac"; then
25192          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25193$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25194          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25195$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25196          BOOT_JDK_FOUND=no
25197        else
25198          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25199          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25200
25201          # Extra M4 quote needed to protect [] in grep expression.
25202          FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25203          if test "x$FOUND_CORRECT_VERSION" = x; then
25204            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25206            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25207$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25208            BOOT_JDK_FOUND=no
25209          else
25210            # We're done! :-)
25211            BOOT_JDK_FOUND=yes
25212
25213  # Only process if variable expands to non-empty
25214
25215  if test "x$BOOT_JDK" != x; then
25216    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25217
25218  # Input might be given as Windows format, start by converting to
25219  # unix format.
25220  path="$BOOT_JDK"
25221  new_path=`$CYGPATH -u "$path"`
25222
25223  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25224  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25225  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25226  # "foo.exe" is OK but "foo" is an error.
25227  #
25228  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25229  # It is also a way to make sure we got the proper file name for the real test later on.
25230  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25231  if test "x$test_shortpath" = x; then
25232    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25233$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25234    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25235  fi
25236
25237  # Call helper function which possibly converts this using DOS-style short mode.
25238  # If so, the updated path is stored in $new_path.
25239
25240  input_path="$new_path"
25241  # Check if we need to convert this using DOS-style short mode. If the path
25242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25243  # take no chances and rewrite it.
25244  # Note: m4 eats our [], so we need to use [ and ] instead.
25245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25246  if test "x$has_forbidden_chars" != x; then
25247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25251      # Going to short mode and back again did indeed matter. Since short mode is
25252      # case insensitive, let's make it lowercase to improve readability.
25253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25254      # Now convert it back to Unix-stile (cygpath)
25255      input_path=`$CYGPATH -u "$shortmode_path"`
25256      new_path="$input_path"
25257    fi
25258  fi
25259
25260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25261  if test "x$test_cygdrive_prefix" = x; then
25262    # As a simple fix, exclude /usr/bin since it's not a real path.
25263    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25265      # a path prefixed by /cygdrive for fixpath to work.
25266      new_path="$CYGWIN_ROOT_PATH$input_path"
25267    fi
25268  fi
25269
25270
25271  if test "x$path" != "x$new_path"; then
25272    BOOT_JDK="$new_path"
25273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25275  fi
25276
25277    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25278
25279  path="$BOOT_JDK"
25280  has_colon=`$ECHO $path | $GREP ^.:`
25281  new_path="$path"
25282  if test "x$has_colon" = x; then
25283    # Not in mixed or Windows style, start by that.
25284    new_path=`cmd //c echo $path`
25285  fi
25286
25287
25288  input_path="$new_path"
25289  # Check if we need to convert this using DOS-style short mode. If the path
25290  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25291  # take no chances and rewrite it.
25292  # Note: m4 eats our [], so we need to use [ and ] instead.
25293  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25294  if test "x$has_forbidden_chars" != x; then
25295    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25296    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25297  fi
25298
25299
25300  windows_path="$new_path"
25301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25302    unix_path=`$CYGPATH -u "$windows_path"`
25303    new_path="$unix_path"
25304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25306    new_path="$unix_path"
25307  fi
25308
25309  if test "x$path" != "x$new_path"; then
25310    BOOT_JDK="$new_path"
25311    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25312$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25313  fi
25314
25315  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25316  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25317
25318    else
25319      # We're on a unix platform. Hooray! :)
25320      path="$BOOT_JDK"
25321      has_space=`$ECHO "$path" | $GREP " "`
25322      if test "x$has_space" != x; then
25323        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25325        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25326      fi
25327
25328      # Use eval to expand a potential ~
25329      eval path="$path"
25330      if test ! -f "$path" && test ! -d "$path"; then
25331        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25332      fi
25333
25334      BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25335    fi
25336  fi
25337
25338            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25339$as_echo_n "checking for Boot JDK... " >&6; }
25340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25341$as_echo "$BOOT_JDK" >&6; }
25342            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25343$as_echo_n "checking Boot JDK version... " >&6; }
25344            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25345            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25346$as_echo "$BOOT_JDK_VERSION" >&6; }
25347          fi # end check jdk version
25348        fi # end check javac
25349      fi # end check java
25350    fi # end check boot jdk found
25351  fi
25352
25353
25354  # If we haven't found anything yet, we've truly lost. Give up.
25355  if test "x$BOOT_JDK_FOUND" = xno; then
25356
25357  # Print a helpful message on how to acquire the necessary build dependency.
25358  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25359  MISSING_DEPENDENCY=openjdk
25360
25361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25362    cygwin_help $MISSING_DEPENDENCY
25363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25364    msys_help $MISSING_DEPENDENCY
25365  else
25366    PKGHANDLER_COMMAND=
25367
25368    case $PKGHANDLER in
25369      apt-get)
25370        apt_help     $MISSING_DEPENDENCY ;;
25371      yum)
25372        yum_help     $MISSING_DEPENDENCY ;;
25373      port)
25374        port_help    $MISSING_DEPENDENCY ;;
25375      pkgutil)
25376        pkgutil_help $MISSING_DEPENDENCY ;;
25377      pkgadd)
25378        pkgadd_help  $MISSING_DEPENDENCY ;;
25379    esac
25380
25381    if test "x$PKGHANDLER_COMMAND" != x; then
25382      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25383    fi
25384  fi
25385
25386    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25387$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25388    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25389$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25390    as_fn_error $? "Cannot continue" "$LINENO" 5
25391  fi
25392
25393
25394
25395  # Setup tools from the Boot JDK.
25396
25397  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25398
25399  # Publish this variable in the help.
25400
25401
25402  if test "x$JAVA" = x; then
25403    # The variable is not set by user, try to locate tool using the code snippet
25404
25405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25406$as_echo_n "checking for java in Boot JDK... " >&6; }
25407      JAVA=$BOOT_JDK/bin/java
25408      if test ! -x $JAVA; then
25409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25410$as_echo "not found" >&6; }
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25412$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25413        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25414      fi
25415      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25416$as_echo "ok" >&6; }
25417
25418
25419  else
25420    # The variable is set, but is it from the command line or the environment?
25421
25422    # Try to remove the string !JAVA! from our list.
25423    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25424    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25425      # If it failed, the variable was not from the command line. Ignore it,
25426      # but warn the user (except for BASH, which is always set by the calling BASH).
25427      if test "xJAVA" != xBASH; then
25428        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25429$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25430      fi
25431      # Try to locate tool using the code snippet
25432
25433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25434$as_echo_n "checking for java in Boot JDK... " >&6; }
25435      JAVA=$BOOT_JDK/bin/java
25436      if test ! -x $JAVA; then
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25438$as_echo "not found" >&6; }
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25440$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25441        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25442      fi
25443      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25444$as_echo "ok" >&6; }
25445
25446
25447    else
25448      # If it succeeded, then it was overridden by the user. We will use it
25449      # for the tool.
25450
25451      # First remove it from the list of overridden variables, so we can test
25452      # for unknown variables in the end.
25453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25454
25455      # Check if the provided tool contains a complete path.
25456      tool_specified="$JAVA"
25457      tool_basename="${tool_specified##*/}"
25458      if test "x$tool_basename" = "x$tool_specified"; then
25459        # A command without a complete path is provided, search $PATH.
25460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25461$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25462        # Extract the first word of "$tool_basename", so it can be a program name with args.
25463set dummy $tool_basename; ac_word=$2
25464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25465$as_echo_n "checking for $ac_word... " >&6; }
25466if ${ac_cv_path_JAVA+:} false; then :
25467  $as_echo_n "(cached) " >&6
25468else
25469  case $JAVA in
25470  [\\/]* | ?:[\\/]*)
25471  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25472  ;;
25473  *)
25474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25475for as_dir in $PATH
25476do
25477  IFS=$as_save_IFS
25478  test -z "$as_dir" && as_dir=.
25479    for ac_exec_ext in '' $ac_executable_extensions; do
25480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25481    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25483    break 2
25484  fi
25485done
25486  done
25487IFS=$as_save_IFS
25488
25489  ;;
25490esac
25491fi
25492JAVA=$ac_cv_path_JAVA
25493if test -n "$JAVA"; then
25494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25495$as_echo "$JAVA" >&6; }
25496else
25497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25498$as_echo "no" >&6; }
25499fi
25500
25501
25502        if test "x$JAVA" = x; then
25503          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25504        fi
25505      else
25506        # Otherwise we believe it is a complete path. Use it as it is.
25507        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25508$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25509        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25510$as_echo_n "checking for JAVA... " >&6; }
25511        if test ! -x "$tool_specified"; then
25512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25513$as_echo "not found" >&6; }
25514          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25515        fi
25516        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25517$as_echo "$tool_specified" >&6; }
25518      fi
25519    fi
25520  fi
25521
25522
25523
25524  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25525
25526  # Publish this variable in the help.
25527
25528
25529  if test "x$JAVAC" = x; then
25530    # The variable is not set by user, try to locate tool using the code snippet
25531
25532      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25533$as_echo_n "checking for javac in Boot JDK... " >&6; }
25534      JAVAC=$BOOT_JDK/bin/javac
25535      if test ! -x $JAVAC; then
25536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25537$as_echo "not found" >&6; }
25538        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25539$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25540        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25541      fi
25542      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25543$as_echo "ok" >&6; }
25544
25545
25546  else
25547    # The variable is set, but is it from the command line or the environment?
25548
25549    # Try to remove the string !JAVAC! from our list.
25550    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25551    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25552      # If it failed, the variable was not from the command line. Ignore it,
25553      # but warn the user (except for BASH, which is always set by the calling BASH).
25554      if test "xJAVAC" != xBASH; then
25555        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25556$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25557      fi
25558      # Try to locate tool using the code snippet
25559
25560      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25561$as_echo_n "checking for javac in Boot JDK... " >&6; }
25562      JAVAC=$BOOT_JDK/bin/javac
25563      if test ! -x $JAVAC; then
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25565$as_echo "not found" >&6; }
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25567$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25568        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25569      fi
25570      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25571$as_echo "ok" >&6; }
25572
25573
25574    else
25575      # If it succeeded, then it was overridden by the user. We will use it
25576      # for the tool.
25577
25578      # First remove it from the list of overridden variables, so we can test
25579      # for unknown variables in the end.
25580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25581
25582      # Check if the provided tool contains a complete path.
25583      tool_specified="$JAVAC"
25584      tool_basename="${tool_specified##*/}"
25585      if test "x$tool_basename" = "x$tool_specified"; then
25586        # A command without a complete path is provided, search $PATH.
25587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25588$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25589        # Extract the first word of "$tool_basename", so it can be a program name with args.
25590set dummy $tool_basename; ac_word=$2
25591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25592$as_echo_n "checking for $ac_word... " >&6; }
25593if ${ac_cv_path_JAVAC+:} false; then :
25594  $as_echo_n "(cached) " >&6
25595else
25596  case $JAVAC in
25597  [\\/]* | ?:[\\/]*)
25598  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25599  ;;
25600  *)
25601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25602for as_dir in $PATH
25603do
25604  IFS=$as_save_IFS
25605  test -z "$as_dir" && as_dir=.
25606    for ac_exec_ext in '' $ac_executable_extensions; do
25607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25608    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25610    break 2
25611  fi
25612done
25613  done
25614IFS=$as_save_IFS
25615
25616  ;;
25617esac
25618fi
25619JAVAC=$ac_cv_path_JAVAC
25620if test -n "$JAVAC"; then
25621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25622$as_echo "$JAVAC" >&6; }
25623else
25624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25625$as_echo "no" >&6; }
25626fi
25627
25628
25629        if test "x$JAVAC" = x; then
25630          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25631        fi
25632      else
25633        # Otherwise we believe it is a complete path. Use it as it is.
25634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25635$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25637$as_echo_n "checking for JAVAC... " >&6; }
25638        if test ! -x "$tool_specified"; then
25639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25640$as_echo "not found" >&6; }
25641          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25642        fi
25643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25644$as_echo "$tool_specified" >&6; }
25645      fi
25646    fi
25647  fi
25648
25649
25650
25651  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25652
25653  # Publish this variable in the help.
25654
25655
25656  if test "x$JAVAH" = x; then
25657    # The variable is not set by user, try to locate tool using the code snippet
25658
25659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25660$as_echo_n "checking for javah in Boot JDK... " >&6; }
25661      JAVAH=$BOOT_JDK/bin/javah
25662      if test ! -x $JAVAH; then
25663        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25664$as_echo "not found" >&6; }
25665        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25666$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25667        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25668      fi
25669      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25670$as_echo "ok" >&6; }
25671
25672
25673  else
25674    # The variable is set, but is it from the command line or the environment?
25675
25676    # Try to remove the string !JAVAH! from our list.
25677    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25678    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25679      # If it failed, the variable was not from the command line. Ignore it,
25680      # but warn the user (except for BASH, which is always set by the calling BASH).
25681      if test "xJAVAH" != xBASH; then
25682        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25683$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25684      fi
25685      # Try to locate tool using the code snippet
25686
25687      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25688$as_echo_n "checking for javah in Boot JDK... " >&6; }
25689      JAVAH=$BOOT_JDK/bin/javah
25690      if test ! -x $JAVAH; then
25691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25692$as_echo "not found" >&6; }
25693        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25694$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25695        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25696      fi
25697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25698$as_echo "ok" >&6; }
25699
25700
25701    else
25702      # If it succeeded, then it was overridden by the user. We will use it
25703      # for the tool.
25704
25705      # First remove it from the list of overridden variables, so we can test
25706      # for unknown variables in the end.
25707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25708
25709      # Check if the provided tool contains a complete path.
25710      tool_specified="$JAVAH"
25711      tool_basename="${tool_specified##*/}"
25712      if test "x$tool_basename" = "x$tool_specified"; then
25713        # A command without a complete path is provided, search $PATH.
25714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25715$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25716        # Extract the first word of "$tool_basename", so it can be a program name with args.
25717set dummy $tool_basename; ac_word=$2
25718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25719$as_echo_n "checking for $ac_word... " >&6; }
25720if ${ac_cv_path_JAVAH+:} false; then :
25721  $as_echo_n "(cached) " >&6
25722else
25723  case $JAVAH in
25724  [\\/]* | ?:[\\/]*)
25725  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25726  ;;
25727  *)
25728  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25729for as_dir in $PATH
25730do
25731  IFS=$as_save_IFS
25732  test -z "$as_dir" && as_dir=.
25733    for ac_exec_ext in '' $ac_executable_extensions; do
25734  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25735    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25736    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25737    break 2
25738  fi
25739done
25740  done
25741IFS=$as_save_IFS
25742
25743  ;;
25744esac
25745fi
25746JAVAH=$ac_cv_path_JAVAH
25747if test -n "$JAVAH"; then
25748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25749$as_echo "$JAVAH" >&6; }
25750else
25751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25752$as_echo "no" >&6; }
25753fi
25754
25755
25756        if test "x$JAVAH" = x; then
25757          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25758        fi
25759      else
25760        # Otherwise we believe it is a complete path. Use it as it is.
25761        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25762$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25763        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25764$as_echo_n "checking for JAVAH... " >&6; }
25765        if test ! -x "$tool_specified"; then
25766          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25767$as_echo "not found" >&6; }
25768          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25769        fi
25770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25771$as_echo "$tool_specified" >&6; }
25772      fi
25773    fi
25774  fi
25775
25776
25777
25778  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25779
25780  # Publish this variable in the help.
25781
25782
25783  if test "x$JAR" = x; then
25784    # The variable is not set by user, try to locate tool using the code snippet
25785
25786      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25787$as_echo_n "checking for jar in Boot JDK... " >&6; }
25788      JAR=$BOOT_JDK/bin/jar
25789      if test ! -x $JAR; then
25790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25791$as_echo "not found" >&6; }
25792        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25793$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25794        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25795      fi
25796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25797$as_echo "ok" >&6; }
25798
25799
25800  else
25801    # The variable is set, but is it from the command line or the environment?
25802
25803    # Try to remove the string !JAR! from our list.
25804    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25805    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25806      # If it failed, the variable was not from the command line. Ignore it,
25807      # but warn the user (except for BASH, which is always set by the calling BASH).
25808      if test "xJAR" != xBASH; then
25809        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25810$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25811      fi
25812      # Try to locate tool using the code snippet
25813
25814      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25815$as_echo_n "checking for jar in Boot JDK... " >&6; }
25816      JAR=$BOOT_JDK/bin/jar
25817      if test ! -x $JAR; then
25818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25819$as_echo "not found" >&6; }
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25821$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25822        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25823      fi
25824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25825$as_echo "ok" >&6; }
25826
25827
25828    else
25829      # If it succeeded, then it was overridden by the user. We will use it
25830      # for the tool.
25831
25832      # First remove it from the list of overridden variables, so we can test
25833      # for unknown variables in the end.
25834      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25835
25836      # Check if the provided tool contains a complete path.
25837      tool_specified="$JAR"
25838      tool_basename="${tool_specified##*/}"
25839      if test "x$tool_basename" = "x$tool_specified"; then
25840        # A command without a complete path is provided, search $PATH.
25841        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25842$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25843        # Extract the first word of "$tool_basename", so it can be a program name with args.
25844set dummy $tool_basename; ac_word=$2
25845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25846$as_echo_n "checking for $ac_word... " >&6; }
25847if ${ac_cv_path_JAR+:} false; then :
25848  $as_echo_n "(cached) " >&6
25849else
25850  case $JAR in
25851  [\\/]* | ?:[\\/]*)
25852  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25853  ;;
25854  *)
25855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25856for as_dir in $PATH
25857do
25858  IFS=$as_save_IFS
25859  test -z "$as_dir" && as_dir=.
25860    for ac_exec_ext in '' $ac_executable_extensions; do
25861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25862    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25864    break 2
25865  fi
25866done
25867  done
25868IFS=$as_save_IFS
25869
25870  ;;
25871esac
25872fi
25873JAR=$ac_cv_path_JAR
25874if test -n "$JAR"; then
25875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25876$as_echo "$JAR" >&6; }
25877else
25878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25879$as_echo "no" >&6; }
25880fi
25881
25882
25883        if test "x$JAR" = x; then
25884          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25885        fi
25886      else
25887        # Otherwise we believe it is a complete path. Use it as it is.
25888        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25889$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25891$as_echo_n "checking for JAR... " >&6; }
25892        if test ! -x "$tool_specified"; then
25893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25894$as_echo "not found" >&6; }
25895          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25896        fi
25897        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25898$as_echo "$tool_specified" >&6; }
25899      fi
25900    fi
25901  fi
25902
25903
25904
25905  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25906
25907  # Publish this variable in the help.
25908
25909
25910  if test "x$NATIVE2ASCII" = x; then
25911    # The variable is not set by user, try to locate tool using the code snippet
25912
25913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25914$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25915      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25916      if test ! -x $NATIVE2ASCII; then
25917        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25918$as_echo "not found" >&6; }
25919        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25920$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25921        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25922      fi
25923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25924$as_echo "ok" >&6; }
25925
25926
25927  else
25928    # The variable is set, but is it from the command line or the environment?
25929
25930    # Try to remove the string !NATIVE2ASCII! from our list.
25931    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25932    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25933      # If it failed, the variable was not from the command line. Ignore it,
25934      # but warn the user (except for BASH, which is always set by the calling BASH).
25935      if test "xNATIVE2ASCII" != xBASH; then
25936        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25937$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25938      fi
25939      # Try to locate tool using the code snippet
25940
25941      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25942$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25943      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25944      if test ! -x $NATIVE2ASCII; then
25945        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25946$as_echo "not found" >&6; }
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25948$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25949        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25950      fi
25951      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25952$as_echo "ok" >&6; }
25953
25954
25955    else
25956      # If it succeeded, then it was overridden by the user. We will use it
25957      # for the tool.
25958
25959      # First remove it from the list of overridden variables, so we can test
25960      # for unknown variables in the end.
25961      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25962
25963      # Check if the provided tool contains a complete path.
25964      tool_specified="$NATIVE2ASCII"
25965      tool_basename="${tool_specified##*/}"
25966      if test "x$tool_basename" = "x$tool_specified"; then
25967        # A command without a complete path is provided, search $PATH.
25968        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25969$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25970        # Extract the first word of "$tool_basename", so it can be a program name with args.
25971set dummy $tool_basename; ac_word=$2
25972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25973$as_echo_n "checking for $ac_word... " >&6; }
25974if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25975  $as_echo_n "(cached) " >&6
25976else
25977  case $NATIVE2ASCII in
25978  [\\/]* | ?:[\\/]*)
25979  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25980  ;;
25981  *)
25982  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25983for as_dir in $PATH
25984do
25985  IFS=$as_save_IFS
25986  test -z "$as_dir" && as_dir=.
25987    for ac_exec_ext in '' $ac_executable_extensions; do
25988  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25989    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25990    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25991    break 2
25992  fi
25993done
25994  done
25995IFS=$as_save_IFS
25996
25997  ;;
25998esac
25999fi
26000NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26001if test -n "$NATIVE2ASCII"; then
26002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26003$as_echo "$NATIVE2ASCII" >&6; }
26004else
26005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26006$as_echo "no" >&6; }
26007fi
26008
26009
26010        if test "x$NATIVE2ASCII" = x; then
26011          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26012        fi
26013      else
26014        # Otherwise we believe it is a complete path. Use it as it is.
26015        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26016$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26017        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26018$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26019        if test ! -x "$tool_specified"; then
26020          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26021$as_echo "not found" >&6; }
26022          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26023        fi
26024        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26025$as_echo "$tool_specified" >&6; }
26026      fi
26027    fi
26028  fi
26029
26030
26031
26032  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26033
26034  # Publish this variable in the help.
26035
26036
26037  if test "x$JARSIGNER" = x; then
26038    # The variable is not set by user, try to locate tool using the code snippet
26039
26040      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26041$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26042      JARSIGNER=$BOOT_JDK/bin/jarsigner
26043      if test ! -x $JARSIGNER; then
26044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26045$as_echo "not found" >&6; }
26046        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26047$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26048        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26049      fi
26050      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26051$as_echo "ok" >&6; }
26052
26053
26054  else
26055    # The variable is set, but is it from the command line or the environment?
26056
26057    # Try to remove the string !JARSIGNER! from our list.
26058    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26059    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26060      # If it failed, the variable was not from the command line. Ignore it,
26061      # but warn the user (except for BASH, which is always set by the calling BASH).
26062      if test "xJARSIGNER" != xBASH; then
26063        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26064$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26065      fi
26066      # Try to locate tool using the code snippet
26067
26068      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26069$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26070      JARSIGNER=$BOOT_JDK/bin/jarsigner
26071      if test ! -x $JARSIGNER; then
26072        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26073$as_echo "not found" >&6; }
26074        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26075$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26076        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26077      fi
26078      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26079$as_echo "ok" >&6; }
26080
26081
26082    else
26083      # If it succeeded, then it was overridden by the user. We will use it
26084      # for the tool.
26085
26086      # First remove it from the list of overridden variables, so we can test
26087      # for unknown variables in the end.
26088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26089
26090      # Check if the provided tool contains a complete path.
26091      tool_specified="$JARSIGNER"
26092      tool_basename="${tool_specified##*/}"
26093      if test "x$tool_basename" = "x$tool_specified"; then
26094        # A command without a complete path is provided, search $PATH.
26095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26096$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26097        # Extract the first word of "$tool_basename", so it can be a program name with args.
26098set dummy $tool_basename; ac_word=$2
26099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26100$as_echo_n "checking for $ac_word... " >&6; }
26101if ${ac_cv_path_JARSIGNER+:} false; then :
26102  $as_echo_n "(cached) " >&6
26103else
26104  case $JARSIGNER in
26105  [\\/]* | ?:[\\/]*)
26106  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26107  ;;
26108  *)
26109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26110for as_dir in $PATH
26111do
26112  IFS=$as_save_IFS
26113  test -z "$as_dir" && as_dir=.
26114    for ac_exec_ext in '' $ac_executable_extensions; do
26115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26116    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26118    break 2
26119  fi
26120done
26121  done
26122IFS=$as_save_IFS
26123
26124  ;;
26125esac
26126fi
26127JARSIGNER=$ac_cv_path_JARSIGNER
26128if test -n "$JARSIGNER"; then
26129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26130$as_echo "$JARSIGNER" >&6; }
26131else
26132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26133$as_echo "no" >&6; }
26134fi
26135
26136
26137        if test "x$JARSIGNER" = x; then
26138          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26139        fi
26140      else
26141        # Otherwise we believe it is a complete path. Use it as it is.
26142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26143$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26145$as_echo_n "checking for JARSIGNER... " >&6; }
26146        if test ! -x "$tool_specified"; then
26147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26148$as_echo "not found" >&6; }
26149          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26150        fi
26151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26152$as_echo "$tool_specified" >&6; }
26153      fi
26154    fi
26155  fi
26156
26157
26158
26159  # Finally, set some other options...
26160
26161  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26162  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26163
26164
26165
26166
26167###############################################################################
26168#
26169# Configure the sources to use. We can add or override individual directories.
26170#
26171###############################################################################
26172
26173
26174  # Where are the sources. Any of these can be overridden
26175  # using --with-override-corba and the likes.
26176  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26177  CORBA_TOPDIR="$SRC_ROOT/corba"
26178  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26179  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26180  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26181  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26182  JDK_TOPDIR="$SRC_ROOT/jdk"
26183
26184
26185
26186
26187
26188
26189
26190
26191
26192
26193  ###############################################################################
26194  #
26195  # Pickup additional source for a component from outside of the source root
26196  # or override source for a component.
26197  #
26198
26199# Check whether --with-add-source-root was given.
26200if test "${with_add_source_root+set}" = set; then :
26201  withval=$with_add_source_root;
26202fi
26203
26204
26205
26206# Check whether --with-override-source-root was given.
26207if test "${with_override_source_root+set}" = set; then :
26208  withval=$with_override_source_root;
26209fi
26210
26211
26212
26213# Check whether --with-adds-and-overrides was given.
26214if test "${with_adds_and_overrides+set}" = set; then :
26215  withval=$with_adds_and_overrides;
26216fi
26217
26218
26219  if test "x$with_adds_and_overrides" != x; then
26220    with_add_source_root="$with_adds_and_overrides/adds"
26221    with_override_source_root="$with_adds_and_overrides/overrides"
26222  fi
26223
26224  if test "x$with_add_source_root" != x; then
26225    if ! test -d $with_add_source_root; then
26226      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26227    fi
26228    CURDIR="$PWD"
26229    cd "$with_add_source_root"
26230    ADD_SRC_ROOT="`pwd`"
26231    cd "$CURDIR"
26232    # Verify that the addon source root does not have any root makefiles.
26233    # If it does, then it is usually an error, prevent this.
26234    if test -f $with_add_source_root/langtools/make/Makefile; then
26235      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
26236    fi
26237    if test -f $with_add_source_root/corba/make/Makefile; then
26238      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
26239    fi
26240    if test -f $with_add_source_root/jaxp/make/Makefile; then
26241      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
26242    fi
26243    if test -f $with_add_source_root/jaxws/make/Makefile; then
26244      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
26245    fi
26246    if test -f $with_add_source_root/hotspot/make/Makefile; then
26247      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
26248    fi
26249    if test -f $with_add_source_root/nashorn/make/Makefile; then
26250      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
26251    fi
26252    if test -f $with_add_source_root/jdk/make/Makefile; then
26253      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
26254    fi
26255  fi
26256
26257
26258  if test "x$with_override_source_root" != x; then
26259    if ! test -d $with_override_source_root; then
26260      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26261    fi
26262    CURDIR="$PWD"
26263    cd "$with_override_source_root"
26264    OVERRIDE_SRC_ROOT="`pwd`"
26265    cd "$CURDIR"
26266    if test -f $with_override_source_root/langtools/make/Makefile; then
26267      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
26268    fi
26269    if test -f $with_override_source_root/corba/make/Makefile; then
26270      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
26271    fi
26272    if test -f $with_override_source_root/jaxp/make/Makefile; then
26273      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
26274    fi
26275    if test -f $with_override_source_root/jaxws/make/Makefile; then
26276      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
26277    fi
26278    if test -f $with_override_source_root/hotspot/make/Makefile; then
26279      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
26280    fi
26281    if test -f $with_override_source_root/nashorn/make/Makefile; then
26282      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
26283    fi
26284    if test -f $with_override_source_root/jdk/make/Makefile; then
26285      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
26286    fi
26287  fi
26288
26289
26290  ###############################################################################
26291  #
26292  # Override a repo completely, this is used for example when you have 3 small
26293  # development sandboxes of the langtools sources and want to avoid having 3 full
26294  # OpenJDK sources checked out on disk.
26295  #
26296  # Assuming that the 3 langtools sandboxes are located here:
26297  # /home/fredrik/sandbox1/langtools
26298  # /home/fredrik/sandbox2/langtools
26299  # /home/fredrik/sandbox3/langtools
26300  #
26301  # From the source root you create build subdirs manually:
26302  #     mkdir -p build1 build2 build3
26303  # in each build directory run:
26304  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26305  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26306  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26307  #
26308
26309
26310# Check whether --with-override-langtools was given.
26311if test "${with_override_langtools+set}" = set; then :
26312  withval=$with_override_langtools;
26313fi
26314
26315
26316
26317# Check whether --with-override-corba was given.
26318if test "${with_override_corba+set}" = set; then :
26319  withval=$with_override_corba;
26320fi
26321
26322
26323
26324# Check whether --with-override-jaxp was given.
26325if test "${with_override_jaxp+set}" = set; then :
26326  withval=$with_override_jaxp;
26327fi
26328
26329
26330
26331# Check whether --with-override-jaxws was given.
26332if test "${with_override_jaxws+set}" = set; then :
26333  withval=$with_override_jaxws;
26334fi
26335
26336
26337
26338# Check whether --with-override-hotspot was given.
26339if test "${with_override_hotspot+set}" = set; then :
26340  withval=$with_override_hotspot;
26341fi
26342
26343
26344
26345# Check whether --with-override-nashorn was given.
26346if test "${with_override_nashorn+set}" = set; then :
26347  withval=$with_override_nashorn;
26348fi
26349
26350
26351
26352# Check whether --with-override-jdk was given.
26353if test "${with_override_jdk+set}" = set; then :
26354  withval=$with_override_jdk;
26355fi
26356
26357
26358  if test "x$with_override_langtools" != x; then
26359    CURDIR="$PWD"
26360    cd "$with_override_langtools"
26361    LANGTOOLS_TOPDIR="`pwd`"
26362    cd "$CURDIR"
26363    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26364      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26365    fi
26366    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26367$as_echo_n "checking if langtools should be overridden... " >&6; }
26368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26369$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26370  fi
26371  if test "x$with_override_corba" != x; then
26372    CURDIR="$PWD"
26373    cd "$with_override_corba"
26374    CORBA_TOPDIR="`pwd`"
26375    cd "$CURDIR"
26376    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26377      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26378    fi
26379    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26380$as_echo_n "checking if corba should be overridden... " >&6; }
26381    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26382$as_echo "yes with $CORBA_TOPDIR" >&6; }
26383  fi
26384  if test "x$with_override_jaxp" != x; then
26385    CURDIR="$PWD"
26386    cd "$with_override_jaxp"
26387    JAXP_TOPDIR="`pwd`"
26388    cd "$CURDIR"
26389    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26390      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26391    fi
26392    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26393$as_echo_n "checking if jaxp should be overridden... " >&6; }
26394    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26395$as_echo "yes with $JAXP_TOPDIR" >&6; }
26396  fi
26397  if test "x$with_override_jaxws" != x; then
26398    CURDIR="$PWD"
26399    cd "$with_override_jaxws"
26400    JAXWS_TOPDIR="`pwd`"
26401    cd "$CURDIR"
26402    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26403      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26404    fi
26405    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26406$as_echo_n "checking if jaxws should be overridden... " >&6; }
26407    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26408$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26409  fi
26410  if test "x$with_override_hotspot" != x; then
26411    CURDIR="$PWD"
26412    cd "$with_override_hotspot"
26413    HOTSPOT_TOPDIR="`pwd`"
26414    cd "$CURDIR"
26415    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26416      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26417    fi
26418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26419$as_echo_n "checking if hotspot should be overridden... " >&6; }
26420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26421$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26422  fi
26423  if test "x$with_override_nashorn" != x; then
26424    CURDIR="$PWD"
26425    cd "$with_override_nashorn"
26426    NASHORN_TOPDIR="`pwd`"
26427    cd "$CURDIR"
26428    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26429      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26430    fi
26431    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26432$as_echo_n "checking if nashorn should be overridden... " >&6; }
26433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26434$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26435  fi
26436  if test "x$with_override_jdk" != x; then
26437    CURDIR="$PWD"
26438    cd "$with_override_jdk"
26439    JDK_TOPDIR="`pwd`"
26440    cd "$CURDIR"
26441    if ! test -f $JDK_TOPDIR/make/Makefile; then
26442      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26443    fi
26444    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26445$as_echo_n "checking if JDK should be overridden... " >&6; }
26446    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26447$as_echo "yes with $JDK_TOPDIR" >&6; }
26448  fi
26449
26450
26451  BUILD_OUTPUT="$OUTPUT_ROOT"
26452
26453
26454  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26455  BUILD_HOTSPOT=true
26456
26457
26458
26459# Check whether --with-import-hotspot was given.
26460if test "${with_import_hotspot+set}" = set; then :
26461  withval=$with_import_hotspot;
26462fi
26463
26464  if test "x$with_import_hotspot" != x; then
26465    CURDIR="$PWD"
26466    cd "$with_import_hotspot"
26467    HOTSPOT_DIST="`pwd`"
26468    cd "$CURDIR"
26469    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26470      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26471    fi
26472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26473$as_echo_n "checking if hotspot should be imported... " >&6; }
26474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26475$as_echo "yes from $HOTSPOT_DIST" >&6; }
26476    BUILD_HOTSPOT=false
26477  fi
26478
26479  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26480
26481
26482###############################################################################
26483#
26484# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26485# native code.
26486#
26487###############################################################################
26488
26489# First determine the toolchain type (compiler family)
26490
26491
26492# Check whether --with-toolchain-type was given.
26493if test "${with_toolchain_type+set}" = set; then :
26494  withval=$with_toolchain_type;
26495fi
26496
26497
26498  # Use indirect variable referencing
26499  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26500  VALID_TOOLCHAINS=${!toolchain_var_name}
26501
26502  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26503    if test -n "$XCODEBUILD"; then
26504      # On Mac OS X, default toolchain to clang after Xcode 5
26505      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26506      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26507      if test $? -ne 0; then
26508        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26509      fi
26510      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26511          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26512          $CUT -f 1 -d .`
26513      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26514$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26515      if test $XCODE_MAJOR_VERSION -ge 5; then
26516          DEFAULT_TOOLCHAIN="clang"
26517      else
26518          DEFAULT_TOOLCHAIN="gcc"
26519      fi
26520    else
26521      # If Xcode is not installed, but the command line tools are
26522      # then we can't run xcodebuild. On these systems we should
26523      # default to clang
26524      DEFAULT_TOOLCHAIN="clang"
26525    fi
26526  else
26527    # First toolchain type in the list is the default
26528    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26529  fi
26530
26531  if test "x$with_toolchain_type" = xlist; then
26532    # List all toolchains
26533    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26534$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26535    for toolchain in $VALID_TOOLCHAINS; do
26536      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26537      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26538      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26539    done
26540
26541    exit 0
26542  elif test "x$with_toolchain_type" != x; then
26543    # User override; check that it is valid
26544    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26545      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26546$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26547      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26548$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26549      as_fn_error $? "Cannot continue." "$LINENO" 5
26550    fi
26551    TOOLCHAIN_TYPE=$with_toolchain_type
26552  else
26553    # No flag given, use default
26554    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26555  fi
26556
26557
26558  TOOLCHAIN_CC_BINARY_clang="clang"
26559  TOOLCHAIN_CC_BINARY_gcc="gcc"
26560  TOOLCHAIN_CC_BINARY_microsoft="cl"
26561  TOOLCHAIN_CC_BINARY_solstudio="cc"
26562  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26563
26564  TOOLCHAIN_CXX_BINARY_clang="clang++"
26565  TOOLCHAIN_CXX_BINARY_gcc="g++"
26566  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26567  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26568  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26569
26570  # Use indirect variable referencing
26571  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26572  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26573  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26574  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26575  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26576  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26577
26578
26579  # Define filename patterns
26580  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26581    LIBRARY_PREFIX=
26582    SHARED_LIBRARY_SUFFIX='.dll'
26583    STATIC_LIBRARY_SUFFIX='.lib'
26584    SHARED_LIBRARY='$1.dll'
26585    STATIC_LIBRARY='$1.lib'
26586    OBJ_SUFFIX='.obj'
26587    EXE_SUFFIX='.exe'
26588  else
26589    LIBRARY_PREFIX=lib
26590    SHARED_LIBRARY_SUFFIX='.so'
26591    STATIC_LIBRARY_SUFFIX='.a'
26592    SHARED_LIBRARY='lib$1.so'
26593    STATIC_LIBRARY='lib$1.a'
26594    OBJ_SUFFIX='.o'
26595    EXE_SUFFIX=''
26596    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26597      SHARED_LIBRARY='lib$1.dylib'
26598      SHARED_LIBRARY_SUFFIX='.dylib'
26599    fi
26600  fi
26601
26602
26603
26604
26605
26606
26607
26608
26609
26610
26611  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26612    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26613$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26614  else
26615    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26616$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26617  fi
26618
26619
26620# Then detect the actual binaries needed
26621
26622  # FIXME: Is this needed?
26623  ac_ext=cpp
26624ac_cpp='$CXXCPP $CPPFLAGS'
26625ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26626ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26627ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26628
26629
26630  # Store the CFLAGS etc passed to the configure script.
26631  ORG_CFLAGS="$CFLAGS"
26632  ORG_CXXFLAGS="$CXXFLAGS"
26633
26634  # On Windows, we need to detect the visual studio installation first.
26635  # This will change the PATH, but we need to keep that new PATH even
26636  # after toolchain detection is done, since the compiler (on x86) uses
26637  # it for DLL resolution in runtime.
26638  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26639
26640  # Store path to cygwin link.exe to help excluding it when searching for
26641  # VS linker. This must be done before changing the PATH when looking for VS.
26642  # Extract the first word of "link", so it can be a program name with args.
26643set dummy link; ac_word=$2
26644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26645$as_echo_n "checking for $ac_word... " >&6; }
26646if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26647  $as_echo_n "(cached) " >&6
26648else
26649  case $CYGWIN_LINK in
26650  [\\/]* | ?:[\\/]*)
26651  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26652  ;;
26653  *)
26654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26655for as_dir in $PATH
26656do
26657  IFS=$as_save_IFS
26658  test -z "$as_dir" && as_dir=.
26659    for ac_exec_ext in '' $ac_executable_extensions; do
26660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26661    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26663    break 2
26664  fi
26665done
26666  done
26667IFS=$as_save_IFS
26668
26669  ;;
26670esac
26671fi
26672CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26673if test -n "$CYGWIN_LINK"; then
26674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26675$as_echo "$CYGWIN_LINK" >&6; }
26676else
26677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26678$as_echo "no" >&6; }
26679fi
26680
26681
26682  if test "x$CYGWIN_LINK" != x; then
26683    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26684$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26685    "$CYGWIN_LINK" --version > /dev/null
26686    if test $? -eq 0 ; then
26687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26688$as_echo "yes" >&6; }
26689    else
26690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26691$as_echo "no" >&6; }
26692      # This might be the VS linker. Don't exclude it later on.
26693      CYGWIN_LINK=""
26694    fi
26695  fi
26696
26697  # First-hand choice is to locate and run the vsvars bat file.
26698
26699
26700# Check whether --with-toolchain-version was given.
26701if test "${with_toolchain_version+set}" = set; then :
26702  withval=$with_toolchain_version;
26703fi
26704
26705
26706  if test "x$with_toolchain_version" = xlist; then
26707    # List all toolchains
26708    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
26709$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
26710    for version in $VALID_VS_VERSIONS; do
26711      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
26712      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
26713    done
26714
26715    exit 0
26716  elif test "x$with_toolchain_version" != x; then
26717    # User override; check that it is valid
26718    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
26719      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
26720$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
26721      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
26722$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
26723      as_fn_error $? "Cannot continue." "$LINENO" 5
26724    fi
26725    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
26726  else
26727    # No flag given, use default
26728    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
26729  fi
26730
26731  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
26732
26733  VS_VERSION="$VS_VERSION"
26734  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
26735  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
26736  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
26737  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
26738
26739  # When using --with-tools-dir, assume it points to the correct and default
26740  # version of Visual Studio or that --with-toolchain-version was also set.
26741  if test "x$with_tools_dir" != x; then
26742
26743  if test "x$VS_ENV_CMD" = x; then
26744    VS_VERSION="${VS_VERSION}"
26745    VS_BASE="$with_tools_dir/../.."
26746    METHOD="--with-tools-dir"
26747
26748    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26749      VCVARSFILE="vc/bin/vcvars32.bat"
26750    else
26751      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26752    fi
26753
26754
26755  windows_path="$VS_BASE"
26756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26757    unix_path=`$CYGPATH -u "$windows_path"`
26758    VS_BASE="$unix_path"
26759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26761    VS_BASE="$unix_path"
26762  fi
26763
26764    if test -d "$VS_BASE"; then
26765      if test -f "$VS_BASE/$VCVARSFILE"; then
26766        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26767$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26768        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26769        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26770        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26771        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26772      else
26773        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26774$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26775        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26776$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26777      fi
26778    fi
26779  fi
26780
26781
26782  if test "x$VS_ENV_CMD" = x; then
26783    VS_VERSION="${VS_VERSION}"
26784    VS_BASE="$with_tools_dir/../../.."
26785    METHOD="--with-tools-dir"
26786
26787    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26788      VCVARSFILE="vc/bin/vcvars32.bat"
26789    else
26790      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26791    fi
26792
26793
26794  windows_path="$VS_BASE"
26795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26796    unix_path=`$CYGPATH -u "$windows_path"`
26797    VS_BASE="$unix_path"
26798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26800    VS_BASE="$unix_path"
26801  fi
26802
26803    if test -d "$VS_BASE"; then
26804      if test -f "$VS_BASE/$VCVARSFILE"; then
26805        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26806$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26807        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26808        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26809        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26810        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26811      else
26812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26813$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26815$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26816      fi
26817    fi
26818  fi
26819
26820    if test "x$VS_ENV_CMD" = x; then
26821      # Having specified an argument which is incorrect will produce an instant failure;
26822      # we should not go on looking
26823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
26824$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
26825      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
26826$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
26827      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
26828$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
26829      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26830    fi
26831  fi
26832
26833  VS_ENV_CMD=""
26834  VS_ENV_ARGS=""
26835
26836  if test "x$VS_COMNTOOLS" != x; then
26837
26838  if test "x$VS_ENV_CMD" = x; then
26839    VS_VERSION="${VS_VERSION}"
26840    VS_BASE="$VS_COMNTOOLS/../.."
26841    METHOD="$VS_COMNTOOLS_VAR variable"
26842
26843    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26844      VCVARSFILE="vc/bin/vcvars32.bat"
26845    else
26846      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26847    fi
26848
26849
26850  windows_path="$VS_BASE"
26851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26852    unix_path=`$CYGPATH -u "$windows_path"`
26853    VS_BASE="$unix_path"
26854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26856    VS_BASE="$unix_path"
26857  fi
26858
26859    if test -d "$VS_BASE"; then
26860      if test -f "$VS_BASE/$VCVARSFILE"; then
26861        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26862$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26863        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26864        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26865        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26866        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26867      else
26868        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26869$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26870        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26871$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26872      fi
26873    fi
26874  fi
26875
26876  fi
26877  if test "x$PROGRAMFILES" != x; then
26878
26879  if test "x$VS_ENV_CMD" = x; then
26880    VS_VERSION="${VS_VERSION}"
26881    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
26882    METHOD="well-known name"
26883
26884    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26885      VCVARSFILE="vc/bin/vcvars32.bat"
26886    else
26887      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26888    fi
26889
26890
26891  windows_path="$VS_BASE"
26892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26893    unix_path=`$CYGPATH -u "$windows_path"`
26894    VS_BASE="$unix_path"
26895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26897    VS_BASE="$unix_path"
26898  fi
26899
26900    if test -d "$VS_BASE"; then
26901      if test -f "$VS_BASE/$VCVARSFILE"; then
26902        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26903$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26904        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26905        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26906        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26907        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26908      else
26909        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26910$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26911        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26912$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26913      fi
26914    fi
26915  fi
26916
26917  fi
26918  # Work around the insanely named ProgramFiles(x86) env variable
26919  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
26920  if test "x$PROGRAMFILES_X86" != x; then
26921
26922  if test "x$VS_ENV_CMD" = x; then
26923    VS_VERSION="${VS_VERSION}"
26924    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
26925    METHOD="well-known name"
26926
26927    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26928      VCVARSFILE="vc/bin/vcvars32.bat"
26929    else
26930      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26931    fi
26932
26933
26934  windows_path="$VS_BASE"
26935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26936    unix_path=`$CYGPATH -u "$windows_path"`
26937    VS_BASE="$unix_path"
26938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26940    VS_BASE="$unix_path"
26941  fi
26942
26943    if test -d "$VS_BASE"; then
26944      if test -f "$VS_BASE/$VCVARSFILE"; then
26945        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26946$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26947        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26948        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26949        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26950        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26951      else
26952        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26953$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26954        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26955$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26956      fi
26957    fi
26958  fi
26959
26960  fi
26961
26962  if test "x$VS_ENV_CMD" = x; then
26963    VS_VERSION="${VS_VERSION}"
26964    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
26965    METHOD="well-known name"
26966
26967    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26968      VCVARSFILE="vc/bin/vcvars32.bat"
26969    else
26970      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26971    fi
26972
26973
26974  windows_path="$VS_BASE"
26975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26976    unix_path=`$CYGPATH -u "$windows_path"`
26977    VS_BASE="$unix_path"
26978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26980    VS_BASE="$unix_path"
26981  fi
26982
26983    if test -d "$VS_BASE"; then
26984      if test -f "$VS_BASE/$VCVARSFILE"; then
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26986$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26987        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
26988        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
26989        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
26990        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
26991      else
26992        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
26993$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
26994        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26995$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26996      fi
26997    fi
26998  fi
26999
27000
27001  if test "x$VS_ENV_CMD" = x; then
27002    VS_VERSION="${VS_VERSION}"
27003    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
27004    METHOD="well-known name"
27005
27006    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27007      VCVARSFILE="vc/bin/vcvars32.bat"
27008    else
27009      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
27010    fi
27011
27012
27013  windows_path="$VS_BASE"
27014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27015    unix_path=`$CYGPATH -u "$windows_path"`
27016    VS_BASE="$unix_path"
27017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27019    VS_BASE="$unix_path"
27020  fi
27021
27022    if test -d "$VS_BASE"; then
27023      if test -f "$VS_BASE/$VCVARSFILE"; then
27024        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27025$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27026        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
27027        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27028        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
27029        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
27030      else
27031        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
27032$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
27033        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27034$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27035      fi
27036    fi
27037  fi
27038
27039
27040  if test "x$SDK_INSTALL_DIR" != x; then
27041    if test "x$ProgramW6432" != x; then
27042
27043  if test "x$VS_ENV_CMD" = x; then
27044    VS_VERSION="${VS_VERSION}"
27045    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
27046    METHOD="well-known name"
27047
27048  windows_path="$WIN_SDK_BASE"
27049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27050    unix_path=`$CYGPATH -u "$windows_path"`
27051    WIN_SDK_BASE="$unix_path"
27052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27054    WIN_SDK_BASE="$unix_path"
27055  fi
27056
27057    if test -d "$WIN_SDK_BASE"; then
27058      # There have been cases of partial or broken SDK installations. A missing
27059      # lib dir is not going to work.
27060      if test ! -d "$WIN_SDK_BASE/lib"; then
27061        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27062$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27063        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27064$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27065      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27066        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27067$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27068        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27069        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27070          VS_ENV_ARGS="/x86"
27071        else
27072          VS_ENV_ARGS="/x64"
27073        fi
27074        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27075        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27076        # TODO: improve detection for other versions of SDK
27077        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27078      else
27079        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27080$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27081        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27082$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27083      fi
27084    fi
27085  fi
27086
27087    fi
27088    if test "x$PROGRAMW6432" != x; then
27089
27090  if test "x$VS_ENV_CMD" = x; then
27091    VS_VERSION="${VS_VERSION}"
27092    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
27093    METHOD="well-known name"
27094
27095  windows_path="$WIN_SDK_BASE"
27096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27097    unix_path=`$CYGPATH -u "$windows_path"`
27098    WIN_SDK_BASE="$unix_path"
27099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27101    WIN_SDK_BASE="$unix_path"
27102  fi
27103
27104    if test -d "$WIN_SDK_BASE"; then
27105      # There have been cases of partial or broken SDK installations. A missing
27106      # lib dir is not going to work.
27107      if test ! -d "$WIN_SDK_BASE/lib"; then
27108        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27109$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27110        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27111$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27112      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27114$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27115        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27116        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27117          VS_ENV_ARGS="/x86"
27118        else
27119          VS_ENV_ARGS="/x64"
27120        fi
27121        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27122        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27123        # TODO: improve detection for other versions of SDK
27124        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27125      else
27126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27127$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27128        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27129$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27130      fi
27131    fi
27132  fi
27133
27134    fi
27135    if test "x$PROGRAMFILES" != x; then
27136
27137  if test "x$VS_ENV_CMD" = x; then
27138    VS_VERSION="${VS_VERSION}"
27139    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
27140    METHOD="well-known name"
27141
27142  windows_path="$WIN_SDK_BASE"
27143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27144    unix_path=`$CYGPATH -u "$windows_path"`
27145    WIN_SDK_BASE="$unix_path"
27146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27148    WIN_SDK_BASE="$unix_path"
27149  fi
27150
27151    if test -d "$WIN_SDK_BASE"; then
27152      # There have been cases of partial or broken SDK installations. A missing
27153      # lib dir is not going to work.
27154      if test ! -d "$WIN_SDK_BASE/lib"; then
27155        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27156$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27157        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27158$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27159      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27160        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27161$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27162        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27163        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27164          VS_ENV_ARGS="/x86"
27165        else
27166          VS_ENV_ARGS="/x64"
27167        fi
27168        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27169        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27170        # TODO: improve detection for other versions of SDK
27171        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27172      else
27173        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27174$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27175        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27176$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27177      fi
27178    fi
27179  fi
27180
27181    fi
27182
27183  if test "x$VS_ENV_CMD" = x; then
27184    VS_VERSION="${VS_VERSION}"
27185    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
27186    METHOD="well-known name"
27187
27188  windows_path="$WIN_SDK_BASE"
27189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27190    unix_path=`$CYGPATH -u "$windows_path"`
27191    WIN_SDK_BASE="$unix_path"
27192  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27193    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27194    WIN_SDK_BASE="$unix_path"
27195  fi
27196
27197    if test -d "$WIN_SDK_BASE"; then
27198      # There have been cases of partial or broken SDK installations. A missing
27199      # lib dir is not going to work.
27200      if test ! -d "$WIN_SDK_BASE/lib"; then
27201        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27202$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27203        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27204$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27205      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27206        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27207$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27208        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27209        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27210          VS_ENV_ARGS="/x86"
27211        else
27212          VS_ENV_ARGS="/x64"
27213        fi
27214        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27215        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27216        # TODO: improve detection for other versions of SDK
27217        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27218      else
27219        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27220$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27221        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27222$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27223      fi
27224    fi
27225  fi
27226
27227
27228  if test "x$VS_ENV_CMD" = x; then
27229    VS_VERSION="${VS_VERSION}"
27230    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
27231    METHOD="well-known name"
27232
27233  windows_path="$WIN_SDK_BASE"
27234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27235    unix_path=`$CYGPATH -u "$windows_path"`
27236    WIN_SDK_BASE="$unix_path"
27237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27239    WIN_SDK_BASE="$unix_path"
27240  fi
27241
27242    if test -d "$WIN_SDK_BASE"; then
27243      # There have been cases of partial or broken SDK installations. A missing
27244      # lib dir is not going to work.
27245      if test ! -d "$WIN_SDK_BASE/lib"; then
27246        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27247$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27248        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27249$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27250      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
27251        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27252$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27253        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
27254        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27255          VS_ENV_ARGS="/x86"
27256        else
27257          VS_ENV_ARGS="/x64"
27258        fi
27259        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
27260        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
27261        # TODO: improve detection for other versions of SDK
27262        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
27263      else
27264        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27265$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27266        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27267$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27268      fi
27269    fi
27270  fi
27271
27272  fi
27273
27274    if test "x$VS_ENV_CMD" != x; then
27275      TOOLCHAIN_VERSION=$VS_VERSION
27276      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
27277      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
27278      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
27279      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
27280      # The rest of the variables are already evaled while probing
27281      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
27282$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
27283      break
27284    fi
27285  done
27286
27287
27288  if test "x$VS_ENV_CMD" != x; then
27289    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27290
27291  # Only process if variable expands to non-empty
27292
27293  if test "x$VS_ENV_CMD" != x; then
27294    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27295
27296  # First separate the path from the arguments. This will split at the first
27297  # space.
27298  complete="$VS_ENV_CMD"
27299  path="${complete%% *}"
27300  tmp="$complete EOL"
27301  arguments="${tmp#* }"
27302
27303  # Input might be given as Windows format, start by converting to
27304  # unix format.
27305  new_path=`$CYGPATH -u "$path"`
27306
27307  # Now try to locate executable using which
27308  new_path=`$WHICH "$new_path" 2> /dev/null`
27309  # bat and cmd files are not always considered executable in cygwin causing which
27310  # to not find them
27311  if test "x$new_path" = x \
27312      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27313      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27314    new_path=`$CYGPATH -u "$path"`
27315  fi
27316  if test "x$new_path" = x; then
27317    # Oops. Which didn't find the executable.
27318    # The splitting of arguments from the executable at a space might have been incorrect,
27319    # since paths with space are more likely in Windows. Give it another try with the whole
27320    # argument.
27321    path="$complete"
27322    arguments="EOL"
27323    new_path=`$CYGPATH -u "$path"`
27324    new_path=`$WHICH "$new_path" 2> /dev/null`
27325    # bat and cmd files are not always considered executable in cygwin causing which
27326    # to not find them
27327    if test "x$new_path" = x \
27328        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27329        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27330      new_path=`$CYGPATH -u "$path"`
27331    fi
27332    if test "x$new_path" = x; then
27333      # It's still not found. Now this is an unrecoverable error.
27334      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27335$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27336      has_space=`$ECHO "$complete" | $GREP " "`
27337      if test "x$has_space" != x; then
27338        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27339$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27340      fi
27341      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27342    fi
27343  fi
27344
27345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27348  # "foo.exe" is OK but "foo" is an error.
27349  #
27350  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27351  # It is also a way to make sure we got the proper file name for the real test later on.
27352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27353  if test "x$test_shortpath" = x; then
27354    # Short path failed, file does not exist as specified.
27355    # Try adding .exe or .cmd
27356    if test -f "${new_path}.exe"; then
27357      input_to_shortpath="${new_path}.exe"
27358    elif test -f "${new_path}.cmd"; then
27359      input_to_shortpath="${new_path}.cmd"
27360    else
27361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27362$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27363      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27364$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27365      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27366    fi
27367  else
27368    input_to_shortpath="$new_path"
27369  fi
27370
27371  # Call helper function which possibly converts this using DOS-style short mode.
27372  # If so, the updated path is stored in $new_path.
27373  new_path="$input_to_shortpath"
27374
27375  input_path="$input_to_shortpath"
27376  # Check if we need to convert this using DOS-style short mode. If the path
27377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27378  # take no chances and rewrite it.
27379  # Note: m4 eats our [], so we need to use [ and ] instead.
27380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27381  if test "x$has_forbidden_chars" != x; then
27382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27383    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27384    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27385    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27386      # Going to short mode and back again did indeed matter. Since short mode is
27387      # case insensitive, let's make it lowercase to improve readability.
27388      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27389      # Now convert it back to Unix-stile (cygpath)
27390      input_path=`$CYGPATH -u "$shortmode_path"`
27391      new_path="$input_path"
27392    fi
27393  fi
27394
27395  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27396  if test "x$test_cygdrive_prefix" = x; then
27397    # As a simple fix, exclude /usr/bin since it's not a real path.
27398    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27399      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27400      # a path prefixed by /cygdrive for fixpath to work.
27401      new_path="$CYGWIN_ROOT_PATH$input_path"
27402    fi
27403  fi
27404
27405  # remove trailing .exe if any
27406  new_path="${new_path/%.exe/}"
27407
27408    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27409
27410  # First separate the path from the arguments. This will split at the first
27411  # space.
27412  complete="$VS_ENV_CMD"
27413  path="${complete%% *}"
27414  tmp="$complete EOL"
27415  arguments="${tmp#* }"
27416
27417  # Input might be given as Windows format, start by converting to
27418  # unix format.
27419  new_path="$path"
27420
27421  windows_path="$new_path"
27422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27423    unix_path=`$CYGPATH -u "$windows_path"`
27424    new_path="$unix_path"
27425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27427    new_path="$unix_path"
27428  fi
27429
27430
27431  # Now try to locate executable using which
27432  new_path=`$WHICH "$new_path" 2> /dev/null`
27433
27434  if test "x$new_path" = x; then
27435    # Oops. Which didn't find the executable.
27436    # The splitting of arguments from the executable at a space might have been incorrect,
27437    # since paths with space are more likely in Windows. Give it another try with the whole
27438    # argument.
27439    path="$complete"
27440    arguments="EOL"
27441    new_path="$path"
27442
27443  windows_path="$new_path"
27444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27445    unix_path=`$CYGPATH -u "$windows_path"`
27446    new_path="$unix_path"
27447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27449    new_path="$unix_path"
27450  fi
27451
27452
27453    new_path=`$WHICH "$new_path" 2> /dev/null`
27454    # bat and cmd files are not always considered executable in MSYS causing which
27455    # to not find them
27456    if test "x$new_path" = x \
27457        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27458        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27459      new_path="$path"
27460
27461  windows_path="$new_path"
27462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27463    unix_path=`$CYGPATH -u "$windows_path"`
27464    new_path="$unix_path"
27465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27467    new_path="$unix_path"
27468  fi
27469
27470    fi
27471
27472    if test "x$new_path" = x; then
27473      # It's still not found. Now this is an unrecoverable error.
27474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27475$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27476      has_space=`$ECHO "$complete" | $GREP " "`
27477      if test "x$has_space" != x; then
27478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27480      fi
27481      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27482    fi
27483  fi
27484
27485  # Now new_path has a complete unix path to the binary
27486  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27487    # Keep paths in /bin as-is, but remove trailing .exe if any
27488    new_path="${new_path/%.exe/}"
27489    # Do not save /bin paths to all_fixpath_prefixes!
27490  else
27491    # Not in mixed or Windows style, start by that.
27492    new_path=`cmd //c echo $new_path`
27493
27494  input_path="$new_path"
27495  # Check if we need to convert this using DOS-style short mode. If the path
27496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27497  # take no chances and rewrite it.
27498  # Note: m4 eats our [], so we need to use [ and ] instead.
27499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27500  if test "x$has_forbidden_chars" != x; then
27501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27502    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27503  fi
27504
27505    # Output is in $new_path
27506
27507  windows_path="$new_path"
27508  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27509    unix_path=`$CYGPATH -u "$windows_path"`
27510    new_path="$unix_path"
27511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27512    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27513    new_path="$unix_path"
27514  fi
27515
27516    # remove trailing .exe if any
27517    new_path="${new_path/%.exe/}"
27518
27519    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27520    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27521  fi
27522
27523    else
27524      # We're on a unix platform. Hooray! :)
27525      # First separate the path from the arguments. This will split at the first
27526      # space.
27527      complete="$VS_ENV_CMD"
27528      path="${complete%% *}"
27529      tmp="$complete EOL"
27530      arguments="${tmp#* }"
27531
27532      # Cannot rely on the command "which" here since it doesn't always work.
27533      is_absolute_path=`$ECHO "$path" | $GREP ^/`
27534      if test -z "$is_absolute_path"; then
27535        # Path to executable is not absolute. Find it.
27536        IFS_save="$IFS"
27537        IFS=:
27538        for p in $PATH; do
27539          if test -f "$p/$path" && test -x "$p/$path"; then
27540            new_path="$p/$path"
27541            break
27542          fi
27543        done
27544        IFS="$IFS_save"
27545      else
27546        # This is an absolute path, we can use it without further modifications.
27547        new_path="$path"
27548      fi
27549
27550      if test "x$new_path" = x; then
27551        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27552$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27553        has_space=`$ECHO "$complete" | $GREP " "`
27554        if test "x$has_space" != x; then
27555          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27556$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27557        fi
27558        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27559      fi
27560    fi
27561
27562    # Now join together the path and the arguments once again
27563    if test "x$arguments" != xEOL; then
27564      new_complete="$new_path ${arguments% *}"
27565    else
27566      new_complete="$new_path"
27567    fi
27568
27569    if test "x$complete" != "x$new_complete"; then
27570      VS_ENV_CMD="$new_complete"
27571      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27572$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27573    fi
27574  fi
27575
27576
27577    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27578    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27579$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27580
27581    # We need to create a couple of temporary files.
27582    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27583    $MKDIR -p $VS_ENV_TMP_DIR
27584
27585    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27586    # Instead create a shell script which will set the relevant variables when run.
27587    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27588
27589  unix_path="$WINPATH_VS_ENV_CMD"
27590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27591    windows_path=`$CYGPATH -m "$unix_path"`
27592    WINPATH_VS_ENV_CMD="$windows_path"
27593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27594    windows_path=`cmd //c echo $unix_path`
27595    WINPATH_VS_ENV_CMD="$windows_path"
27596  fi
27597
27598    WINPATH_BASH="$BASH"
27599
27600  unix_path="$WINPATH_BASH"
27601  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27602    windows_path=`$CYGPATH -m "$unix_path"`
27603    WINPATH_BASH="$windows_path"
27604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27605    windows_path=`cmd //c echo $unix_path`
27606    WINPATH_BASH="$windows_path"
27607  fi
27608
27609
27610    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27611    # script (executable by bash) that will setup the important variables.
27612    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27613    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27614    # This will end up something like:
27615    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27616    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27617    # These will end up something like:
27618    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27619    # The trailing space for everyone except PATH is no typo, but is needed due
27620    # to trailing \ in the Windows paths. These will be stripped later.
27621    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27622    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27623    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27624    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> 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    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27627
27628    # Now execute the newly created bat file.
27629    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27630    # Change directory so we don't need to mess with Windows paths in redirects.
27631    cd $VS_ENV_TMP_DIR
27632    cmd /c extract-vs-env.bat | $CAT
27633    cd $CURDIR
27634
27635    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27636      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27637$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27638      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27639$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27640      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27641$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27642      as_fn_error $? "Cannot continue" "$LINENO" 5
27643    fi
27644
27645    # Now set all paths and other env variables. This will allow the rest of
27646    # the configure script to find and run the compiler in the proper way.
27647    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27648$as_echo "$as_me: Setting extracted environment variables" >&6;}
27649    . $VS_ENV_TMP_DIR/set-vs-env.sh
27650    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27651    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27652  else
27653    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27654    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27655$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27656  fi
27657
27658  # At this point, we should have correct variables in the environment, or we can't continue.
27659  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27660$as_echo_n "checking for Visual Studio variables... " >&6; }
27661
27662  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27663    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27665$as_echo "present but broken" >&6; }
27666      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27667    else
27668      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27669$as_echo "ok" >&6; }
27670      # Remove any trailing "\" ";" and " " from the variables.
27671      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
27672      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
27673      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27674      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27675      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27676      # Remove any paths containing # (typically F#) as that messes up make. This
27677      # is needed if visual studio was installed with F# support.
27678      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27679
27680
27681
27682
27683
27684      # Convert VS_INCLUDE into SYSROOT_CFLAGS
27685      OLDIFS="$IFS"
27686      IFS=";"
27687      for i in $VS_INCLUDE; do
27688        ipath=$i
27689        # Only process non-empty elements
27690        if test "x$ipath" != x; then
27691          IFS="$OLDIFS"
27692          # Check that directory exists before calling fixup_path
27693          testpath=$ipath
27694
27695  windows_path="$testpath"
27696  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27697    unix_path=`$CYGPATH -u "$windows_path"`
27698    testpath="$unix_path"
27699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27700    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27701    testpath="$unix_path"
27702  fi
27703
27704          if test -d "$testpath"; then
27705
27706  # Only process if variable expands to non-empty
27707
27708  if test "x$ipath" != x; then
27709    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27710
27711  # Input might be given as Windows format, start by converting to
27712  # unix format.
27713  path="$ipath"
27714  new_path=`$CYGPATH -u "$path"`
27715
27716  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27717  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27718  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27719  # "foo.exe" is OK but "foo" is an error.
27720  #
27721  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27722  # It is also a way to make sure we got the proper file name for the real test later on.
27723  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27724  if test "x$test_shortpath" = x; then
27725    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27726$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27727    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
27728  fi
27729
27730  # Call helper function which possibly converts this using DOS-style short mode.
27731  # If so, the updated path is stored in $new_path.
27732
27733  input_path="$new_path"
27734  # Check if we need to convert this using DOS-style short mode. If the path
27735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27736  # take no chances and rewrite it.
27737  # Note: m4 eats our [], so we need to use [ and ] instead.
27738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27739  if test "x$has_forbidden_chars" != x; then
27740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27744      # Going to short mode and back again did indeed matter. Since short mode is
27745      # case insensitive, let's make it lowercase to improve readability.
27746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27747      # Now convert it back to Unix-stile (cygpath)
27748      input_path=`$CYGPATH -u "$shortmode_path"`
27749      new_path="$input_path"
27750    fi
27751  fi
27752
27753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27754  if test "x$test_cygdrive_prefix" = x; then
27755    # As a simple fix, exclude /usr/bin since it's not a real path.
27756    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27758      # a path prefixed by /cygdrive for fixpath to work.
27759      new_path="$CYGWIN_ROOT_PATH$input_path"
27760    fi
27761  fi
27762
27763
27764  if test "x$path" != "x$new_path"; then
27765    ipath="$new_path"
27766    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27767$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27768  fi
27769
27770    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27771
27772  path="$ipath"
27773  has_colon=`$ECHO $path | $GREP ^.:`
27774  new_path="$path"
27775  if test "x$has_colon" = x; then
27776    # Not in mixed or Windows style, start by that.
27777    new_path=`cmd //c echo $path`
27778  fi
27779
27780
27781  input_path="$new_path"
27782  # Check if we need to convert this using DOS-style short mode. If the path
27783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27784  # take no chances and rewrite it.
27785  # Note: m4 eats our [], so we need to use [ and ] instead.
27786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27787  if test "x$has_forbidden_chars" != x; then
27788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27790  fi
27791
27792
27793  windows_path="$new_path"
27794  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27795    unix_path=`$CYGPATH -u "$windows_path"`
27796    new_path="$unix_path"
27797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27798    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27799    new_path="$unix_path"
27800  fi
27801
27802  if test "x$path" != "x$new_path"; then
27803    ipath="$new_path"
27804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
27805$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
27806  fi
27807
27808  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27809  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27810
27811    else
27812      # We're on a unix platform. Hooray! :)
27813      path="$ipath"
27814      has_space=`$ECHO "$path" | $GREP " "`
27815      if test "x$has_space" != x; then
27816        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
27817$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
27818        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27819      fi
27820
27821      # Use eval to expand a potential ~
27822      eval path="$path"
27823      if test ! -f "$path" && test ! -d "$path"; then
27824        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
27825      fi
27826
27827      ipath="`cd "$path"; $THEPWDCMD -L`"
27828    fi
27829  fi
27830
27831            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
27832          fi
27833          IFS=";"
27834        fi
27835      done
27836      # Convert VS_LIB into SYSROOT_LDFLAGS
27837      for i in $VS_LIB; do
27838        libpath=$i
27839        # Only process non-empty elements
27840        if test "x$libpath" != x; then
27841          IFS="$OLDIFS"
27842          # Check that directory exists before calling fixup_path
27843          testpath=$libpath
27844
27845  windows_path="$testpath"
27846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27847    unix_path=`$CYGPATH -u "$windows_path"`
27848    testpath="$unix_path"
27849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27851    testpath="$unix_path"
27852  fi
27853
27854          if test -d "$testpath"; then
27855
27856  # Only process if variable expands to non-empty
27857
27858  if test "x$libpath" != x; then
27859    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27860
27861  # Input might be given as Windows format, start by converting to
27862  # unix format.
27863  path="$libpath"
27864  new_path=`$CYGPATH -u "$path"`
27865
27866  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27867  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27868  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27869  # "foo.exe" is OK but "foo" is an error.
27870  #
27871  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27872  # It is also a way to make sure we got the proper file name for the real test later on.
27873  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27874  if test "x$test_shortpath" = x; then
27875    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27876$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27877    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
27878  fi
27879
27880  # Call helper function which possibly converts this using DOS-style short mode.
27881  # If so, the updated path is stored in $new_path.
27882
27883  input_path="$new_path"
27884  # Check if we need to convert this using DOS-style short mode. If the path
27885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27886  # take no chances and rewrite it.
27887  # Note: m4 eats our [], so we need to use [ and ] instead.
27888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27889  if test "x$has_forbidden_chars" != x; then
27890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27894      # Going to short mode and back again did indeed matter. Since short mode is
27895      # case insensitive, let's make it lowercase to improve readability.
27896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27897      # Now convert it back to Unix-stile (cygpath)
27898      input_path=`$CYGPATH -u "$shortmode_path"`
27899      new_path="$input_path"
27900    fi
27901  fi
27902
27903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27904  if test "x$test_cygdrive_prefix" = x; then
27905    # As a simple fix, exclude /usr/bin since it's not a real path.
27906    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27908      # a path prefixed by /cygdrive for fixpath to work.
27909      new_path="$CYGWIN_ROOT_PATH$input_path"
27910    fi
27911  fi
27912
27913
27914  if test "x$path" != "x$new_path"; then
27915    libpath="$new_path"
27916    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27917$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27918  fi
27919
27920    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27921
27922  path="$libpath"
27923  has_colon=`$ECHO $path | $GREP ^.:`
27924  new_path="$path"
27925  if test "x$has_colon" = x; then
27926    # Not in mixed or Windows style, start by that.
27927    new_path=`cmd //c echo $path`
27928  fi
27929
27930
27931  input_path="$new_path"
27932  # Check if we need to convert this using DOS-style short mode. If the path
27933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27934  # take no chances and rewrite it.
27935  # Note: m4 eats our [], so we need to use [ and ] instead.
27936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27937  if test "x$has_forbidden_chars" != x; then
27938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27939    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27940  fi
27941
27942
27943  windows_path="$new_path"
27944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27945    unix_path=`$CYGPATH -u "$windows_path"`
27946    new_path="$unix_path"
27947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27949    new_path="$unix_path"
27950  fi
27951
27952  if test "x$path" != "x$new_path"; then
27953    libpath="$new_path"
27954    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
27955$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
27956  fi
27957
27958  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27959  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27960
27961    else
27962      # We're on a unix platform. Hooray! :)
27963      path="$libpath"
27964      has_space=`$ECHO "$path" | $GREP " "`
27965      if test "x$has_space" != x; then
27966        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
27967$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
27968        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27969      fi
27970
27971      # Use eval to expand a potential ~
27972      eval path="$path"
27973      if test ! -f "$path" && test ! -d "$path"; then
27974        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
27975      fi
27976
27977      libpath="`cd "$path"; $THEPWDCMD -L`"
27978    fi
27979  fi
27980
27981            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
27982          fi
27983          IFS=";"
27984        fi
27985      done
27986      IFS="$OLDIFS"
27987    fi
27988  else
27989    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27990$as_echo "not found" >&6; }
27991
27992    if test "x$VS_ENV_CMD" = x; then
27993      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27994$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27995      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27996$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27997    else
27998      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27999$as_echo "$as_me: Running the extraction script failed." >&6;}
28000    fi
28001    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
28002$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
28003    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
28004$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
28005    as_fn_error $? "Cannot continue" "$LINENO" 5
28006  fi
28007
28008    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
28009    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
28010    PATH="$VS_PATH"
28011    # The microsoft toolchain also requires INCLUDE and LIB to be set.
28012    export INCLUDE="$VS_INCLUDE"
28013    export LIB="$VS_LIB"
28014  fi
28015
28016  # autoconf magic only relies on PATH, so update it if tools dir is specified
28017  OLD_PATH="$PATH"
28018
28019  # For solaris we really need solaris tools, and not the GNU equivalent.
28020  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
28021  # so add that to path before starting to probe.
28022  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
28023  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
28024    PATH="/usr/ccs/bin:$PATH"
28025  fi
28026
28027  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
28028  # override all other locations.
28029  if test "x$TOOLCHAIN_PATH" != x; then
28030    PATH=$TOOLCHAIN_PATH:$PATH
28031  fi
28032
28033
28034  #
28035  # Setup the compilers (CC and CXX)
28036  #
28037
28038  COMPILER_NAME=C
28039  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
28040
28041  if test "x$CC" != x; then
28042    # User has supplied compiler name already, always let that override.
28043    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
28044$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
28045    if test "x`basename $CC`" = "x$CC"; then
28046      # A command without a complete path is provided, search $PATH.
28047
28048      for ac_prog in $CC
28049do
28050  # Extract the first word of "$ac_prog", so it can be a program name with args.
28051set dummy $ac_prog; ac_word=$2
28052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28053$as_echo_n "checking for $ac_word... " >&6; }
28054if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28055  $as_echo_n "(cached) " >&6
28056else
28057  case $POTENTIAL_CC in
28058  [\\/]* | ?:[\\/]*)
28059  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28060  ;;
28061  *)
28062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28063for as_dir in $PATH
28064do
28065  IFS=$as_save_IFS
28066  test -z "$as_dir" && as_dir=.
28067    for ac_exec_ext in '' $ac_executable_extensions; do
28068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28069    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28071    break 2
28072  fi
28073done
28074  done
28075IFS=$as_save_IFS
28076
28077  ;;
28078esac
28079fi
28080POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28081if test -n "$POTENTIAL_CC"; then
28082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28083$as_echo "$POTENTIAL_CC" >&6; }
28084else
28085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28086$as_echo "no" >&6; }
28087fi
28088
28089
28090  test -n "$POTENTIAL_CC" && break
28091done
28092
28093      if test "x$POTENTIAL_CC" != x; then
28094        CC=$POTENTIAL_CC
28095      else
28096        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
28097      fi
28098    else
28099      # Otherwise it might already be a complete path
28100      if test ! -x "$CC"; then
28101        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
28102      fi
28103    fi
28104  else
28105    # No user supplied value. Locate compiler ourselves.
28106
28107    # If we are cross compiling, assume cross compilation tools follows the
28108    # cross compilation standard where they are prefixed with the autoconf
28109    # standard name for the target. For example the binary
28110    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
28111    # If we are not cross compiling, then the default compiler name will be
28112    # used.
28113
28114    CC=
28115    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
28116    # before checking the rest of the PATH.
28117    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
28118    # step, this should not be necessary.
28119    if test -n "$TOOLCHAIN_PATH"; then
28120      PATH_save="$PATH"
28121      PATH="$TOOLCHAIN_PATH"
28122      for ac_prog in $SEARCH_LIST
28123do
28124  # Extract the first word of "$ac_prog", so it can be a program name with args.
28125set dummy $ac_prog; ac_word=$2
28126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28127$as_echo_n "checking for $ac_word... " >&6; }
28128if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
28129  $as_echo_n "(cached) " >&6
28130else
28131  case $TOOLCHAIN_PATH_CC in
28132  [\\/]* | ?:[\\/]*)
28133  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
28134  ;;
28135  *)
28136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28137for as_dir in $PATH
28138do
28139  IFS=$as_save_IFS
28140  test -z "$as_dir" && as_dir=.
28141    for ac_exec_ext in '' $ac_executable_extensions; do
28142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28143    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
28144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28145    break 2
28146  fi
28147done
28148  done
28149IFS=$as_save_IFS
28150
28151  ;;
28152esac
28153fi
28154TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
28155if test -n "$TOOLCHAIN_PATH_CC"; then
28156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
28157$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
28158else
28159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28160$as_echo "no" >&6; }
28161fi
28162
28163
28164  test -n "$TOOLCHAIN_PATH_CC" && break
28165done
28166
28167      CC=$TOOLCHAIN_PATH_CC
28168      PATH="$PATH_save"
28169    fi
28170
28171    # AC_PATH_PROGS can't be run multiple times with the same variable,
28172    # so create a new name for this run.
28173    if test "x$CC" = x; then
28174      for ac_prog in $SEARCH_LIST
28175do
28176  # Extract the first word of "$ac_prog", so it can be a program name with args.
28177set dummy $ac_prog; ac_word=$2
28178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28179$as_echo_n "checking for $ac_word... " >&6; }
28180if ${ac_cv_path_POTENTIAL_CC+:} false; then :
28181  $as_echo_n "(cached) " >&6
28182else
28183  case $POTENTIAL_CC in
28184  [\\/]* | ?:[\\/]*)
28185  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
28186  ;;
28187  *)
28188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28189for as_dir in $PATH
28190do
28191  IFS=$as_save_IFS
28192  test -z "$as_dir" && as_dir=.
28193    for ac_exec_ext in '' $ac_executable_extensions; do
28194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28195    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
28196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28197    break 2
28198  fi
28199done
28200  done
28201IFS=$as_save_IFS
28202
28203  ;;
28204esac
28205fi
28206POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
28207if test -n "$POTENTIAL_CC"; then
28208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
28209$as_echo "$POTENTIAL_CC" >&6; }
28210else
28211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28212$as_echo "no" >&6; }
28213fi
28214
28215
28216  test -n "$POTENTIAL_CC" && break
28217done
28218
28219      CC=$POTENTIAL_CC
28220    fi
28221
28222    if test "x$CC" = x; then
28223
28224  # Print a helpful message on how to acquire the necessary build dependency.
28225  # devkit is the help tag: freetype, cups, pulse, alsa etc
28226  MISSING_DEPENDENCY=devkit
28227
28228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28229    cygwin_help $MISSING_DEPENDENCY
28230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28231    msys_help $MISSING_DEPENDENCY
28232  else
28233    PKGHANDLER_COMMAND=
28234
28235    case $PKGHANDLER in
28236      apt-get)
28237        apt_help     $MISSING_DEPENDENCY ;;
28238      yum)
28239        yum_help     $MISSING_DEPENDENCY ;;
28240      port)
28241        port_help    $MISSING_DEPENDENCY ;;
28242      pkgutil)
28243        pkgutil_help $MISSING_DEPENDENCY ;;
28244      pkgadd)
28245        pkgadd_help  $MISSING_DEPENDENCY ;;
28246    esac
28247
28248    if test "x$PKGHANDLER_COMMAND" != x; then
28249      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
28250    fi
28251  fi
28252
28253      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
28254    fi
28255  fi
28256
28257  # Now we have a compiler binary in CC. Make sure it's okay.
28258
28259  # Only process if variable expands to non-empty
28260
28261  if test "x$CC" != x; then
28262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28263
28264  # First separate the path from the arguments. This will split at the first
28265  # space.
28266  complete="$CC"
28267  path="${complete%% *}"
28268  tmp="$complete EOL"
28269  arguments="${tmp#* }"
28270
28271  # Input might be given as Windows format, start by converting to
28272  # unix format.
28273  new_path=`$CYGPATH -u "$path"`
28274
28275  # Now try to locate executable using which
28276  new_path=`$WHICH "$new_path" 2> /dev/null`
28277  # bat and cmd files are not always considered executable in cygwin causing which
28278  # to not find them
28279  if test "x$new_path" = x \
28280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28282    new_path=`$CYGPATH -u "$path"`
28283  fi
28284  if test "x$new_path" = x; then
28285    # Oops. Which didn't find the executable.
28286    # The splitting of arguments from the executable at a space might have been incorrect,
28287    # since paths with space are more likely in Windows. Give it another try with the whole
28288    # argument.
28289    path="$complete"
28290    arguments="EOL"
28291    new_path=`$CYGPATH -u "$path"`
28292    new_path=`$WHICH "$new_path" 2> /dev/null`
28293    # bat and cmd files are not always considered executable in cygwin causing which
28294    # to not find them
28295    if test "x$new_path" = x \
28296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28298      new_path=`$CYGPATH -u "$path"`
28299    fi
28300    if test "x$new_path" = x; then
28301      # It's still not found. Now this is an unrecoverable error.
28302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28303$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28304      has_space=`$ECHO "$complete" | $GREP " "`
28305      if test "x$has_space" != x; then
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28308      fi
28309      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28310    fi
28311  fi
28312
28313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28316  # "foo.exe" is OK but "foo" is an error.
28317  #
28318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28319  # It is also a way to make sure we got the proper file name for the real test later on.
28320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28321  if test "x$test_shortpath" = x; then
28322    # Short path failed, file does not exist as specified.
28323    # Try adding .exe or .cmd
28324    if test -f "${new_path}.exe"; then
28325      input_to_shortpath="${new_path}.exe"
28326    elif test -f "${new_path}.cmd"; then
28327      input_to_shortpath="${new_path}.cmd"
28328    else
28329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28330$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28333      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28334    fi
28335  else
28336    input_to_shortpath="$new_path"
28337  fi
28338
28339  # Call helper function which possibly converts this using DOS-style short mode.
28340  # If so, the updated path is stored in $new_path.
28341  new_path="$input_to_shortpath"
28342
28343  input_path="$input_to_shortpath"
28344  # Check if we need to convert this using DOS-style short mode. If the path
28345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28346  # take no chances and rewrite it.
28347  # Note: m4 eats our [], so we need to use [ and ] instead.
28348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28349  if test "x$has_forbidden_chars" != x; then
28350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28354      # Going to short mode and back again did indeed matter. Since short mode is
28355      # case insensitive, let's make it lowercase to improve readability.
28356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28357      # Now convert it back to Unix-stile (cygpath)
28358      input_path=`$CYGPATH -u "$shortmode_path"`
28359      new_path="$input_path"
28360    fi
28361  fi
28362
28363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28364  if test "x$test_cygdrive_prefix" = x; then
28365    # As a simple fix, exclude /usr/bin since it's not a real path.
28366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28368      # a path prefixed by /cygdrive for fixpath to work.
28369      new_path="$CYGWIN_ROOT_PATH$input_path"
28370    fi
28371  fi
28372
28373  # remove trailing .exe if any
28374  new_path="${new_path/%.exe/}"
28375
28376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28377
28378  # First separate the path from the arguments. This will split at the first
28379  # space.
28380  complete="$CC"
28381  path="${complete%% *}"
28382  tmp="$complete EOL"
28383  arguments="${tmp#* }"
28384
28385  # Input might be given as Windows format, start by converting to
28386  # unix format.
28387  new_path="$path"
28388
28389  windows_path="$new_path"
28390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28391    unix_path=`$CYGPATH -u "$windows_path"`
28392    new_path="$unix_path"
28393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28395    new_path="$unix_path"
28396  fi
28397
28398
28399  # Now try to locate executable using which
28400  new_path=`$WHICH "$new_path" 2> /dev/null`
28401
28402  if test "x$new_path" = x; then
28403    # Oops. Which didn't find the executable.
28404    # The splitting of arguments from the executable at a space might have been incorrect,
28405    # since paths with space are more likely in Windows. Give it another try with the whole
28406    # argument.
28407    path="$complete"
28408    arguments="EOL"
28409    new_path="$path"
28410
28411  windows_path="$new_path"
28412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28413    unix_path=`$CYGPATH -u "$windows_path"`
28414    new_path="$unix_path"
28415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28417    new_path="$unix_path"
28418  fi
28419
28420
28421    new_path=`$WHICH "$new_path" 2> /dev/null`
28422    # bat and cmd files are not always considered executable in MSYS causing which
28423    # to not find them
28424    if test "x$new_path" = x \
28425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28427      new_path="$path"
28428
28429  windows_path="$new_path"
28430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28431    unix_path=`$CYGPATH -u "$windows_path"`
28432    new_path="$unix_path"
28433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28435    new_path="$unix_path"
28436  fi
28437
28438    fi
28439
28440    if test "x$new_path" = x; then
28441      # It's still not found. Now this is an unrecoverable error.
28442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28443$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28444      has_space=`$ECHO "$complete" | $GREP " "`
28445      if test "x$has_space" != x; then
28446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28448      fi
28449      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28450    fi
28451  fi
28452
28453  # Now new_path has a complete unix path to the binary
28454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28455    # Keep paths in /bin as-is, but remove trailing .exe if any
28456    new_path="${new_path/%.exe/}"
28457    # Do not save /bin paths to all_fixpath_prefixes!
28458  else
28459    # Not in mixed or Windows style, start by that.
28460    new_path=`cmd //c echo $new_path`
28461
28462  input_path="$new_path"
28463  # Check if we need to convert this using DOS-style short mode. If the path
28464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28465  # take no chances and rewrite it.
28466  # Note: m4 eats our [], so we need to use [ and ] instead.
28467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28468  if test "x$has_forbidden_chars" != x; then
28469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28471  fi
28472
28473    # Output is in $new_path
28474
28475  windows_path="$new_path"
28476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28477    unix_path=`$CYGPATH -u "$windows_path"`
28478    new_path="$unix_path"
28479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28481    new_path="$unix_path"
28482  fi
28483
28484    # remove trailing .exe if any
28485    new_path="${new_path/%.exe/}"
28486
28487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28489  fi
28490
28491    else
28492      # We're on a unix platform. Hooray! :)
28493      # First separate the path from the arguments. This will split at the first
28494      # space.
28495      complete="$CC"
28496      path="${complete%% *}"
28497      tmp="$complete EOL"
28498      arguments="${tmp#* }"
28499
28500      # Cannot rely on the command "which" here since it doesn't always work.
28501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28502      if test -z "$is_absolute_path"; then
28503        # Path to executable is not absolute. Find it.
28504        IFS_save="$IFS"
28505        IFS=:
28506        for p in $PATH; do
28507          if test -f "$p/$path" && test -x "$p/$path"; then
28508            new_path="$p/$path"
28509            break
28510          fi
28511        done
28512        IFS="$IFS_save"
28513      else
28514        # This is an absolute path, we can use it without further modifications.
28515        new_path="$path"
28516      fi
28517
28518      if test "x$new_path" = x; then
28519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28520$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28521        has_space=`$ECHO "$complete" | $GREP " "`
28522        if test "x$has_space" != x; then
28523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28525        fi
28526        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28527      fi
28528    fi
28529
28530    # Now join together the path and the arguments once again
28531    if test "x$arguments" != xEOL; then
28532      new_complete="$new_path ${arguments% *}"
28533    else
28534      new_complete="$new_path"
28535    fi
28536
28537    if test "x$complete" != "x$new_complete"; then
28538      CC="$new_complete"
28539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28540$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28541    fi
28542  fi
28543
28544  TEST_COMPILER="$CC"
28545  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28546  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28547  if test "x$OPENJDK_BUILD_OS" != xaix; then
28548    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28550$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28551
28552  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28553    # Follow a chain of symbolic links. Use readlink
28554    # where it exists, else fall back to horribly
28555    # complicated shell code.
28556    if test "x$READLINK_TESTED" != yes; then
28557      # On MacOSX there is a readlink tool with a different
28558      # purpose than the GNU readlink tool. Check the found readlink.
28559      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28560      if test "x$ISGNU" = x; then
28561        # A readlink that we do not know how to use.
28562        # Are there other non-GNU readlinks out there?
28563        READLINK_TESTED=yes
28564        READLINK=
28565      fi
28566    fi
28567
28568    if test "x$READLINK" != x; then
28569      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28570    else
28571      # Save the current directory for restoring afterwards
28572      STARTDIR=$PWD
28573      COUNTER=0
28574      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28575      sym_link_file=`$BASENAME $TEST_COMPILER`
28576      cd $sym_link_dir
28577      # Use -P flag to resolve symlinks in directories.
28578      cd `$THEPWDCMD -P`
28579      sym_link_dir=`$THEPWDCMD -P`
28580      # Resolve file symlinks
28581      while test $COUNTER -lt 20; do
28582        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28583        if test "x$ISLINK" == x; then
28584          # This is not a symbolic link! We are done!
28585          break
28586        fi
28587        # Again resolve directory symlinks since the target of the just found
28588        # link could be in a different directory
28589        cd `$DIRNAME $ISLINK`
28590        sym_link_dir=`$THEPWDCMD -P`
28591        sym_link_file=`$BASENAME $ISLINK`
28592        let COUNTER=COUNTER+1
28593      done
28594      cd $STARTDIR
28595      TEST_COMPILER=$sym_link_dir/$sym_link_file
28596    fi
28597  fi
28598
28599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28600$as_echo "$TEST_COMPILER" >&6; }
28601  fi
28602  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28603$as_echo_n "checking if CC is disguised ccache... " >&6; }
28604
28605  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28606  if test "x$COMPILER_BASENAME" = "xccache"; then
28607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28608$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28609    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28610    # We want to control ccache invocation ourselves, so ignore this cc and try
28611    # searching again.
28612
28613    # Remove the path to the fake ccache cc from the PATH
28614    RETRY_COMPILER_SAVED_PATH="$PATH"
28615    COMPILER_DIRNAME=`$DIRNAME $CC`
28616    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28617
28618    # Try again looking for our compiler
28619    if test -n "$ac_tool_prefix"; then
28620  for ac_prog in $TOOLCHAIN_CC_BINARY
28621  do
28622    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28623set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28625$as_echo_n "checking for $ac_word... " >&6; }
28626if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28627  $as_echo_n "(cached) " >&6
28628else
28629  if test -n "$PROPER_COMPILER_CC"; then
28630  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28631else
28632as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28633for as_dir in $PATH
28634do
28635  IFS=$as_save_IFS
28636  test -z "$as_dir" && as_dir=.
28637    for ac_exec_ext in '' $ac_executable_extensions; do
28638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28639    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28641    break 2
28642  fi
28643done
28644  done
28645IFS=$as_save_IFS
28646
28647fi
28648fi
28649PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28650if test -n "$PROPER_COMPILER_CC"; then
28651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28652$as_echo "$PROPER_COMPILER_CC" >&6; }
28653else
28654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28655$as_echo "no" >&6; }
28656fi
28657
28658
28659    test -n "$PROPER_COMPILER_CC" && break
28660  done
28661fi
28662if test -z "$PROPER_COMPILER_CC"; then
28663  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28664  for ac_prog in $TOOLCHAIN_CC_BINARY
28665do
28666  # Extract the first word of "$ac_prog", so it can be a program name with args.
28667set dummy $ac_prog; ac_word=$2
28668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28669$as_echo_n "checking for $ac_word... " >&6; }
28670if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28671  $as_echo_n "(cached) " >&6
28672else
28673  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28674  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28675else
28676as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28677for as_dir in $PATH
28678do
28679  IFS=$as_save_IFS
28680  test -z "$as_dir" && as_dir=.
28681    for ac_exec_ext in '' $ac_executable_extensions; do
28682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28683    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28685    break 2
28686  fi
28687done
28688  done
28689IFS=$as_save_IFS
28690
28691fi
28692fi
28693ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28694if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28696$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28697else
28698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28699$as_echo "no" >&6; }
28700fi
28701
28702
28703  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28704done
28705
28706  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28707    PROPER_COMPILER_CC=""
28708  else
28709    case $cross_compiling:$ac_tool_warned in
28710yes:)
28711{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28712$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28713ac_tool_warned=yes ;;
28714esac
28715    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28716  fi
28717fi
28718
28719
28720  # Only process if variable expands to non-empty
28721
28722  if test "x$PROPER_COMPILER_CC" != x; then
28723    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28724
28725  # First separate the path from the arguments. This will split at the first
28726  # space.
28727  complete="$PROPER_COMPILER_CC"
28728  path="${complete%% *}"
28729  tmp="$complete EOL"
28730  arguments="${tmp#* }"
28731
28732  # Input might be given as Windows format, start by converting to
28733  # unix format.
28734  new_path=`$CYGPATH -u "$path"`
28735
28736  # Now try to locate executable using which
28737  new_path=`$WHICH "$new_path" 2> /dev/null`
28738  # bat and cmd files are not always considered executable in cygwin causing which
28739  # to not find them
28740  if test "x$new_path" = x \
28741      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28742      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28743    new_path=`$CYGPATH -u "$path"`
28744  fi
28745  if test "x$new_path" = x; then
28746    # Oops. Which didn't find the executable.
28747    # The splitting of arguments from the executable at a space might have been incorrect,
28748    # since paths with space are more likely in Windows. Give it another try with the whole
28749    # argument.
28750    path="$complete"
28751    arguments="EOL"
28752    new_path=`$CYGPATH -u "$path"`
28753    new_path=`$WHICH "$new_path" 2> /dev/null`
28754    # bat and cmd files are not always considered executable in cygwin causing which
28755    # to not find them
28756    if test "x$new_path" = x \
28757        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28758        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28759      new_path=`$CYGPATH -u "$path"`
28760    fi
28761    if test "x$new_path" = x; then
28762      # It's still not found. Now this is an unrecoverable error.
28763      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28764$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28765      has_space=`$ECHO "$complete" | $GREP " "`
28766      if test "x$has_space" != x; then
28767        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28768$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28769      fi
28770      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28771    fi
28772  fi
28773
28774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28777  # "foo.exe" is OK but "foo" is an error.
28778  #
28779  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28780  # It is also a way to make sure we got the proper file name for the real test later on.
28781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28782  if test "x$test_shortpath" = x; then
28783    # Short path failed, file does not exist as specified.
28784    # Try adding .exe or .cmd
28785    if test -f "${new_path}.exe"; then
28786      input_to_shortpath="${new_path}.exe"
28787    elif test -f "${new_path}.cmd"; then
28788      input_to_shortpath="${new_path}.cmd"
28789    else
28790      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28791$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28792      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28793$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28794      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28795    fi
28796  else
28797    input_to_shortpath="$new_path"
28798  fi
28799
28800  # Call helper function which possibly converts this using DOS-style short mode.
28801  # If so, the updated path is stored in $new_path.
28802  new_path="$input_to_shortpath"
28803
28804  input_path="$input_to_shortpath"
28805  # Check if we need to convert this using DOS-style short mode. If the path
28806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28807  # take no chances and rewrite it.
28808  # Note: m4 eats our [], so we need to use [ and ] instead.
28809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28810  if test "x$has_forbidden_chars" != x; then
28811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28815      # Going to short mode and back again did indeed matter. Since short mode is
28816      # case insensitive, let's make it lowercase to improve readability.
28817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28818      # Now convert it back to Unix-stile (cygpath)
28819      input_path=`$CYGPATH -u "$shortmode_path"`
28820      new_path="$input_path"
28821    fi
28822  fi
28823
28824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28825  if test "x$test_cygdrive_prefix" = x; then
28826    # As a simple fix, exclude /usr/bin since it's not a real path.
28827    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28829      # a path prefixed by /cygdrive for fixpath to work.
28830      new_path="$CYGWIN_ROOT_PATH$input_path"
28831    fi
28832  fi
28833
28834  # remove trailing .exe if any
28835  new_path="${new_path/%.exe/}"
28836
28837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28838
28839  # First separate the path from the arguments. This will split at the first
28840  # space.
28841  complete="$PROPER_COMPILER_CC"
28842  path="${complete%% *}"
28843  tmp="$complete EOL"
28844  arguments="${tmp#* }"
28845
28846  # Input might be given as Windows format, start by converting to
28847  # unix format.
28848  new_path="$path"
28849
28850  windows_path="$new_path"
28851  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28852    unix_path=`$CYGPATH -u "$windows_path"`
28853    new_path="$unix_path"
28854  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28855    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28856    new_path="$unix_path"
28857  fi
28858
28859
28860  # Now try to locate executable using which
28861  new_path=`$WHICH "$new_path" 2> /dev/null`
28862
28863  if test "x$new_path" = x; then
28864    # Oops. Which didn't find the executable.
28865    # The splitting of arguments from the executable at a space might have been incorrect,
28866    # since paths with space are more likely in Windows. Give it another try with the whole
28867    # argument.
28868    path="$complete"
28869    arguments="EOL"
28870    new_path="$path"
28871
28872  windows_path="$new_path"
28873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28874    unix_path=`$CYGPATH -u "$windows_path"`
28875    new_path="$unix_path"
28876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28877    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28878    new_path="$unix_path"
28879  fi
28880
28881
28882    new_path=`$WHICH "$new_path" 2> /dev/null`
28883    # bat and cmd files are not always considered executable in MSYS causing which
28884    # to not find them
28885    if test "x$new_path" = x \
28886        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28887        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28888      new_path="$path"
28889
28890  windows_path="$new_path"
28891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28892    unix_path=`$CYGPATH -u "$windows_path"`
28893    new_path="$unix_path"
28894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28896    new_path="$unix_path"
28897  fi
28898
28899    fi
28900
28901    if test "x$new_path" = x; then
28902      # It's still not found. Now this is an unrecoverable error.
28903      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28904$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28905      has_space=`$ECHO "$complete" | $GREP " "`
28906      if test "x$has_space" != x; then
28907        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28908$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28909      fi
28910      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28911    fi
28912  fi
28913
28914  # Now new_path has a complete unix path to the binary
28915  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28916    # Keep paths in /bin as-is, but remove trailing .exe if any
28917    new_path="${new_path/%.exe/}"
28918    # Do not save /bin paths to all_fixpath_prefixes!
28919  else
28920    # Not in mixed or Windows style, start by that.
28921    new_path=`cmd //c echo $new_path`
28922
28923  input_path="$new_path"
28924  # Check if we need to convert this using DOS-style short mode. If the path
28925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28926  # take no chances and rewrite it.
28927  # Note: m4 eats our [], so we need to use [ and ] instead.
28928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28929  if test "x$has_forbidden_chars" != x; then
28930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28932  fi
28933
28934    # Output is in $new_path
28935
28936  windows_path="$new_path"
28937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28938    unix_path=`$CYGPATH -u "$windows_path"`
28939    new_path="$unix_path"
28940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28942    new_path="$unix_path"
28943  fi
28944
28945    # remove trailing .exe if any
28946    new_path="${new_path/%.exe/}"
28947
28948    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28949    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28950  fi
28951
28952    else
28953      # We're on a unix platform. Hooray! :)
28954      # First separate the path from the arguments. This will split at the first
28955      # space.
28956      complete="$PROPER_COMPILER_CC"
28957      path="${complete%% *}"
28958      tmp="$complete EOL"
28959      arguments="${tmp#* }"
28960
28961      # Cannot rely on the command "which" here since it doesn't always work.
28962      is_absolute_path=`$ECHO "$path" | $GREP ^/`
28963      if test -z "$is_absolute_path"; then
28964        # Path to executable is not absolute. Find it.
28965        IFS_save="$IFS"
28966        IFS=:
28967        for p in $PATH; do
28968          if test -f "$p/$path" && test -x "$p/$path"; then
28969            new_path="$p/$path"
28970            break
28971          fi
28972        done
28973        IFS="$IFS_save"
28974      else
28975        # This is an absolute path, we can use it without further modifications.
28976        new_path="$path"
28977      fi
28978
28979      if test "x$new_path" = x; then
28980        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28981$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28982        has_space=`$ECHO "$complete" | $GREP " "`
28983        if test "x$has_space" != x; then
28984          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28985$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28986        fi
28987        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28988      fi
28989    fi
28990
28991    # Now join together the path and the arguments once again
28992    if test "x$arguments" != xEOL; then
28993      new_complete="$new_path ${arguments% *}"
28994    else
28995      new_complete="$new_path"
28996    fi
28997
28998    if test "x$complete" != "x$new_complete"; then
28999      PROPER_COMPILER_CC="$new_complete"
29000      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
29001$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
29002    fi
29003  fi
29004
29005    PATH="$RETRY_COMPILER_SAVED_PATH"
29006
29007    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
29008$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
29009
29010  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29011    # Follow a chain of symbolic links. Use readlink
29012    # where it exists, else fall back to horribly
29013    # complicated shell code.
29014    if test "x$READLINK_TESTED" != yes; then
29015      # On MacOSX there is a readlink tool with a different
29016      # purpose than the GNU readlink tool. Check the found readlink.
29017      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29018      if test "x$ISGNU" = x; then
29019        # A readlink that we do not know how to use.
29020        # Are there other non-GNU readlinks out there?
29021        READLINK_TESTED=yes
29022        READLINK=
29023      fi
29024    fi
29025
29026    if test "x$READLINK" != x; then
29027      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
29028    else
29029      # Save the current directory for restoring afterwards
29030      STARTDIR=$PWD
29031      COUNTER=0
29032      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
29033      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
29034      cd $sym_link_dir
29035      # Use -P flag to resolve symlinks in directories.
29036      cd `$THEPWDCMD -P`
29037      sym_link_dir=`$THEPWDCMD -P`
29038      # Resolve file symlinks
29039      while test $COUNTER -lt 20; do
29040        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29041        if test "x$ISLINK" == x; then
29042          # This is not a symbolic link! We are done!
29043          break
29044        fi
29045        # Again resolve directory symlinks since the target of the just found
29046        # link could be in a different directory
29047        cd `$DIRNAME $ISLINK`
29048        sym_link_dir=`$THEPWDCMD -P`
29049        sym_link_file=`$BASENAME $ISLINK`
29050        let COUNTER=COUNTER+1
29051      done
29052      cd $STARTDIR
29053      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
29054    fi
29055  fi
29056
29057    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
29058$as_echo "$PROPER_COMPILER_CC" >&6; }
29059    CC="$PROPER_COMPILER_CC"
29060  else
29061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
29062$as_echo "no, keeping CC" >&6; }
29063  fi
29064
29065
29066  COMPILER=$CC
29067  COMPILER_NAME=$COMPILER_NAME
29068
29069  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
29070    # cc -V output typically looks like
29071    #     cc: Sun C 5.12 Linux_i386 2011/11/16
29072    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
29073    # Check that this is likely to be the Solaris Studio cc.
29074    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
29075    if test $? -ne 0; then
29076      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29077      { $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
29078$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29079      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29080$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29081      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29082$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29083      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29084    fi
29085    # Remove usage instructions (if present), and
29086    # collapse compiler output into a single line
29087    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29088        $SED -e 's/ *[Uu]sage:.*//'`
29089    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29090        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
29091  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
29092    # xlc -qversion output typically looks like
29093    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
29094    #     Version: 11.01.0000.0015
29095    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
29096    # Check that this is likely to be the IBM XL C compiler.
29097    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
29098    if test $? -ne 0; then
29099      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29100      { $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
29101$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29102      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29103$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29104      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
29105$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
29106      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29107    fi
29108    # Collapse compiler output into a single line
29109    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29110    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29111        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
29112  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
29113    # There is no specific version flag, but all output starts with a version string.
29114    # First line typically looks something like:
29115    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
29116    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
29117    # Check that this is likely to be Microsoft CL.EXE.
29118    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
29119    if test $? -ne 0; then
29120      { $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
29121$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29122      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29123$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29124      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29125    fi
29126    # Collapse compiler output into a single line
29127    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29128    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29129        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
29130  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
29131    # gcc --version output typically looks like
29132    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
29133    #     Copyright (C) 2013 Free Software Foundation, Inc.
29134    #     This is free software; see the source for copying conditions.  There is NO
29135    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
29136    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29137    # Check that this is likely to be GCC.
29138    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
29139    if test $? -ne 0; then
29140      { $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
29141$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29142      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
29143$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
29144      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29145    fi
29146    # Remove Copyright and legalese from version string, and
29147    # collapse into a single line
29148    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
29149        $SED -e 's/ *Copyright .*//'`
29150    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29151        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
29152  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
29153    # clang --version output typically looks like
29154    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
29155    #    clang version 3.3 (tags/RELEASE_33/final)
29156    # or
29157    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
29158    #    Target: x86_64-pc-linux-gnu
29159    #    Thread model: posix
29160    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
29161    # Check that this is likely to be clang
29162    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
29163    if test $? -ne 0; then
29164      { $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
29165$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
29166      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
29167$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
29168      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
29169    fi
29170    # Collapse compiler output into a single line
29171    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
29172    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
29173        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
29174  else
29175      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
29176  fi
29177  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
29178  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
29179  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
29180  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
29181
29182  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
29183$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
29184
29185
29186  # Now that we have resolved CC ourself, let autoconf have its go at it
29187  ac_ext=c
29188ac_cpp='$CPP $CPPFLAGS'
29189ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29190ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29191ac_compiler_gnu=$ac_cv_c_compiler_gnu
29192if test -n "$ac_tool_prefix"; then
29193  for ac_prog in $CC
29194  do
29195    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29196set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29197{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29198$as_echo_n "checking for $ac_word... " >&6; }
29199if ${ac_cv_prog_CC+:} false; then :
29200  $as_echo_n "(cached) " >&6
29201else
29202  if test -n "$CC"; then
29203  ac_cv_prog_CC="$CC" # Let the user override the test.
29204else
29205as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29206for as_dir in $PATH
29207do
29208  IFS=$as_save_IFS
29209  test -z "$as_dir" && as_dir=.
29210    for ac_exec_ext in '' $ac_executable_extensions; do
29211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29212    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
29213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29214    break 2
29215  fi
29216done
29217  done
29218IFS=$as_save_IFS
29219
29220fi
29221fi
29222CC=$ac_cv_prog_CC
29223if test -n "$CC"; then
29224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
29225$as_echo "$CC" >&6; }
29226else
29227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29228$as_echo "no" >&6; }
29229fi
29230
29231
29232    test -n "$CC" && break
29233  done
29234fi
29235if test -z "$CC"; then
29236  ac_ct_CC=$CC
29237  for ac_prog in $CC
29238do
29239  # Extract the first word of "$ac_prog", so it can be a program name with args.
29240set dummy $ac_prog; ac_word=$2
29241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29242$as_echo_n "checking for $ac_word... " >&6; }
29243if ${ac_cv_prog_ac_ct_CC+:} false; then :
29244  $as_echo_n "(cached) " >&6
29245else
29246  if test -n "$ac_ct_CC"; then
29247  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
29248else
29249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29250for as_dir in $PATH
29251do
29252  IFS=$as_save_IFS
29253  test -z "$as_dir" && as_dir=.
29254    for ac_exec_ext in '' $ac_executable_extensions; do
29255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29256    ac_cv_prog_ac_ct_CC="$ac_prog"
29257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29258    break 2
29259  fi
29260done
29261  done
29262IFS=$as_save_IFS
29263
29264fi
29265fi
29266ac_ct_CC=$ac_cv_prog_ac_ct_CC
29267if test -n "$ac_ct_CC"; then
29268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
29269$as_echo "$ac_ct_CC" >&6; }
29270else
29271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29272$as_echo "no" >&6; }
29273fi
29274
29275
29276  test -n "$ac_ct_CC" && break
29277done
29278
29279  if test "x$ac_ct_CC" = x; then
29280    CC=""
29281  else
29282    case $cross_compiling:$ac_tool_warned in
29283yes:)
29284{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29285$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29286ac_tool_warned=yes ;;
29287esac
29288    CC=$ac_ct_CC
29289  fi
29290fi
29291
29292
29293test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29294$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29295as_fn_error $? "no acceptable C compiler found in \$PATH
29296See \`config.log' for more details" "$LINENO" 5; }
29297
29298# Provide some information about the compiler.
29299$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
29300set X $ac_compile
29301ac_compiler=$2
29302for ac_option in --version -v -V -qversion; do
29303  { { ac_try="$ac_compiler $ac_option >&5"
29304case "(($ac_try" in
29305  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29306  *) ac_try_echo=$ac_try;;
29307esac
29308eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29309$as_echo "$ac_try_echo"; } >&5
29310  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
29311  ac_status=$?
29312  if test -s conftest.err; then
29313    sed '10a\
29314... rest of stderr output deleted ...
29315         10q' conftest.err >conftest.er1
29316    cat conftest.er1 >&5
29317  fi
29318  rm -f conftest.er1 conftest.err
29319  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29320  test $ac_status = 0; }
29321done
29322
29323cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29324/* end confdefs.h.  */
29325
29326int
29327main ()
29328{
29329
29330  ;
29331  return 0;
29332}
29333_ACEOF
29334ac_clean_files_save=$ac_clean_files
29335ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
29336# Try to create an executable without -o first, disregard a.out.
29337# It will help us diagnose broken compilers, and finding out an intuition
29338# of exeext.
29339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
29340$as_echo_n "checking whether the C compiler works... " >&6; }
29341ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
29342
29343# The possible output files:
29344ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
29345
29346ac_rmfiles=
29347for ac_file in $ac_files
29348do
29349  case $ac_file in
29350    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29351    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
29352  esac
29353done
29354rm -f $ac_rmfiles
29355
29356if { { ac_try="$ac_link_default"
29357case "(($ac_try" in
29358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29359  *) ac_try_echo=$ac_try;;
29360esac
29361eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29362$as_echo "$ac_try_echo"; } >&5
29363  (eval "$ac_link_default") 2>&5
29364  ac_status=$?
29365  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29366  test $ac_status = 0; }; then :
29367  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29368# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29369# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29370# so that the user can short-circuit this test for compilers unknown to
29371# Autoconf.
29372for ac_file in $ac_files ''
29373do
29374  test -f "$ac_file" || continue
29375  case $ac_file in
29376    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29377	;;
29378    [ab].out )
29379	# We found the default executable, but exeext='' is most
29380	# certainly right.
29381	break;;
29382    *.* )
29383	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29384	then :; else
29385	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29386	fi
29387	# We set ac_cv_exeext here because the later test for it is not
29388	# safe: cross compilers may not add the suffix if given an `-o'
29389	# argument, so we may need to know it at that point already.
29390	# Even if this section looks crufty: it has the advantage of
29391	# actually working.
29392	break;;
29393    * )
29394	break;;
29395  esac
29396done
29397test "$ac_cv_exeext" = no && ac_cv_exeext=
29398
29399else
29400  ac_file=''
29401fi
29402if test -z "$ac_file"; then :
29403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29404$as_echo "no" >&6; }
29405$as_echo "$as_me: failed program was:" >&5
29406sed 's/^/| /' conftest.$ac_ext >&5
29407
29408{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29409$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29410as_fn_error 77 "C compiler cannot create executables
29411See \`config.log' for more details" "$LINENO" 5; }
29412else
29413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29414$as_echo "yes" >&6; }
29415fi
29416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29417$as_echo_n "checking for C compiler default output file name... " >&6; }
29418{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29419$as_echo "$ac_file" >&6; }
29420ac_exeext=$ac_cv_exeext
29421
29422rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29423ac_clean_files=$ac_clean_files_save
29424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29425$as_echo_n "checking for suffix of executables... " >&6; }
29426if { { ac_try="$ac_link"
29427case "(($ac_try" in
29428  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29429  *) ac_try_echo=$ac_try;;
29430esac
29431eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29432$as_echo "$ac_try_echo"; } >&5
29433  (eval "$ac_link") 2>&5
29434  ac_status=$?
29435  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29436  test $ac_status = 0; }; then :
29437  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29438# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29439# work properly (i.e., refer to `conftest.exe'), while it won't with
29440# `rm'.
29441for ac_file in conftest.exe conftest conftest.*; do
29442  test -f "$ac_file" || continue
29443  case $ac_file in
29444    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29445    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29446	  break;;
29447    * ) break;;
29448  esac
29449done
29450else
29451  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29452$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29453as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29454See \`config.log' for more details" "$LINENO" 5; }
29455fi
29456rm -f conftest conftest$ac_cv_exeext
29457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29458$as_echo "$ac_cv_exeext" >&6; }
29459
29460rm -f conftest.$ac_ext
29461EXEEXT=$ac_cv_exeext
29462ac_exeext=$EXEEXT
29463cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29464/* end confdefs.h.  */
29465#include <stdio.h>
29466int
29467main ()
29468{
29469FILE *f = fopen ("conftest.out", "w");
29470 return ferror (f) || fclose (f) != 0;
29471
29472  ;
29473  return 0;
29474}
29475_ACEOF
29476ac_clean_files="$ac_clean_files conftest.out"
29477# Check that the compiler produces executables we can run.  If not, either
29478# the compiler is broken, or we cross compile.
29479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29480$as_echo_n "checking whether we are cross compiling... " >&6; }
29481if test "$cross_compiling" != yes; then
29482  { { ac_try="$ac_link"
29483case "(($ac_try" in
29484  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29485  *) ac_try_echo=$ac_try;;
29486esac
29487eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29488$as_echo "$ac_try_echo"; } >&5
29489  (eval "$ac_link") 2>&5
29490  ac_status=$?
29491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29492  test $ac_status = 0; }
29493  if { ac_try='./conftest$ac_cv_exeext'
29494  { { case "(($ac_try" in
29495  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29496  *) ac_try_echo=$ac_try;;
29497esac
29498eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29499$as_echo "$ac_try_echo"; } >&5
29500  (eval "$ac_try") 2>&5
29501  ac_status=$?
29502  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29503  test $ac_status = 0; }; }; then
29504    cross_compiling=no
29505  else
29506    if test "$cross_compiling" = maybe; then
29507	cross_compiling=yes
29508    else
29509	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29510$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29511as_fn_error $? "cannot run C compiled programs.
29512If you meant to cross compile, use \`--host'.
29513See \`config.log' for more details" "$LINENO" 5; }
29514    fi
29515  fi
29516fi
29517{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29518$as_echo "$cross_compiling" >&6; }
29519
29520rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29521ac_clean_files=$ac_clean_files_save
29522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29523$as_echo_n "checking for suffix of object files... " >&6; }
29524if ${ac_cv_objext+:} false; then :
29525  $as_echo_n "(cached) " >&6
29526else
29527  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29528/* end confdefs.h.  */
29529
29530int
29531main ()
29532{
29533
29534  ;
29535  return 0;
29536}
29537_ACEOF
29538rm -f conftest.o conftest.obj
29539if { { ac_try="$ac_compile"
29540case "(($ac_try" in
29541  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29542  *) ac_try_echo=$ac_try;;
29543esac
29544eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29545$as_echo "$ac_try_echo"; } >&5
29546  (eval "$ac_compile") 2>&5
29547  ac_status=$?
29548  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29549  test $ac_status = 0; }; then :
29550  for ac_file in conftest.o conftest.obj conftest.*; do
29551  test -f "$ac_file" || continue;
29552  case $ac_file in
29553    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29554    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29555       break;;
29556  esac
29557done
29558else
29559  $as_echo "$as_me: failed program was:" >&5
29560sed 's/^/| /' conftest.$ac_ext >&5
29561
29562{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29564as_fn_error $? "cannot compute suffix of object files: cannot compile
29565See \`config.log' for more details" "$LINENO" 5; }
29566fi
29567rm -f conftest.$ac_cv_objext conftest.$ac_ext
29568fi
29569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29570$as_echo "$ac_cv_objext" >&6; }
29571OBJEXT=$ac_cv_objext
29572ac_objext=$OBJEXT
29573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29574$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29575if ${ac_cv_c_compiler_gnu+:} false; then :
29576  $as_echo_n "(cached) " >&6
29577else
29578  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29579/* end confdefs.h.  */
29580
29581int
29582main ()
29583{
29584#ifndef __GNUC__
29585       choke me
29586#endif
29587
29588  ;
29589  return 0;
29590}
29591_ACEOF
29592if ac_fn_c_try_compile "$LINENO"; then :
29593  ac_compiler_gnu=yes
29594else
29595  ac_compiler_gnu=no
29596fi
29597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29598ac_cv_c_compiler_gnu=$ac_compiler_gnu
29599
29600fi
29601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29602$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29603if test $ac_compiler_gnu = yes; then
29604  GCC=yes
29605else
29606  GCC=
29607fi
29608ac_test_CFLAGS=${CFLAGS+set}
29609ac_save_CFLAGS=$CFLAGS
29610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29611$as_echo_n "checking whether $CC accepts -g... " >&6; }
29612if ${ac_cv_prog_cc_g+:} false; then :
29613  $as_echo_n "(cached) " >&6
29614else
29615  ac_save_c_werror_flag=$ac_c_werror_flag
29616   ac_c_werror_flag=yes
29617   ac_cv_prog_cc_g=no
29618   CFLAGS="-g"
29619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29620/* end confdefs.h.  */
29621
29622int
29623main ()
29624{
29625
29626  ;
29627  return 0;
29628}
29629_ACEOF
29630if ac_fn_c_try_compile "$LINENO"; then :
29631  ac_cv_prog_cc_g=yes
29632else
29633  CFLAGS=""
29634      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29635/* end confdefs.h.  */
29636
29637int
29638main ()
29639{
29640
29641  ;
29642  return 0;
29643}
29644_ACEOF
29645if ac_fn_c_try_compile "$LINENO"; then :
29646
29647else
29648  ac_c_werror_flag=$ac_save_c_werror_flag
29649	 CFLAGS="-g"
29650	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29651/* end confdefs.h.  */
29652
29653int
29654main ()
29655{
29656
29657  ;
29658  return 0;
29659}
29660_ACEOF
29661if ac_fn_c_try_compile "$LINENO"; then :
29662  ac_cv_prog_cc_g=yes
29663fi
29664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29665fi
29666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29667fi
29668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29669   ac_c_werror_flag=$ac_save_c_werror_flag
29670fi
29671{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29672$as_echo "$ac_cv_prog_cc_g" >&6; }
29673if test "$ac_test_CFLAGS" = set; then
29674  CFLAGS=$ac_save_CFLAGS
29675elif test $ac_cv_prog_cc_g = yes; then
29676  if test "$GCC" = yes; then
29677    CFLAGS="-g -O2"
29678  else
29679    CFLAGS="-g"
29680  fi
29681else
29682  if test "$GCC" = yes; then
29683    CFLAGS="-O2"
29684  else
29685    CFLAGS=
29686  fi
29687fi
29688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29689$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29690if ${ac_cv_prog_cc_c89+:} false; then :
29691  $as_echo_n "(cached) " >&6
29692else
29693  ac_cv_prog_cc_c89=no
29694ac_save_CC=$CC
29695cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29696/* end confdefs.h.  */
29697#include <stdarg.h>
29698#include <stdio.h>
29699struct stat;
29700/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29701struct buf { int x; };
29702FILE * (*rcsopen) (struct buf *, struct stat *, int);
29703static char *e (p, i)
29704     char **p;
29705     int i;
29706{
29707  return p[i];
29708}
29709static char *f (char * (*g) (char **, int), char **p, ...)
29710{
29711  char *s;
29712  va_list v;
29713  va_start (v,p);
29714  s = g (p, va_arg (v,int));
29715  va_end (v);
29716  return s;
29717}
29718
29719/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29720   function prototypes and stuff, but not '\xHH' hex character constants.
29721   These don't provoke an error unfortunately, instead are silently treated
29722   as 'x'.  The following induces an error, until -std is added to get
29723   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29724   array size at least.  It's necessary to write '\x00'==0 to get something
29725   that's true only with -std.  */
29726int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29727
29728/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29729   inside strings and character constants.  */
29730#define FOO(x) 'x'
29731int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29732
29733int test (int i, double x);
29734struct s1 {int (*f) (int a);};
29735struct s2 {int (*f) (double a);};
29736int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29737int argc;
29738char **argv;
29739int
29740main ()
29741{
29742return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29743  ;
29744  return 0;
29745}
29746_ACEOF
29747for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29748	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29749do
29750  CC="$ac_save_CC $ac_arg"
29751  if ac_fn_c_try_compile "$LINENO"; then :
29752  ac_cv_prog_cc_c89=$ac_arg
29753fi
29754rm -f core conftest.err conftest.$ac_objext
29755  test "x$ac_cv_prog_cc_c89" != "xno" && break
29756done
29757rm -f conftest.$ac_ext
29758CC=$ac_save_CC
29759
29760fi
29761# AC_CACHE_VAL
29762case "x$ac_cv_prog_cc_c89" in
29763  x)
29764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29765$as_echo "none needed" >&6; } ;;
29766  xno)
29767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29768$as_echo "unsupported" >&6; } ;;
29769  *)
29770    CC="$CC $ac_cv_prog_cc_c89"
29771    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29772$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29773esac
29774if test "x$ac_cv_prog_cc_c89" != xno; then :
29775
29776fi
29777
29778ac_ext=cpp
29779ac_cpp='$CXXCPP $CPPFLAGS'
29780ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29781ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29782ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29783
29784
29785
29786  COMPILER_NAME=C++
29787  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29788
29789  if test "x$CXX" != x; then
29790    # User has supplied compiler name already, always let that override.
29791    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29792$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29793    if test "x`basename $CXX`" = "x$CXX"; then
29794      # A command without a complete path is provided, search $PATH.
29795
29796      for ac_prog in $CXX
29797do
29798  # Extract the first word of "$ac_prog", so it can be a program name with args.
29799set dummy $ac_prog; ac_word=$2
29800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29801$as_echo_n "checking for $ac_word... " >&6; }
29802if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29803  $as_echo_n "(cached) " >&6
29804else
29805  case $POTENTIAL_CXX in
29806  [\\/]* | ?:[\\/]*)
29807  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29808  ;;
29809  *)
29810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29811for as_dir in $PATH
29812do
29813  IFS=$as_save_IFS
29814  test -z "$as_dir" && as_dir=.
29815    for ac_exec_ext in '' $ac_executable_extensions; do
29816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29817    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29819    break 2
29820  fi
29821done
29822  done
29823IFS=$as_save_IFS
29824
29825  ;;
29826esac
29827fi
29828POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29829if test -n "$POTENTIAL_CXX"; then
29830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29831$as_echo "$POTENTIAL_CXX" >&6; }
29832else
29833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29834$as_echo "no" >&6; }
29835fi
29836
29837
29838  test -n "$POTENTIAL_CXX" && break
29839done
29840
29841      if test "x$POTENTIAL_CXX" != x; then
29842        CXX=$POTENTIAL_CXX
29843      else
29844        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29845      fi
29846    else
29847      # Otherwise it might already be a complete path
29848      if test ! -x "$CXX"; then
29849        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29850      fi
29851    fi
29852  else
29853    # No user supplied value. Locate compiler ourselves.
29854
29855    # If we are cross compiling, assume cross compilation tools follows the
29856    # cross compilation standard where they are prefixed with the autoconf
29857    # standard name for the target. For example the binary
29858    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29859    # If we are not cross compiling, then the default compiler name will be
29860    # used.
29861
29862    CXX=
29863    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29864    # before checking the rest of the PATH.
29865    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29866    # step, this should not be necessary.
29867    if test -n "$TOOLCHAIN_PATH"; then
29868      PATH_save="$PATH"
29869      PATH="$TOOLCHAIN_PATH"
29870      for ac_prog in $SEARCH_LIST
29871do
29872  # Extract the first word of "$ac_prog", so it can be a program name with args.
29873set dummy $ac_prog; ac_word=$2
29874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29875$as_echo_n "checking for $ac_word... " >&6; }
29876if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29877  $as_echo_n "(cached) " >&6
29878else
29879  case $TOOLCHAIN_PATH_CXX in
29880  [\\/]* | ?:[\\/]*)
29881  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29882  ;;
29883  *)
29884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29885for as_dir in $PATH
29886do
29887  IFS=$as_save_IFS
29888  test -z "$as_dir" && as_dir=.
29889    for ac_exec_ext in '' $ac_executable_extensions; do
29890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29891    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29893    break 2
29894  fi
29895done
29896  done
29897IFS=$as_save_IFS
29898
29899  ;;
29900esac
29901fi
29902TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29903if test -n "$TOOLCHAIN_PATH_CXX"; then
29904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29905$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29906else
29907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29908$as_echo "no" >&6; }
29909fi
29910
29911
29912  test -n "$TOOLCHAIN_PATH_CXX" && break
29913done
29914
29915      CXX=$TOOLCHAIN_PATH_CXX
29916      PATH="$PATH_save"
29917    fi
29918
29919    # AC_PATH_PROGS can't be run multiple times with the same variable,
29920    # so create a new name for this run.
29921    if test "x$CXX" = x; then
29922      for ac_prog in $SEARCH_LIST
29923do
29924  # Extract the first word of "$ac_prog", so it can be a program name with args.
29925set dummy $ac_prog; ac_word=$2
29926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29927$as_echo_n "checking for $ac_word... " >&6; }
29928if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29929  $as_echo_n "(cached) " >&6
29930else
29931  case $POTENTIAL_CXX in
29932  [\\/]* | ?:[\\/]*)
29933  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29934  ;;
29935  *)
29936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29937for as_dir in $PATH
29938do
29939  IFS=$as_save_IFS
29940  test -z "$as_dir" && as_dir=.
29941    for ac_exec_ext in '' $ac_executable_extensions; do
29942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29943    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29945    break 2
29946  fi
29947done
29948  done
29949IFS=$as_save_IFS
29950
29951  ;;
29952esac
29953fi
29954POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29955if test -n "$POTENTIAL_CXX"; then
29956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29957$as_echo "$POTENTIAL_CXX" >&6; }
29958else
29959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29960$as_echo "no" >&6; }
29961fi
29962
29963
29964  test -n "$POTENTIAL_CXX" && break
29965done
29966
29967      CXX=$POTENTIAL_CXX
29968    fi
29969
29970    if test "x$CXX" = x; then
29971
29972  # Print a helpful message on how to acquire the necessary build dependency.
29973  # devkit is the help tag: freetype, cups, pulse, alsa etc
29974  MISSING_DEPENDENCY=devkit
29975
29976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29977    cygwin_help $MISSING_DEPENDENCY
29978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29979    msys_help $MISSING_DEPENDENCY
29980  else
29981    PKGHANDLER_COMMAND=
29982
29983    case $PKGHANDLER in
29984      apt-get)
29985        apt_help     $MISSING_DEPENDENCY ;;
29986      yum)
29987        yum_help     $MISSING_DEPENDENCY ;;
29988      port)
29989        port_help    $MISSING_DEPENDENCY ;;
29990      pkgutil)
29991        pkgutil_help $MISSING_DEPENDENCY ;;
29992      pkgadd)
29993        pkgadd_help  $MISSING_DEPENDENCY ;;
29994    esac
29995
29996    if test "x$PKGHANDLER_COMMAND" != x; then
29997      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29998    fi
29999  fi
30000
30001      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
30002    fi
30003  fi
30004
30005  # Now we have a compiler binary in CXX. Make sure it's okay.
30006
30007  # Only process if variable expands to non-empty
30008
30009  if test "x$CXX" != x; then
30010    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30011
30012  # First separate the path from the arguments. This will split at the first
30013  # space.
30014  complete="$CXX"
30015  path="${complete%% *}"
30016  tmp="$complete EOL"
30017  arguments="${tmp#* }"
30018
30019  # Input might be given as Windows format, start by converting to
30020  # unix format.
30021  new_path=`$CYGPATH -u "$path"`
30022
30023  # Now try to locate executable using which
30024  new_path=`$WHICH "$new_path" 2> /dev/null`
30025  # bat and cmd files are not always considered executable in cygwin causing which
30026  # to not find them
30027  if test "x$new_path" = x \
30028      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30029      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30030    new_path=`$CYGPATH -u "$path"`
30031  fi
30032  if test "x$new_path" = x; then
30033    # Oops. Which didn't find the executable.
30034    # The splitting of arguments from the executable at a space might have been incorrect,
30035    # since paths with space are more likely in Windows. Give it another try with the whole
30036    # argument.
30037    path="$complete"
30038    arguments="EOL"
30039    new_path=`$CYGPATH -u "$path"`
30040    new_path=`$WHICH "$new_path" 2> /dev/null`
30041    # bat and cmd files are not always considered executable in cygwin causing which
30042    # to not find them
30043    if test "x$new_path" = x \
30044        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30045        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30046      new_path=`$CYGPATH -u "$path"`
30047    fi
30048    if test "x$new_path" = x; then
30049      # It's still not found. Now this is an unrecoverable error.
30050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30051$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30052      has_space=`$ECHO "$complete" | $GREP " "`
30053      if test "x$has_space" != x; then
30054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30056      fi
30057      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30058    fi
30059  fi
30060
30061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30064  # "foo.exe" is OK but "foo" is an error.
30065  #
30066  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30067  # It is also a way to make sure we got the proper file name for the real test later on.
30068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30069  if test "x$test_shortpath" = x; then
30070    # Short path failed, file does not exist as specified.
30071    # Try adding .exe or .cmd
30072    if test -f "${new_path}.exe"; then
30073      input_to_shortpath="${new_path}.exe"
30074    elif test -f "${new_path}.cmd"; then
30075      input_to_shortpath="${new_path}.cmd"
30076    else
30077      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
30078$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
30079      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30080$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30081      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30082    fi
30083  else
30084    input_to_shortpath="$new_path"
30085  fi
30086
30087  # Call helper function which possibly converts this using DOS-style short mode.
30088  # If so, the updated path is stored in $new_path.
30089  new_path="$input_to_shortpath"
30090
30091  input_path="$input_to_shortpath"
30092  # Check if we need to convert this using DOS-style short mode. If the path
30093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30094  # take no chances and rewrite it.
30095  # Note: m4 eats our [], so we need to use [ and ] instead.
30096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30097  if test "x$has_forbidden_chars" != x; then
30098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30102      # Going to short mode and back again did indeed matter. Since short mode is
30103      # case insensitive, let's make it lowercase to improve readability.
30104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30105      # Now convert it back to Unix-stile (cygpath)
30106      input_path=`$CYGPATH -u "$shortmode_path"`
30107      new_path="$input_path"
30108    fi
30109  fi
30110
30111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30112  if test "x$test_cygdrive_prefix" = x; then
30113    # As a simple fix, exclude /usr/bin since it's not a real path.
30114    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30116      # a path prefixed by /cygdrive for fixpath to work.
30117      new_path="$CYGWIN_ROOT_PATH$input_path"
30118    fi
30119  fi
30120
30121  # remove trailing .exe if any
30122  new_path="${new_path/%.exe/}"
30123
30124    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30125
30126  # First separate the path from the arguments. This will split at the first
30127  # space.
30128  complete="$CXX"
30129  path="${complete%% *}"
30130  tmp="$complete EOL"
30131  arguments="${tmp#* }"
30132
30133  # Input might be given as Windows format, start by converting to
30134  # unix format.
30135  new_path="$path"
30136
30137  windows_path="$new_path"
30138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30139    unix_path=`$CYGPATH -u "$windows_path"`
30140    new_path="$unix_path"
30141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30143    new_path="$unix_path"
30144  fi
30145
30146
30147  # Now try to locate executable using which
30148  new_path=`$WHICH "$new_path" 2> /dev/null`
30149
30150  if test "x$new_path" = x; then
30151    # Oops. Which didn't find the executable.
30152    # The splitting of arguments from the executable at a space might have been incorrect,
30153    # since paths with space are more likely in Windows. Give it another try with the whole
30154    # argument.
30155    path="$complete"
30156    arguments="EOL"
30157    new_path="$path"
30158
30159  windows_path="$new_path"
30160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30161    unix_path=`$CYGPATH -u "$windows_path"`
30162    new_path="$unix_path"
30163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30164    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30165    new_path="$unix_path"
30166  fi
30167
30168
30169    new_path=`$WHICH "$new_path" 2> /dev/null`
30170    # bat and cmd files are not always considered executable in MSYS causing which
30171    # to not find them
30172    if test "x$new_path" = x \
30173        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30174        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30175      new_path="$path"
30176
30177  windows_path="$new_path"
30178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30179    unix_path=`$CYGPATH -u "$windows_path"`
30180    new_path="$unix_path"
30181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30183    new_path="$unix_path"
30184  fi
30185
30186    fi
30187
30188    if test "x$new_path" = x; then
30189      # It's still not found. Now this is an unrecoverable error.
30190      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30191$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30192      has_space=`$ECHO "$complete" | $GREP " "`
30193      if test "x$has_space" != x; then
30194        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30195$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30196      fi
30197      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30198    fi
30199  fi
30200
30201  # Now new_path has a complete unix path to the binary
30202  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30203    # Keep paths in /bin as-is, but remove trailing .exe if any
30204    new_path="${new_path/%.exe/}"
30205    # Do not save /bin paths to all_fixpath_prefixes!
30206  else
30207    # Not in mixed or Windows style, start by that.
30208    new_path=`cmd //c echo $new_path`
30209
30210  input_path="$new_path"
30211  # Check if we need to convert this using DOS-style short mode. If the path
30212  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30213  # take no chances and rewrite it.
30214  # Note: m4 eats our [], so we need to use [ and ] instead.
30215  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30216  if test "x$has_forbidden_chars" != x; then
30217    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30218    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30219  fi
30220
30221    # Output is in $new_path
30222
30223  windows_path="$new_path"
30224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30225    unix_path=`$CYGPATH -u "$windows_path"`
30226    new_path="$unix_path"
30227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30229    new_path="$unix_path"
30230  fi
30231
30232    # remove trailing .exe if any
30233    new_path="${new_path/%.exe/}"
30234
30235    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30236    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30237  fi
30238
30239    else
30240      # We're on a unix platform. Hooray! :)
30241      # First separate the path from the arguments. This will split at the first
30242      # space.
30243      complete="$CXX"
30244      path="${complete%% *}"
30245      tmp="$complete EOL"
30246      arguments="${tmp#* }"
30247
30248      # Cannot rely on the command "which" here since it doesn't always work.
30249      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30250      if test -z "$is_absolute_path"; then
30251        # Path to executable is not absolute. Find it.
30252        IFS_save="$IFS"
30253        IFS=:
30254        for p in $PATH; do
30255          if test -f "$p/$path" && test -x "$p/$path"; then
30256            new_path="$p/$path"
30257            break
30258          fi
30259        done
30260        IFS="$IFS_save"
30261      else
30262        # This is an absolute path, we can use it without further modifications.
30263        new_path="$path"
30264      fi
30265
30266      if test "x$new_path" = x; then
30267        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
30268$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
30269        has_space=`$ECHO "$complete" | $GREP " "`
30270        if test "x$has_space" != x; then
30271          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30272$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30273        fi
30274        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
30275      fi
30276    fi
30277
30278    # Now join together the path and the arguments once again
30279    if test "x$arguments" != xEOL; then
30280      new_complete="$new_path ${arguments% *}"
30281    else
30282      new_complete="$new_path"
30283    fi
30284
30285    if test "x$complete" != "x$new_complete"; then
30286      CXX="$new_complete"
30287      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
30288$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
30289    fi
30290  fi
30291
30292  TEST_COMPILER="$CXX"
30293  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
30294  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
30295  if test "x$OPENJDK_BUILD_OS" != xaix; then
30296    # FIXME: This test should not be needed anymore; we don't do that for any platform.
30297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
30298$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
30299
30300  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30301    # Follow a chain of symbolic links. Use readlink
30302    # where it exists, else fall back to horribly
30303    # complicated shell code.
30304    if test "x$READLINK_TESTED" != yes; then
30305      # On MacOSX there is a readlink tool with a different
30306      # purpose than the GNU readlink tool. Check the found readlink.
30307      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30308      if test "x$ISGNU" = x; then
30309        # A readlink that we do not know how to use.
30310        # Are there other non-GNU readlinks out there?
30311        READLINK_TESTED=yes
30312        READLINK=
30313      fi
30314    fi
30315
30316    if test "x$READLINK" != x; then
30317      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
30318    else
30319      # Save the current directory for restoring afterwards
30320      STARTDIR=$PWD
30321      COUNTER=0
30322      sym_link_dir=`$DIRNAME $TEST_COMPILER`
30323      sym_link_file=`$BASENAME $TEST_COMPILER`
30324      cd $sym_link_dir
30325      # Use -P flag to resolve symlinks in directories.
30326      cd `$THEPWDCMD -P`
30327      sym_link_dir=`$THEPWDCMD -P`
30328      # Resolve file symlinks
30329      while test $COUNTER -lt 20; do
30330        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30331        if test "x$ISLINK" == x; then
30332          # This is not a symbolic link! We are done!
30333          break
30334        fi
30335        # Again resolve directory symlinks since the target of the just found
30336        # link could be in a different directory
30337        cd `$DIRNAME $ISLINK`
30338        sym_link_dir=`$THEPWDCMD -P`
30339        sym_link_file=`$BASENAME $ISLINK`
30340        let COUNTER=COUNTER+1
30341      done
30342      cd $STARTDIR
30343      TEST_COMPILER=$sym_link_dir/$sym_link_file
30344    fi
30345  fi
30346
30347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
30348$as_echo "$TEST_COMPILER" >&6; }
30349  fi
30350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
30351$as_echo_n "checking if CXX is disguised ccache... " >&6; }
30352
30353  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
30354  if test "x$COMPILER_BASENAME" = "xccache"; then
30355    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
30356$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
30357    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
30358    # We want to control ccache invocation ourselves, so ignore this cc and try
30359    # searching again.
30360
30361    # Remove the path to the fake ccache cc from the PATH
30362    RETRY_COMPILER_SAVED_PATH="$PATH"
30363    COMPILER_DIRNAME=`$DIRNAME $CXX`
30364    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
30365
30366    # Try again looking for our compiler
30367    if test -n "$ac_tool_prefix"; then
30368  for ac_prog in $TOOLCHAIN_CXX_BINARY
30369  do
30370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30373$as_echo_n "checking for $ac_word... " >&6; }
30374if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
30375  $as_echo_n "(cached) " >&6
30376else
30377  if test -n "$PROPER_COMPILER_CXX"; then
30378  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
30379else
30380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30381for as_dir in $PATH
30382do
30383  IFS=$as_save_IFS
30384  test -z "$as_dir" && as_dir=.
30385    for ac_exec_ext in '' $ac_executable_extensions; do
30386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30387    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30389    break 2
30390  fi
30391done
30392  done
30393IFS=$as_save_IFS
30394
30395fi
30396fi
30397PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30398if test -n "$PROPER_COMPILER_CXX"; then
30399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30400$as_echo "$PROPER_COMPILER_CXX" >&6; }
30401else
30402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30403$as_echo "no" >&6; }
30404fi
30405
30406
30407    test -n "$PROPER_COMPILER_CXX" && break
30408  done
30409fi
30410if test -z "$PROPER_COMPILER_CXX"; then
30411  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30412  for ac_prog in $TOOLCHAIN_CXX_BINARY
30413do
30414  # Extract the first word of "$ac_prog", so it can be a program name with args.
30415set dummy $ac_prog; ac_word=$2
30416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30417$as_echo_n "checking for $ac_word... " >&6; }
30418if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30419  $as_echo_n "(cached) " >&6
30420else
30421  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30422  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30423else
30424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30425for as_dir in $PATH
30426do
30427  IFS=$as_save_IFS
30428  test -z "$as_dir" && as_dir=.
30429    for ac_exec_ext in '' $ac_executable_extensions; do
30430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30431    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30433    break 2
30434  fi
30435done
30436  done
30437IFS=$as_save_IFS
30438
30439fi
30440fi
30441ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30442if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30444$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30445else
30446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30447$as_echo "no" >&6; }
30448fi
30449
30450
30451  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30452done
30453
30454  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30455    PROPER_COMPILER_CXX=""
30456  else
30457    case $cross_compiling:$ac_tool_warned in
30458yes:)
30459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30461ac_tool_warned=yes ;;
30462esac
30463    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30464  fi
30465fi
30466
30467
30468  # Only process if variable expands to non-empty
30469
30470  if test "x$PROPER_COMPILER_CXX" != x; then
30471    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30472
30473  # First separate the path from the arguments. This will split at the first
30474  # space.
30475  complete="$PROPER_COMPILER_CXX"
30476  path="${complete%% *}"
30477  tmp="$complete EOL"
30478  arguments="${tmp#* }"
30479
30480  # Input might be given as Windows format, start by converting to
30481  # unix format.
30482  new_path=`$CYGPATH -u "$path"`
30483
30484  # Now try to locate executable using which
30485  new_path=`$WHICH "$new_path" 2> /dev/null`
30486  # bat and cmd files are not always considered executable in cygwin causing which
30487  # to not find them
30488  if test "x$new_path" = x \
30489      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30490      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30491    new_path=`$CYGPATH -u "$path"`
30492  fi
30493  if test "x$new_path" = x; then
30494    # Oops. Which didn't find the executable.
30495    # The splitting of arguments from the executable at a space might have been incorrect,
30496    # since paths with space are more likely in Windows. Give it another try with the whole
30497    # argument.
30498    path="$complete"
30499    arguments="EOL"
30500    new_path=`$CYGPATH -u "$path"`
30501    new_path=`$WHICH "$new_path" 2> /dev/null`
30502    # bat and cmd files are not always considered executable in cygwin causing which
30503    # to not find them
30504    if test "x$new_path" = x \
30505        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30506        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30507      new_path=`$CYGPATH -u "$path"`
30508    fi
30509    if test "x$new_path" = x; then
30510      # It's still not found. Now this is an unrecoverable error.
30511      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30512$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30513      has_space=`$ECHO "$complete" | $GREP " "`
30514      if test "x$has_space" != x; then
30515        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30516$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30517      fi
30518      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30519    fi
30520  fi
30521
30522  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30523  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30524  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30525  # "foo.exe" is OK but "foo" is an error.
30526  #
30527  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30528  # It is also a way to make sure we got the proper file name for the real test later on.
30529  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30530  if test "x$test_shortpath" = x; then
30531    # Short path failed, file does not exist as specified.
30532    # Try adding .exe or .cmd
30533    if test -f "${new_path}.exe"; then
30534      input_to_shortpath="${new_path}.exe"
30535    elif test -f "${new_path}.cmd"; then
30536      input_to_shortpath="${new_path}.cmd"
30537    else
30538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30539$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30540      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30541$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30542      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30543    fi
30544  else
30545    input_to_shortpath="$new_path"
30546  fi
30547
30548  # Call helper function which possibly converts this using DOS-style short mode.
30549  # If so, the updated path is stored in $new_path.
30550  new_path="$input_to_shortpath"
30551
30552  input_path="$input_to_shortpath"
30553  # Check if we need to convert this using DOS-style short mode. If the path
30554  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30555  # take no chances and rewrite it.
30556  # Note: m4 eats our [], so we need to use [ and ] instead.
30557  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30558  if test "x$has_forbidden_chars" != x; then
30559    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30560    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30561    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30562    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30563      # Going to short mode and back again did indeed matter. Since short mode is
30564      # case insensitive, let's make it lowercase to improve readability.
30565      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30566      # Now convert it back to Unix-stile (cygpath)
30567      input_path=`$CYGPATH -u "$shortmode_path"`
30568      new_path="$input_path"
30569    fi
30570  fi
30571
30572  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30573  if test "x$test_cygdrive_prefix" = x; then
30574    # As a simple fix, exclude /usr/bin since it's not a real path.
30575    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30576      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30577      # a path prefixed by /cygdrive for fixpath to work.
30578      new_path="$CYGWIN_ROOT_PATH$input_path"
30579    fi
30580  fi
30581
30582  # remove trailing .exe if any
30583  new_path="${new_path/%.exe/}"
30584
30585    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30586
30587  # First separate the path from the arguments. This will split at the first
30588  # space.
30589  complete="$PROPER_COMPILER_CXX"
30590  path="${complete%% *}"
30591  tmp="$complete EOL"
30592  arguments="${tmp#* }"
30593
30594  # Input might be given as Windows format, start by converting to
30595  # unix format.
30596  new_path="$path"
30597
30598  windows_path="$new_path"
30599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30600    unix_path=`$CYGPATH -u "$windows_path"`
30601    new_path="$unix_path"
30602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30604    new_path="$unix_path"
30605  fi
30606
30607
30608  # Now try to locate executable using which
30609  new_path=`$WHICH "$new_path" 2> /dev/null`
30610
30611  if test "x$new_path" = x; then
30612    # Oops. Which didn't find the executable.
30613    # The splitting of arguments from the executable at a space might have been incorrect,
30614    # since paths with space are more likely in Windows. Give it another try with the whole
30615    # argument.
30616    path="$complete"
30617    arguments="EOL"
30618    new_path="$path"
30619
30620  windows_path="$new_path"
30621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30622    unix_path=`$CYGPATH -u "$windows_path"`
30623    new_path="$unix_path"
30624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30626    new_path="$unix_path"
30627  fi
30628
30629
30630    new_path=`$WHICH "$new_path" 2> /dev/null`
30631    # bat and cmd files are not always considered executable in MSYS causing which
30632    # to not find them
30633    if test "x$new_path" = x \
30634        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30635        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30636      new_path="$path"
30637
30638  windows_path="$new_path"
30639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30640    unix_path=`$CYGPATH -u "$windows_path"`
30641    new_path="$unix_path"
30642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30644    new_path="$unix_path"
30645  fi
30646
30647    fi
30648
30649    if test "x$new_path" = x; then
30650      # It's still not found. Now this is an unrecoverable error.
30651      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30652$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30653      has_space=`$ECHO "$complete" | $GREP " "`
30654      if test "x$has_space" != x; then
30655        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30656$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30657      fi
30658      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30659    fi
30660  fi
30661
30662  # Now new_path has a complete unix path to the binary
30663  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30664    # Keep paths in /bin as-is, but remove trailing .exe if any
30665    new_path="${new_path/%.exe/}"
30666    # Do not save /bin paths to all_fixpath_prefixes!
30667  else
30668    # Not in mixed or Windows style, start by that.
30669    new_path=`cmd //c echo $new_path`
30670
30671  input_path="$new_path"
30672  # Check if we need to convert this using DOS-style short mode. If the path
30673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30674  # take no chances and rewrite it.
30675  # Note: m4 eats our [], so we need to use [ and ] instead.
30676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30677  if test "x$has_forbidden_chars" != x; then
30678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30680  fi
30681
30682    # Output is in $new_path
30683
30684  windows_path="$new_path"
30685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30686    unix_path=`$CYGPATH -u "$windows_path"`
30687    new_path="$unix_path"
30688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30690    new_path="$unix_path"
30691  fi
30692
30693    # remove trailing .exe if any
30694    new_path="${new_path/%.exe/}"
30695
30696    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30697    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30698  fi
30699
30700    else
30701      # We're on a unix platform. Hooray! :)
30702      # First separate the path from the arguments. This will split at the first
30703      # space.
30704      complete="$PROPER_COMPILER_CXX"
30705      path="${complete%% *}"
30706      tmp="$complete EOL"
30707      arguments="${tmp#* }"
30708
30709      # Cannot rely on the command "which" here since it doesn't always work.
30710      is_absolute_path=`$ECHO "$path" | $GREP ^/`
30711      if test -z "$is_absolute_path"; then
30712        # Path to executable is not absolute. Find it.
30713        IFS_save="$IFS"
30714        IFS=:
30715        for p in $PATH; do
30716          if test -f "$p/$path" && test -x "$p/$path"; then
30717            new_path="$p/$path"
30718            break
30719          fi
30720        done
30721        IFS="$IFS_save"
30722      else
30723        # This is an absolute path, we can use it without further modifications.
30724        new_path="$path"
30725      fi
30726
30727      if test "x$new_path" = x; then
30728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30729$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30730        has_space=`$ECHO "$complete" | $GREP " "`
30731        if test "x$has_space" != x; then
30732          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30733$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30734        fi
30735        as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30736      fi
30737    fi
30738
30739    # Now join together the path and the arguments once again
30740    if test "x$arguments" != xEOL; then
30741      new_complete="$new_path ${arguments% *}"
30742    else
30743      new_complete="$new_path"
30744    fi
30745
30746    if test "x$complete" != "x$new_complete"; then
30747      PROPER_COMPILER_CXX="$new_complete"
30748      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30749$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30750    fi
30751  fi
30752
30753    PATH="$RETRY_COMPILER_SAVED_PATH"
30754
30755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30756$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30757
30758  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30759    # Follow a chain of symbolic links. Use readlink
30760    # where it exists, else fall back to horribly
30761    # complicated shell code.
30762    if test "x$READLINK_TESTED" != yes; then
30763      # On MacOSX there is a readlink tool with a different
30764      # purpose than the GNU readlink tool. Check the found readlink.
30765      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30766      if test "x$ISGNU" = x; then
30767        # A readlink that we do not know how to use.
30768        # Are there other non-GNU readlinks out there?
30769        READLINK_TESTED=yes
30770        READLINK=
30771      fi
30772    fi
30773
30774    if test "x$READLINK" != x; then
30775      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30776    else
30777      # Save the current directory for restoring afterwards
30778      STARTDIR=$PWD
30779      COUNTER=0
30780      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30781      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30782      cd $sym_link_dir
30783      # Use -P flag to resolve symlinks in directories.
30784      cd `$THEPWDCMD -P`
30785      sym_link_dir=`$THEPWDCMD -P`
30786      # Resolve file symlinks
30787      while test $COUNTER -lt 20; do
30788        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30789        if test "x$ISLINK" == x; then
30790          # This is not a symbolic link! We are done!
30791          break
30792        fi
30793        # Again resolve directory symlinks since the target of the just found
30794        # link could be in a different directory
30795        cd `$DIRNAME $ISLINK`
30796        sym_link_dir=`$THEPWDCMD -P`
30797        sym_link_file=`$BASENAME $ISLINK`
30798        let COUNTER=COUNTER+1
30799      done
30800      cd $STARTDIR
30801      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30802    fi
30803  fi
30804
30805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30806$as_echo "$PROPER_COMPILER_CXX" >&6; }
30807    CXX="$PROPER_COMPILER_CXX"
30808  else
30809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30810$as_echo "no, keeping CXX" >&6; }
30811  fi
30812
30813
30814  COMPILER=$CXX
30815  COMPILER_NAME=$COMPILER_NAME
30816
30817  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30818    # cc -V output typically looks like
30819    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30820    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30821    # Check that this is likely to be the Solaris Studio cc.
30822    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30823    if test $? -ne 0; then
30824      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30825      { $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
30826$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30827      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30828$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30829      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30830$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30831      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30832    fi
30833    # Remove usage instructions (if present), and
30834    # collapse compiler output into a single line
30835    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30836        $SED -e 's/ *[Uu]sage:.*//'`
30837    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30838        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30839  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30840    # xlc -qversion output typically looks like
30841    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30842    #     Version: 11.01.0000.0015
30843    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30844    # Check that this is likely to be the IBM XL C compiler.
30845    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30846    if test $? -ne 0; then
30847      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30848      { $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
30849$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30850      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30851$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30852      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30853$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30854      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30855    fi
30856    # Collapse compiler output into a single line
30857    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30858    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30859        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30860  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30861    # There is no specific version flag, but all output starts with a version string.
30862    # First line typically looks something like:
30863    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30864    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30865    # Check that this is likely to be Microsoft CL.EXE.
30866    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30867    if test $? -ne 0; then
30868      { $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
30869$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30870      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30871$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30872      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30873    fi
30874    # Collapse compiler output into a single line
30875    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30876    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30877        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30878  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30879    # gcc --version output typically looks like
30880    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30881    #     Copyright (C) 2013 Free Software Foundation, Inc.
30882    #     This is free software; see the source for copying conditions.  There is NO
30883    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30884    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30885    # Check that this is likely to be GCC.
30886    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30887    if test $? -ne 0; then
30888      { $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
30889$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30890      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30891$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30892      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30893    fi
30894    # Remove Copyright and legalese from version string, and
30895    # collapse into a single line
30896    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30897        $SED -e 's/ *Copyright .*//'`
30898    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30899        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30900  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30901    # clang --version output typically looks like
30902    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30903    #    clang version 3.3 (tags/RELEASE_33/final)
30904    # or
30905    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30906    #    Target: x86_64-pc-linux-gnu
30907    #    Thread model: posix
30908    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30909    # Check that this is likely to be clang
30910    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30911    if test $? -ne 0; then
30912      { $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
30913$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30914      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30915$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30916      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30917    fi
30918    # Collapse compiler output into a single line
30919    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30920    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30921        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30922  else
30923      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30924  fi
30925  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30926  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30927  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30928  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30929
30930  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30931$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30932
30933
30934  # Now that we have resolved CXX ourself, let autoconf have its go at it
30935  ac_ext=cpp
30936ac_cpp='$CXXCPP $CPPFLAGS'
30937ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30938ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30939ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30940if test -z "$CXX"; then
30941  if test -n "$CCC"; then
30942    CXX=$CCC
30943  else
30944    if test -n "$ac_tool_prefix"; then
30945  for ac_prog in $CXX
30946  do
30947    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30948set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30950$as_echo_n "checking for $ac_word... " >&6; }
30951if ${ac_cv_prog_CXX+:} false; then :
30952  $as_echo_n "(cached) " >&6
30953else
30954  if test -n "$CXX"; then
30955  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30956else
30957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30958for as_dir in $PATH
30959do
30960  IFS=$as_save_IFS
30961  test -z "$as_dir" && as_dir=.
30962    for ac_exec_ext in '' $ac_executable_extensions; do
30963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30964    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30966    break 2
30967  fi
30968done
30969  done
30970IFS=$as_save_IFS
30971
30972fi
30973fi
30974CXX=$ac_cv_prog_CXX
30975if test -n "$CXX"; then
30976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30977$as_echo "$CXX" >&6; }
30978else
30979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30980$as_echo "no" >&6; }
30981fi
30982
30983
30984    test -n "$CXX" && break
30985  done
30986fi
30987if test -z "$CXX"; then
30988  ac_ct_CXX=$CXX
30989  for ac_prog in $CXX
30990do
30991  # Extract the first word of "$ac_prog", so it can be a program name with args.
30992set dummy $ac_prog; ac_word=$2
30993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30994$as_echo_n "checking for $ac_word... " >&6; }
30995if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30996  $as_echo_n "(cached) " >&6
30997else
30998  if test -n "$ac_ct_CXX"; then
30999  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
31000else
31001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31002for as_dir in $PATH
31003do
31004  IFS=$as_save_IFS
31005  test -z "$as_dir" && as_dir=.
31006    for ac_exec_ext in '' $ac_executable_extensions; do
31007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31008    ac_cv_prog_ac_ct_CXX="$ac_prog"
31009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31010    break 2
31011  fi
31012done
31013  done
31014IFS=$as_save_IFS
31015
31016fi
31017fi
31018ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
31019if test -n "$ac_ct_CXX"; then
31020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
31021$as_echo "$ac_ct_CXX" >&6; }
31022else
31023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31024$as_echo "no" >&6; }
31025fi
31026
31027
31028  test -n "$ac_ct_CXX" && break
31029done
31030
31031  if test "x$ac_ct_CXX" = x; then
31032    CXX="g++"
31033  else
31034    case $cross_compiling:$ac_tool_warned in
31035yes:)
31036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31038ac_tool_warned=yes ;;
31039esac
31040    CXX=$ac_ct_CXX
31041  fi
31042fi
31043
31044  fi
31045fi
31046# Provide some information about the compiler.
31047$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
31048set X $ac_compile
31049ac_compiler=$2
31050for ac_option in --version -v -V -qversion; do
31051  { { ac_try="$ac_compiler $ac_option >&5"
31052case "(($ac_try" in
31053  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
31054  *) ac_try_echo=$ac_try;;
31055esac
31056eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
31057$as_echo "$ac_try_echo"; } >&5
31058  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
31059  ac_status=$?
31060  if test -s conftest.err; then
31061    sed '10a\
31062... rest of stderr output deleted ...
31063         10q' conftest.err >conftest.er1
31064    cat conftest.er1 >&5
31065  fi
31066  rm -f conftest.er1 conftest.err
31067  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
31068  test $ac_status = 0; }
31069done
31070
31071{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
31072$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
31073if ${ac_cv_cxx_compiler_gnu+:} false; then :
31074  $as_echo_n "(cached) " >&6
31075else
31076  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31077/* end confdefs.h.  */
31078
31079int
31080main ()
31081{
31082#ifndef __GNUC__
31083       choke me
31084#endif
31085
31086  ;
31087  return 0;
31088}
31089_ACEOF
31090if ac_fn_cxx_try_compile "$LINENO"; then :
31091  ac_compiler_gnu=yes
31092else
31093  ac_compiler_gnu=no
31094fi
31095rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31096ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
31097
31098fi
31099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
31100$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
31101if test $ac_compiler_gnu = yes; then
31102  GXX=yes
31103else
31104  GXX=
31105fi
31106ac_test_CXXFLAGS=${CXXFLAGS+set}
31107ac_save_CXXFLAGS=$CXXFLAGS
31108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
31109$as_echo_n "checking whether $CXX accepts -g... " >&6; }
31110if ${ac_cv_prog_cxx_g+:} false; then :
31111  $as_echo_n "(cached) " >&6
31112else
31113  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
31114   ac_cxx_werror_flag=yes
31115   ac_cv_prog_cxx_g=no
31116   CXXFLAGS="-g"
31117   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31118/* end confdefs.h.  */
31119
31120int
31121main ()
31122{
31123
31124  ;
31125  return 0;
31126}
31127_ACEOF
31128if ac_fn_cxx_try_compile "$LINENO"; then :
31129  ac_cv_prog_cxx_g=yes
31130else
31131  CXXFLAGS=""
31132      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31133/* end confdefs.h.  */
31134
31135int
31136main ()
31137{
31138
31139  ;
31140  return 0;
31141}
31142_ACEOF
31143if ac_fn_cxx_try_compile "$LINENO"; then :
31144
31145else
31146  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31147	 CXXFLAGS="-g"
31148	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31149/* end confdefs.h.  */
31150
31151int
31152main ()
31153{
31154
31155  ;
31156  return 0;
31157}
31158_ACEOF
31159if ac_fn_cxx_try_compile "$LINENO"; then :
31160  ac_cv_prog_cxx_g=yes
31161fi
31162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31163fi
31164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31165fi
31166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31167   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
31168fi
31169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
31170$as_echo "$ac_cv_prog_cxx_g" >&6; }
31171if test "$ac_test_CXXFLAGS" = set; then
31172  CXXFLAGS=$ac_save_CXXFLAGS
31173elif test $ac_cv_prog_cxx_g = yes; then
31174  if test "$GXX" = yes; then
31175    CXXFLAGS="-g -O2"
31176  else
31177    CXXFLAGS="-g"
31178  fi
31179else
31180  if test "$GXX" = yes; then
31181    CXXFLAGS="-O2"
31182  else
31183    CXXFLAGS=
31184  fi
31185fi
31186ac_ext=cpp
31187ac_cpp='$CXXCPP $CPPFLAGS'
31188ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31189ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31190ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31191
31192
31193  #
31194  # Setup the preprocessor (CPP and CXXCPP)
31195  #
31196  ac_ext=c
31197ac_cpp='$CPP $CPPFLAGS'
31198ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31199ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31200ac_compiler_gnu=$ac_cv_c_compiler_gnu
31201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
31202$as_echo_n "checking how to run the C preprocessor... " >&6; }
31203# On Suns, sometimes $CPP names a directory.
31204if test -n "$CPP" && test -d "$CPP"; then
31205  CPP=
31206fi
31207if test -z "$CPP"; then
31208  if ${ac_cv_prog_CPP+:} false; then :
31209  $as_echo_n "(cached) " >&6
31210else
31211      # Double quotes because CPP needs to be expanded
31212    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
31213    do
31214      ac_preproc_ok=false
31215for ac_c_preproc_warn_flag in '' yes
31216do
31217  # Use a header file that comes with gcc, so configuring glibc
31218  # with a fresh cross-compiler works.
31219  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31220  # <limits.h> exists even on freestanding compilers.
31221  # On the NeXT, cc -E runs the code through the compiler's parser,
31222  # not just through cpp. "Syntax error" is here to catch this case.
31223  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31224/* end confdefs.h.  */
31225#ifdef __STDC__
31226# include <limits.h>
31227#else
31228# include <assert.h>
31229#endif
31230		     Syntax error
31231_ACEOF
31232if ac_fn_c_try_cpp "$LINENO"; then :
31233
31234else
31235  # Broken: fails on valid input.
31236continue
31237fi
31238rm -f conftest.err conftest.i conftest.$ac_ext
31239
31240  # OK, works on sane cases.  Now check whether nonexistent headers
31241  # can be detected and how.
31242  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31243/* end confdefs.h.  */
31244#include <ac_nonexistent.h>
31245_ACEOF
31246if ac_fn_c_try_cpp "$LINENO"; then :
31247  # Broken: success on invalid input.
31248continue
31249else
31250  # Passes both tests.
31251ac_preproc_ok=:
31252break
31253fi
31254rm -f conftest.err conftest.i conftest.$ac_ext
31255
31256done
31257# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31258rm -f conftest.i conftest.err conftest.$ac_ext
31259if $ac_preproc_ok; then :
31260  break
31261fi
31262
31263    done
31264    ac_cv_prog_CPP=$CPP
31265
31266fi
31267  CPP=$ac_cv_prog_CPP
31268else
31269  ac_cv_prog_CPP=$CPP
31270fi
31271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
31272$as_echo "$CPP" >&6; }
31273ac_preproc_ok=false
31274for ac_c_preproc_warn_flag in '' yes
31275do
31276  # Use a header file that comes with gcc, so configuring glibc
31277  # with a fresh cross-compiler works.
31278  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31279  # <limits.h> exists even on freestanding compilers.
31280  # On the NeXT, cc -E runs the code through the compiler's parser,
31281  # not just through cpp. "Syntax error" is here to catch this case.
31282  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31283/* end confdefs.h.  */
31284#ifdef __STDC__
31285# include <limits.h>
31286#else
31287# include <assert.h>
31288#endif
31289		     Syntax error
31290_ACEOF
31291if ac_fn_c_try_cpp "$LINENO"; then :
31292
31293else
31294  # Broken: fails on valid input.
31295continue
31296fi
31297rm -f conftest.err conftest.i conftest.$ac_ext
31298
31299  # OK, works on sane cases.  Now check whether nonexistent headers
31300  # can be detected and how.
31301  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31302/* end confdefs.h.  */
31303#include <ac_nonexistent.h>
31304_ACEOF
31305if ac_fn_c_try_cpp "$LINENO"; then :
31306  # Broken: success on invalid input.
31307continue
31308else
31309  # Passes both tests.
31310ac_preproc_ok=:
31311break
31312fi
31313rm -f conftest.err conftest.i conftest.$ac_ext
31314
31315done
31316# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31317rm -f conftest.i conftest.err conftest.$ac_ext
31318if $ac_preproc_ok; then :
31319
31320else
31321  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31322$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31323as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
31324See \`config.log' for more details" "$LINENO" 5; }
31325fi
31326
31327ac_ext=cpp
31328ac_cpp='$CXXCPP $CPPFLAGS'
31329ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31330ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31331ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31332
31333
31334  # Only process if variable expands to non-empty
31335
31336  if test "x$CPP" != x; then
31337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31338
31339  # First separate the path from the arguments. This will split at the first
31340  # space.
31341  complete="$CPP"
31342  path="${complete%% *}"
31343  tmp="$complete EOL"
31344  arguments="${tmp#* }"
31345
31346  # Input might be given as Windows format, start by converting to
31347  # unix format.
31348  new_path=`$CYGPATH -u "$path"`
31349
31350  # Now try to locate executable using which
31351  new_path=`$WHICH "$new_path" 2> /dev/null`
31352  # bat and cmd files are not always considered executable in cygwin causing which
31353  # to not find them
31354  if test "x$new_path" = x \
31355      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31356      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31357    new_path=`$CYGPATH -u "$path"`
31358  fi
31359  if test "x$new_path" = x; then
31360    # Oops. Which didn't find the executable.
31361    # The splitting of arguments from the executable at a space might have been incorrect,
31362    # since paths with space are more likely in Windows. Give it another try with the whole
31363    # argument.
31364    path="$complete"
31365    arguments="EOL"
31366    new_path=`$CYGPATH -u "$path"`
31367    new_path=`$WHICH "$new_path" 2> /dev/null`
31368    # bat and cmd files are not always considered executable in cygwin causing which
31369    # to not find them
31370    if test "x$new_path" = x \
31371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31373      new_path=`$CYGPATH -u "$path"`
31374    fi
31375    if test "x$new_path" = x; then
31376      # It's still not found. Now this is an unrecoverable error.
31377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31378$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31379      has_space=`$ECHO "$complete" | $GREP " "`
31380      if test "x$has_space" != x; then
31381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31383      fi
31384      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31385    fi
31386  fi
31387
31388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31391  # "foo.exe" is OK but "foo" is an error.
31392  #
31393  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31394  # It is also a way to make sure we got the proper file name for the real test later on.
31395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31396  if test "x$test_shortpath" = x; then
31397    # Short path failed, file does not exist as specified.
31398    # Try adding .exe or .cmd
31399    if test -f "${new_path}.exe"; then
31400      input_to_shortpath="${new_path}.exe"
31401    elif test -f "${new_path}.cmd"; then
31402      input_to_shortpath="${new_path}.cmd"
31403    else
31404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
31405$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
31406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31408      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31409    fi
31410  else
31411    input_to_shortpath="$new_path"
31412  fi
31413
31414  # Call helper function which possibly converts this using DOS-style short mode.
31415  # If so, the updated path is stored in $new_path.
31416  new_path="$input_to_shortpath"
31417
31418  input_path="$input_to_shortpath"
31419  # Check if we need to convert this using DOS-style short mode. If the path
31420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31421  # take no chances and rewrite it.
31422  # Note: m4 eats our [], so we need to use [ and ] instead.
31423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31424  if test "x$has_forbidden_chars" != x; then
31425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31429      # Going to short mode and back again did indeed matter. Since short mode is
31430      # case insensitive, let's make it lowercase to improve readability.
31431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31432      # Now convert it back to Unix-stile (cygpath)
31433      input_path=`$CYGPATH -u "$shortmode_path"`
31434      new_path="$input_path"
31435    fi
31436  fi
31437
31438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31439  if test "x$test_cygdrive_prefix" = x; then
31440    # As a simple fix, exclude /usr/bin since it's not a real path.
31441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31443      # a path prefixed by /cygdrive for fixpath to work.
31444      new_path="$CYGWIN_ROOT_PATH$input_path"
31445    fi
31446  fi
31447
31448  # remove trailing .exe if any
31449  new_path="${new_path/%.exe/}"
31450
31451    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31452
31453  # First separate the path from the arguments. This will split at the first
31454  # space.
31455  complete="$CPP"
31456  path="${complete%% *}"
31457  tmp="$complete EOL"
31458  arguments="${tmp#* }"
31459
31460  # Input might be given as Windows format, start by converting to
31461  # unix format.
31462  new_path="$path"
31463
31464  windows_path="$new_path"
31465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31466    unix_path=`$CYGPATH -u "$windows_path"`
31467    new_path="$unix_path"
31468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31470    new_path="$unix_path"
31471  fi
31472
31473
31474  # Now try to locate executable using which
31475  new_path=`$WHICH "$new_path" 2> /dev/null`
31476
31477  if test "x$new_path" = x; then
31478    # Oops. Which didn't find the executable.
31479    # The splitting of arguments from the executable at a space might have been incorrect,
31480    # since paths with space are more likely in Windows. Give it another try with the whole
31481    # argument.
31482    path="$complete"
31483    arguments="EOL"
31484    new_path="$path"
31485
31486  windows_path="$new_path"
31487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31488    unix_path=`$CYGPATH -u "$windows_path"`
31489    new_path="$unix_path"
31490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31492    new_path="$unix_path"
31493  fi
31494
31495
31496    new_path=`$WHICH "$new_path" 2> /dev/null`
31497    # bat and cmd files are not always considered executable in MSYS causing which
31498    # to not find them
31499    if test "x$new_path" = x \
31500        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31501        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31502      new_path="$path"
31503
31504  windows_path="$new_path"
31505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31506    unix_path=`$CYGPATH -u "$windows_path"`
31507    new_path="$unix_path"
31508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31510    new_path="$unix_path"
31511  fi
31512
31513    fi
31514
31515    if test "x$new_path" = x; then
31516      # It's still not found. Now this is an unrecoverable error.
31517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31518$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31519      has_space=`$ECHO "$complete" | $GREP " "`
31520      if test "x$has_space" != x; then
31521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31523      fi
31524      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31525    fi
31526  fi
31527
31528  # Now new_path has a complete unix path to the binary
31529  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31530    # Keep paths in /bin as-is, but remove trailing .exe if any
31531    new_path="${new_path/%.exe/}"
31532    # Do not save /bin paths to all_fixpath_prefixes!
31533  else
31534    # Not in mixed or Windows style, start by that.
31535    new_path=`cmd //c echo $new_path`
31536
31537  input_path="$new_path"
31538  # Check if we need to convert this using DOS-style short mode. If the path
31539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31540  # take no chances and rewrite it.
31541  # Note: m4 eats our [], so we need to use [ and ] instead.
31542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31543  if test "x$has_forbidden_chars" != x; then
31544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31545    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31546  fi
31547
31548    # Output is in $new_path
31549
31550  windows_path="$new_path"
31551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31552    unix_path=`$CYGPATH -u "$windows_path"`
31553    new_path="$unix_path"
31554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31556    new_path="$unix_path"
31557  fi
31558
31559    # remove trailing .exe if any
31560    new_path="${new_path/%.exe/}"
31561
31562    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31563    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31564  fi
31565
31566    else
31567      # We're on a unix platform. Hooray! :)
31568      # First separate the path from the arguments. This will split at the first
31569      # space.
31570      complete="$CPP"
31571      path="${complete%% *}"
31572      tmp="$complete EOL"
31573      arguments="${tmp#* }"
31574
31575      # Cannot rely on the command "which" here since it doesn't always work.
31576      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31577      if test -z "$is_absolute_path"; then
31578        # Path to executable is not absolute. Find it.
31579        IFS_save="$IFS"
31580        IFS=:
31581        for p in $PATH; do
31582          if test -f "$p/$path" && test -x "$p/$path"; then
31583            new_path="$p/$path"
31584            break
31585          fi
31586        done
31587        IFS="$IFS_save"
31588      else
31589        # This is an absolute path, we can use it without further modifications.
31590        new_path="$path"
31591      fi
31592
31593      if test "x$new_path" = x; then
31594        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31595$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31596        has_space=`$ECHO "$complete" | $GREP " "`
31597        if test "x$has_space" != x; then
31598          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31599$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31600        fi
31601        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31602      fi
31603    fi
31604
31605    # Now join together the path and the arguments once again
31606    if test "x$arguments" != xEOL; then
31607      new_complete="$new_path ${arguments% *}"
31608    else
31609      new_complete="$new_path"
31610    fi
31611
31612    if test "x$complete" != "x$new_complete"; then
31613      CPP="$new_complete"
31614      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31615$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31616    fi
31617  fi
31618
31619  ac_ext=cpp
31620ac_cpp='$CXXCPP $CPPFLAGS'
31621ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31622ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31623ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31625$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31626if test -z "$CXXCPP"; then
31627  if ${ac_cv_prog_CXXCPP+:} false; then :
31628  $as_echo_n "(cached) " >&6
31629else
31630      # Double quotes because CXXCPP needs to be expanded
31631    for CXXCPP in "$CXX -E" "/lib/cpp"
31632    do
31633      ac_preproc_ok=false
31634for ac_cxx_preproc_warn_flag in '' yes
31635do
31636  # Use a header file that comes with gcc, so configuring glibc
31637  # with a fresh cross-compiler works.
31638  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31639  # <limits.h> exists even on freestanding compilers.
31640  # On the NeXT, cc -E runs the code through the compiler's parser,
31641  # not just through cpp. "Syntax error" is here to catch this case.
31642  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31643/* end confdefs.h.  */
31644#ifdef __STDC__
31645# include <limits.h>
31646#else
31647# include <assert.h>
31648#endif
31649		     Syntax error
31650_ACEOF
31651if ac_fn_cxx_try_cpp "$LINENO"; then :
31652
31653else
31654  # Broken: fails on valid input.
31655continue
31656fi
31657rm -f conftest.err conftest.i conftest.$ac_ext
31658
31659  # OK, works on sane cases.  Now check whether nonexistent headers
31660  # can be detected and how.
31661  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31662/* end confdefs.h.  */
31663#include <ac_nonexistent.h>
31664_ACEOF
31665if ac_fn_cxx_try_cpp "$LINENO"; then :
31666  # Broken: success on invalid input.
31667continue
31668else
31669  # Passes both tests.
31670ac_preproc_ok=:
31671break
31672fi
31673rm -f conftest.err conftest.i conftest.$ac_ext
31674
31675done
31676# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31677rm -f conftest.i conftest.err conftest.$ac_ext
31678if $ac_preproc_ok; then :
31679  break
31680fi
31681
31682    done
31683    ac_cv_prog_CXXCPP=$CXXCPP
31684
31685fi
31686  CXXCPP=$ac_cv_prog_CXXCPP
31687else
31688  ac_cv_prog_CXXCPP=$CXXCPP
31689fi
31690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31691$as_echo "$CXXCPP" >&6; }
31692ac_preproc_ok=false
31693for ac_cxx_preproc_warn_flag in '' yes
31694do
31695  # Use a header file that comes with gcc, so configuring glibc
31696  # with a fresh cross-compiler works.
31697  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31698  # <limits.h> exists even on freestanding compilers.
31699  # On the NeXT, cc -E runs the code through the compiler's parser,
31700  # not just through cpp. "Syntax error" is here to catch this case.
31701  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31702/* end confdefs.h.  */
31703#ifdef __STDC__
31704# include <limits.h>
31705#else
31706# include <assert.h>
31707#endif
31708		     Syntax error
31709_ACEOF
31710if ac_fn_cxx_try_cpp "$LINENO"; then :
31711
31712else
31713  # Broken: fails on valid input.
31714continue
31715fi
31716rm -f conftest.err conftest.i conftest.$ac_ext
31717
31718  # OK, works on sane cases.  Now check whether nonexistent headers
31719  # can be detected and how.
31720  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31721/* end confdefs.h.  */
31722#include <ac_nonexistent.h>
31723_ACEOF
31724if ac_fn_cxx_try_cpp "$LINENO"; then :
31725  # Broken: success on invalid input.
31726continue
31727else
31728  # Passes both tests.
31729ac_preproc_ok=:
31730break
31731fi
31732rm -f conftest.err conftest.i conftest.$ac_ext
31733
31734done
31735# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31736rm -f conftest.i conftest.err conftest.$ac_ext
31737if $ac_preproc_ok; then :
31738
31739else
31740  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31742as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31743See \`config.log' for more details" "$LINENO" 5; }
31744fi
31745
31746ac_ext=cpp
31747ac_cpp='$CXXCPP $CPPFLAGS'
31748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31751
31752
31753  # Only process if variable expands to non-empty
31754
31755  if test "x$CXXCPP" != x; then
31756    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31757
31758  # First separate the path from the arguments. This will split at the first
31759  # space.
31760  complete="$CXXCPP"
31761  path="${complete%% *}"
31762  tmp="$complete EOL"
31763  arguments="${tmp#* }"
31764
31765  # Input might be given as Windows format, start by converting to
31766  # unix format.
31767  new_path=`$CYGPATH -u "$path"`
31768
31769  # Now try to locate executable using which
31770  new_path=`$WHICH "$new_path" 2> /dev/null`
31771  # bat and cmd files are not always considered executable in cygwin causing which
31772  # to not find them
31773  if test "x$new_path" = x \
31774      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31775      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31776    new_path=`$CYGPATH -u "$path"`
31777  fi
31778  if test "x$new_path" = x; then
31779    # Oops. Which didn't find the executable.
31780    # The splitting of arguments from the executable at a space might have been incorrect,
31781    # since paths with space are more likely in Windows. Give it another try with the whole
31782    # argument.
31783    path="$complete"
31784    arguments="EOL"
31785    new_path=`$CYGPATH -u "$path"`
31786    new_path=`$WHICH "$new_path" 2> /dev/null`
31787    # bat and cmd files are not always considered executable in cygwin causing which
31788    # to not find them
31789    if test "x$new_path" = x \
31790        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31791        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31792      new_path=`$CYGPATH -u "$path"`
31793    fi
31794    if test "x$new_path" = x; then
31795      # It's still not found. Now this is an unrecoverable error.
31796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31797$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31798      has_space=`$ECHO "$complete" | $GREP " "`
31799      if test "x$has_space" != x; then
31800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31802      fi
31803      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31804    fi
31805  fi
31806
31807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31810  # "foo.exe" is OK but "foo" is an error.
31811  #
31812  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31813  # It is also a way to make sure we got the proper file name for the real test later on.
31814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31815  if test "x$test_shortpath" = x; then
31816    # Short path failed, file does not exist as specified.
31817    # Try adding .exe or .cmd
31818    if test -f "${new_path}.exe"; then
31819      input_to_shortpath="${new_path}.exe"
31820    elif test -f "${new_path}.cmd"; then
31821      input_to_shortpath="${new_path}.cmd"
31822    else
31823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31824$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31825      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31826$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31827      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31828    fi
31829  else
31830    input_to_shortpath="$new_path"
31831  fi
31832
31833  # Call helper function which possibly converts this using DOS-style short mode.
31834  # If so, the updated path is stored in $new_path.
31835  new_path="$input_to_shortpath"
31836
31837  input_path="$input_to_shortpath"
31838  # Check if we need to convert this using DOS-style short mode. If the path
31839  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31840  # take no chances and rewrite it.
31841  # Note: m4 eats our [], so we need to use [ and ] instead.
31842  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31843  if test "x$has_forbidden_chars" != x; then
31844    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31845    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31846    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31847    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31848      # Going to short mode and back again did indeed matter. Since short mode is
31849      # case insensitive, let's make it lowercase to improve readability.
31850      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31851      # Now convert it back to Unix-stile (cygpath)
31852      input_path=`$CYGPATH -u "$shortmode_path"`
31853      new_path="$input_path"
31854    fi
31855  fi
31856
31857  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31858  if test "x$test_cygdrive_prefix" = x; then
31859    # As a simple fix, exclude /usr/bin since it's not a real path.
31860    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31861      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31862      # a path prefixed by /cygdrive for fixpath to work.
31863      new_path="$CYGWIN_ROOT_PATH$input_path"
31864    fi
31865  fi
31866
31867  # remove trailing .exe if any
31868  new_path="${new_path/%.exe/}"
31869
31870    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31871
31872  # First separate the path from the arguments. This will split at the first
31873  # space.
31874  complete="$CXXCPP"
31875  path="${complete%% *}"
31876  tmp="$complete EOL"
31877  arguments="${tmp#* }"
31878
31879  # Input might be given as Windows format, start by converting to
31880  # unix format.
31881  new_path="$path"
31882
31883  windows_path="$new_path"
31884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31885    unix_path=`$CYGPATH -u "$windows_path"`
31886    new_path="$unix_path"
31887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31889    new_path="$unix_path"
31890  fi
31891
31892
31893  # Now try to locate executable using which
31894  new_path=`$WHICH "$new_path" 2> /dev/null`
31895
31896  if test "x$new_path" = x; then
31897    # Oops. Which didn't find the executable.
31898    # The splitting of arguments from the executable at a space might have been incorrect,
31899    # since paths with space are more likely in Windows. Give it another try with the whole
31900    # argument.
31901    path="$complete"
31902    arguments="EOL"
31903    new_path="$path"
31904
31905  windows_path="$new_path"
31906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31907    unix_path=`$CYGPATH -u "$windows_path"`
31908    new_path="$unix_path"
31909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31911    new_path="$unix_path"
31912  fi
31913
31914
31915    new_path=`$WHICH "$new_path" 2> /dev/null`
31916    # bat and cmd files are not always considered executable in MSYS causing which
31917    # to not find them
31918    if test "x$new_path" = x \
31919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31921      new_path="$path"
31922
31923  windows_path="$new_path"
31924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31925    unix_path=`$CYGPATH -u "$windows_path"`
31926    new_path="$unix_path"
31927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31929    new_path="$unix_path"
31930  fi
31931
31932    fi
31933
31934    if test "x$new_path" = x; then
31935      # It's still not found. Now this is an unrecoverable error.
31936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31937$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31938      has_space=`$ECHO "$complete" | $GREP " "`
31939      if test "x$has_space" != x; then
31940        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31941$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31942      fi
31943      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31944    fi
31945  fi
31946
31947  # Now new_path has a complete unix path to the binary
31948  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31949    # Keep paths in /bin as-is, but remove trailing .exe if any
31950    new_path="${new_path/%.exe/}"
31951    # Do not save /bin paths to all_fixpath_prefixes!
31952  else
31953    # Not in mixed or Windows style, start by that.
31954    new_path=`cmd //c echo $new_path`
31955
31956  input_path="$new_path"
31957  # Check if we need to convert this using DOS-style short mode. If the path
31958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31959  # take no chances and rewrite it.
31960  # Note: m4 eats our [], so we need to use [ and ] instead.
31961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31962  if test "x$has_forbidden_chars" != x; then
31963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31965  fi
31966
31967    # Output is in $new_path
31968
31969  windows_path="$new_path"
31970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31971    unix_path=`$CYGPATH -u "$windows_path"`
31972    new_path="$unix_path"
31973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31975    new_path="$unix_path"
31976  fi
31977
31978    # remove trailing .exe if any
31979    new_path="${new_path/%.exe/}"
31980
31981    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31982    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31983  fi
31984
31985    else
31986      # We're on a unix platform. Hooray! :)
31987      # First separate the path from the arguments. This will split at the first
31988      # space.
31989      complete="$CXXCPP"
31990      path="${complete%% *}"
31991      tmp="$complete EOL"
31992      arguments="${tmp#* }"
31993
31994      # Cannot rely on the command "which" here since it doesn't always work.
31995      is_absolute_path=`$ECHO "$path" | $GREP ^/`
31996      if test -z "$is_absolute_path"; then
31997        # Path to executable is not absolute. Find it.
31998        IFS_save="$IFS"
31999        IFS=:
32000        for p in $PATH; do
32001          if test -f "$p/$path" && test -x "$p/$path"; then
32002            new_path="$p/$path"
32003            break
32004          fi
32005        done
32006        IFS="$IFS_save"
32007      else
32008        # This is an absolute path, we can use it without further modifications.
32009        new_path="$path"
32010      fi
32011
32012      if test "x$new_path" = x; then
32013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
32014$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
32015        has_space=`$ECHO "$complete" | $GREP " "`
32016        if test "x$has_space" != x; then
32017          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32018$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32019        fi
32020        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
32021      fi
32022    fi
32023
32024    # Now join together the path and the arguments once again
32025    if test "x$arguments" != xEOL; then
32026      new_complete="$new_path ${arguments% *}"
32027    else
32028      new_complete="$new_path"
32029    fi
32030
32031    if test "x$complete" != "x$new_complete"; then
32032      CXXCPP="$new_complete"
32033      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
32034$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
32035    fi
32036  fi
32037
32038
32039  #
32040  # Setup the linker (LD)
32041  #
32042  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32043    # In the Microsoft toolchain we have a separate LD command "link".
32044    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
32045    # a cygwin program for something completely different.
32046    # Extract the first word of "link", so it can be a program name with args.
32047set dummy link; ac_word=$2
32048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32049$as_echo_n "checking for $ac_word... " >&6; }
32050if ${ac_cv_prog_LD+:} false; then :
32051  $as_echo_n "(cached) " >&6
32052else
32053  if test -n "$LD"; then
32054  ac_cv_prog_LD="$LD" # Let the user override the test.
32055else
32056  ac_prog_rejected=no
32057as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32058for as_dir in $PATH
32059do
32060  IFS=$as_save_IFS
32061  test -z "$as_dir" && as_dir=.
32062    for ac_exec_ext in '' $ac_executable_extensions; do
32063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32064    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
32065       ac_prog_rejected=yes
32066       continue
32067     fi
32068    ac_cv_prog_LD="link"
32069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32070    break 2
32071  fi
32072done
32073  done
32074IFS=$as_save_IFS
32075
32076if test $ac_prog_rejected = yes; then
32077  # We found a bogon in the path, so make sure we never use it.
32078  set dummy $ac_cv_prog_LD
32079  shift
32080  if test $# != 0; then
32081    # We chose a different compiler from the bogus one.
32082    # However, it has the same basename, so the bogon will be chosen
32083    # first if we set LD to just the basename; use the full file name.
32084    shift
32085    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
32086  fi
32087fi
32088fi
32089fi
32090LD=$ac_cv_prog_LD
32091if test -n "$LD"; then
32092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
32093$as_echo "$LD" >&6; }
32094else
32095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32096$as_echo "no" >&6; }
32097fi
32098
32099
32100
32101  # Only process if variable expands to non-empty
32102
32103  if test "x$LD" != x; then
32104    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32105
32106  # First separate the path from the arguments. This will split at the first
32107  # space.
32108  complete="$LD"
32109  path="${complete%% *}"
32110  tmp="$complete EOL"
32111  arguments="${tmp#* }"
32112
32113  # Input might be given as Windows format, start by converting to
32114  # unix format.
32115  new_path=`$CYGPATH -u "$path"`
32116
32117  # Now try to locate executable using which
32118  new_path=`$WHICH "$new_path" 2> /dev/null`
32119  # bat and cmd files are not always considered executable in cygwin causing which
32120  # to not find them
32121  if test "x$new_path" = x \
32122      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32123      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32124    new_path=`$CYGPATH -u "$path"`
32125  fi
32126  if test "x$new_path" = x; then
32127    # Oops. Which didn't find the executable.
32128    # The splitting of arguments from the executable at a space might have been incorrect,
32129    # since paths with space are more likely in Windows. Give it another try with the whole
32130    # argument.
32131    path="$complete"
32132    arguments="EOL"
32133    new_path=`$CYGPATH -u "$path"`
32134    new_path=`$WHICH "$new_path" 2> /dev/null`
32135    # bat and cmd files are not always considered executable in cygwin causing which
32136    # to not find them
32137    if test "x$new_path" = x \
32138        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32139        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32140      new_path=`$CYGPATH -u "$path"`
32141    fi
32142    if test "x$new_path" = x; then
32143      # It's still not found. Now this is an unrecoverable error.
32144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32145$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32146      has_space=`$ECHO "$complete" | $GREP " "`
32147      if test "x$has_space" != x; then
32148        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32149$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32150      fi
32151      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32152    fi
32153  fi
32154
32155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32158  # "foo.exe" is OK but "foo" is an error.
32159  #
32160  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32161  # It is also a way to make sure we got the proper file name for the real test later on.
32162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32163  if test "x$test_shortpath" = x; then
32164    # Short path failed, file does not exist as specified.
32165    # Try adding .exe or .cmd
32166    if test -f "${new_path}.exe"; then
32167      input_to_shortpath="${new_path}.exe"
32168    elif test -f "${new_path}.cmd"; then
32169      input_to_shortpath="${new_path}.cmd"
32170    else
32171      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
32172$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
32173      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32174$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32175      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32176    fi
32177  else
32178    input_to_shortpath="$new_path"
32179  fi
32180
32181  # Call helper function which possibly converts this using DOS-style short mode.
32182  # If so, the updated path is stored in $new_path.
32183  new_path="$input_to_shortpath"
32184
32185  input_path="$input_to_shortpath"
32186  # Check if we need to convert this using DOS-style short mode. If the path
32187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32188  # take no chances and rewrite it.
32189  # Note: m4 eats our [], so we need to use [ and ] instead.
32190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32191  if test "x$has_forbidden_chars" != x; then
32192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32193    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32194    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32195    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32196      # Going to short mode and back again did indeed matter. Since short mode is
32197      # case insensitive, let's make it lowercase to improve readability.
32198      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32199      # Now convert it back to Unix-stile (cygpath)
32200      input_path=`$CYGPATH -u "$shortmode_path"`
32201      new_path="$input_path"
32202    fi
32203  fi
32204
32205  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32206  if test "x$test_cygdrive_prefix" = x; then
32207    # As a simple fix, exclude /usr/bin since it's not a real path.
32208    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32209      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32210      # a path prefixed by /cygdrive for fixpath to work.
32211      new_path="$CYGWIN_ROOT_PATH$input_path"
32212    fi
32213  fi
32214
32215  # remove trailing .exe if any
32216  new_path="${new_path/%.exe/}"
32217
32218    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32219
32220  # First separate the path from the arguments. This will split at the first
32221  # space.
32222  complete="$LD"
32223  path="${complete%% *}"
32224  tmp="$complete EOL"
32225  arguments="${tmp#* }"
32226
32227  # Input might be given as Windows format, start by converting to
32228  # unix format.
32229  new_path="$path"
32230
32231  windows_path="$new_path"
32232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32233    unix_path=`$CYGPATH -u "$windows_path"`
32234    new_path="$unix_path"
32235  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32236    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32237    new_path="$unix_path"
32238  fi
32239
32240
32241  # Now try to locate executable using which
32242  new_path=`$WHICH "$new_path" 2> /dev/null`
32243
32244  if test "x$new_path" = x; then
32245    # Oops. Which didn't find the executable.
32246    # The splitting of arguments from the executable at a space might have been incorrect,
32247    # since paths with space are more likely in Windows. Give it another try with the whole
32248    # argument.
32249    path="$complete"
32250    arguments="EOL"
32251    new_path="$path"
32252
32253  windows_path="$new_path"
32254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32255    unix_path=`$CYGPATH -u "$windows_path"`
32256    new_path="$unix_path"
32257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32259    new_path="$unix_path"
32260  fi
32261
32262
32263    new_path=`$WHICH "$new_path" 2> /dev/null`
32264    # bat and cmd files are not always considered executable in MSYS causing which
32265    # to not find them
32266    if test "x$new_path" = x \
32267        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32268        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32269      new_path="$path"
32270
32271  windows_path="$new_path"
32272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32273    unix_path=`$CYGPATH -u "$windows_path"`
32274    new_path="$unix_path"
32275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32277    new_path="$unix_path"
32278  fi
32279
32280    fi
32281
32282    if test "x$new_path" = x; then
32283      # It's still not found. Now this is an unrecoverable error.
32284      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32285$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32286      has_space=`$ECHO "$complete" | $GREP " "`
32287      if test "x$has_space" != x; then
32288        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32289$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32290      fi
32291      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32292    fi
32293  fi
32294
32295  # Now new_path has a complete unix path to the binary
32296  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32297    # Keep paths in /bin as-is, but remove trailing .exe if any
32298    new_path="${new_path/%.exe/}"
32299    # Do not save /bin paths to all_fixpath_prefixes!
32300  else
32301    # Not in mixed or Windows style, start by that.
32302    new_path=`cmd //c echo $new_path`
32303
32304  input_path="$new_path"
32305  # Check if we need to convert this using DOS-style short mode. If the path
32306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32307  # take no chances and rewrite it.
32308  # Note: m4 eats our [], so we need to use [ and ] instead.
32309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32310  if test "x$has_forbidden_chars" != x; then
32311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32313  fi
32314
32315    # Output is in $new_path
32316
32317  windows_path="$new_path"
32318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32319    unix_path=`$CYGPATH -u "$windows_path"`
32320    new_path="$unix_path"
32321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32323    new_path="$unix_path"
32324  fi
32325
32326    # remove trailing .exe if any
32327    new_path="${new_path/%.exe/}"
32328
32329    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32330    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32331  fi
32332
32333    else
32334      # We're on a unix platform. Hooray! :)
32335      # First separate the path from the arguments. This will split at the first
32336      # space.
32337      complete="$LD"
32338      path="${complete%% *}"
32339      tmp="$complete EOL"
32340      arguments="${tmp#* }"
32341
32342      # Cannot rely on the command "which" here since it doesn't always work.
32343      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32344      if test -z "$is_absolute_path"; then
32345        # Path to executable is not absolute. Find it.
32346        IFS_save="$IFS"
32347        IFS=:
32348        for p in $PATH; do
32349          if test -f "$p/$path" && test -x "$p/$path"; then
32350            new_path="$p/$path"
32351            break
32352          fi
32353        done
32354        IFS="$IFS_save"
32355      else
32356        # This is an absolute path, we can use it without further modifications.
32357        new_path="$path"
32358      fi
32359
32360      if test "x$new_path" = x; then
32361        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
32362$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
32363        has_space=`$ECHO "$complete" | $GREP " "`
32364        if test "x$has_space" != x; then
32365          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32366$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32367        fi
32368        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
32369      fi
32370    fi
32371
32372    # Now join together the path and the arguments once again
32373    if test "x$arguments" != xEOL; then
32374      new_complete="$new_path ${arguments% *}"
32375    else
32376      new_complete="$new_path"
32377    fi
32378
32379    if test "x$complete" != "x$new_complete"; then
32380      LD="$new_complete"
32381      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
32382$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
32383    fi
32384  fi
32385
32386    # Verify that we indeed succeeded with this trick.
32387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
32388$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
32389    "$LD" --version > /dev/null
32390    if test $? -eq 0 ; then
32391      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32392$as_echo "no" >&6; }
32393      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
32394    else
32395      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32396$as_echo "yes" >&6; }
32397    fi
32398    LDCXX="$LD"
32399  else
32400    # All other toolchains use the compiler to link.
32401    LD="$CC"
32402    LDCXX="$CXX"
32403  fi
32404
32405  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
32406
32407
32408  #
32409  # Setup the assembler (AS)
32410  #
32411  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
32412    # FIXME: should this really be solaris, or solstudio?
32413
32414
32415  # Publish this variable in the help.
32416
32417
32418  if test "x$AS" = x; then
32419    # The variable is not set by user, try to locate tool using the code snippet
32420    for ac_prog in as
32421do
32422  # Extract the first word of "$ac_prog", so it can be a program name with args.
32423set dummy $ac_prog; ac_word=$2
32424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32425$as_echo_n "checking for $ac_word... " >&6; }
32426if ${ac_cv_path_AS+:} false; then :
32427  $as_echo_n "(cached) " >&6
32428else
32429  case $AS in
32430  [\\/]* | ?:[\\/]*)
32431  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32432  ;;
32433  *)
32434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32435for as_dir in $PATH
32436do
32437  IFS=$as_save_IFS
32438  test -z "$as_dir" && as_dir=.
32439    for ac_exec_ext in '' $ac_executable_extensions; do
32440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32441    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32443    break 2
32444  fi
32445done
32446  done
32447IFS=$as_save_IFS
32448
32449  ;;
32450esac
32451fi
32452AS=$ac_cv_path_AS
32453if test -n "$AS"; then
32454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32455$as_echo "$AS" >&6; }
32456else
32457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32458$as_echo "no" >&6; }
32459fi
32460
32461
32462  test -n "$AS" && break
32463done
32464
32465  else
32466    # The variable is set, but is it from the command line or the environment?
32467
32468    # Try to remove the string !AS! from our list.
32469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
32470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32471      # If it failed, the variable was not from the command line. Ignore it,
32472      # but warn the user (except for BASH, which is always set by the calling BASH).
32473      if test "xAS" != xBASH; then
32474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32475$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32476      fi
32477      # Try to locate tool using the code snippet
32478      for ac_prog in as
32479do
32480  # Extract the first word of "$ac_prog", so it can be a program name with args.
32481set dummy $ac_prog; ac_word=$2
32482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32483$as_echo_n "checking for $ac_word... " >&6; }
32484if ${ac_cv_path_AS+:} false; then :
32485  $as_echo_n "(cached) " >&6
32486else
32487  case $AS in
32488  [\\/]* | ?:[\\/]*)
32489  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32490  ;;
32491  *)
32492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32493for as_dir in $PATH
32494do
32495  IFS=$as_save_IFS
32496  test -z "$as_dir" && as_dir=.
32497    for ac_exec_ext in '' $ac_executable_extensions; do
32498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32499    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32501    break 2
32502  fi
32503done
32504  done
32505IFS=$as_save_IFS
32506
32507  ;;
32508esac
32509fi
32510AS=$ac_cv_path_AS
32511if test -n "$AS"; then
32512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32513$as_echo "$AS" >&6; }
32514else
32515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32516$as_echo "no" >&6; }
32517fi
32518
32519
32520  test -n "$AS" && break
32521done
32522
32523    else
32524      # If it succeeded, then it was overridden by the user. We will use it
32525      # for the tool.
32526
32527      # First remove it from the list of overridden variables, so we can test
32528      # for unknown variables in the end.
32529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32530
32531      # Check if the provided tool contains a complete path.
32532      tool_specified="$AS"
32533      tool_basename="${tool_specified##*/}"
32534      if test "x$tool_basename" = "x$tool_specified"; then
32535        # A command without a complete path is provided, search $PATH.
32536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32537$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32538        # Extract the first word of "$tool_basename", so it can be a program name with args.
32539set dummy $tool_basename; ac_word=$2
32540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32541$as_echo_n "checking for $ac_word... " >&6; }
32542if ${ac_cv_path_AS+:} false; then :
32543  $as_echo_n "(cached) " >&6
32544else
32545  case $AS in
32546  [\\/]* | ?:[\\/]*)
32547  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32548  ;;
32549  *)
32550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32551for as_dir in $PATH
32552do
32553  IFS=$as_save_IFS
32554  test -z "$as_dir" && as_dir=.
32555    for ac_exec_ext in '' $ac_executable_extensions; do
32556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32557    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32559    break 2
32560  fi
32561done
32562  done
32563IFS=$as_save_IFS
32564
32565  ;;
32566esac
32567fi
32568AS=$ac_cv_path_AS
32569if test -n "$AS"; then
32570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32571$as_echo "$AS" >&6; }
32572else
32573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32574$as_echo "no" >&6; }
32575fi
32576
32577
32578        if test "x$AS" = x; then
32579          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32580        fi
32581      else
32582        # Otherwise we believe it is a complete path. Use it as it is.
32583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32584$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32586$as_echo_n "checking for AS... " >&6; }
32587        if test ! -x "$tool_specified"; then
32588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32589$as_echo "not found" >&6; }
32590          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32591        fi
32592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32593$as_echo "$tool_specified" >&6; }
32594      fi
32595    fi
32596  fi
32597
32598
32599
32600  # Only process if variable expands to non-empty
32601
32602  if test "x$AS" != x; then
32603    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32604
32605  # First separate the path from the arguments. This will split at the first
32606  # space.
32607  complete="$AS"
32608  path="${complete%% *}"
32609  tmp="$complete EOL"
32610  arguments="${tmp#* }"
32611
32612  # Input might be given as Windows format, start by converting to
32613  # unix format.
32614  new_path=`$CYGPATH -u "$path"`
32615
32616  # Now try to locate executable using which
32617  new_path=`$WHICH "$new_path" 2> /dev/null`
32618  # bat and cmd files are not always considered executable in cygwin causing which
32619  # to not find them
32620  if test "x$new_path" = x \
32621      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32622      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32623    new_path=`$CYGPATH -u "$path"`
32624  fi
32625  if test "x$new_path" = x; then
32626    # Oops. Which didn't find the executable.
32627    # The splitting of arguments from the executable at a space might have been incorrect,
32628    # since paths with space are more likely in Windows. Give it another try with the whole
32629    # argument.
32630    path="$complete"
32631    arguments="EOL"
32632    new_path=`$CYGPATH -u "$path"`
32633    new_path=`$WHICH "$new_path" 2> /dev/null`
32634    # bat and cmd files are not always considered executable in cygwin causing which
32635    # to not find them
32636    if test "x$new_path" = x \
32637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32639      new_path=`$CYGPATH -u "$path"`
32640    fi
32641    if test "x$new_path" = x; then
32642      # It's still not found. Now this is an unrecoverable error.
32643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32644$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32645      has_space=`$ECHO "$complete" | $GREP " "`
32646      if test "x$has_space" != x; then
32647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32649      fi
32650      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32651    fi
32652  fi
32653
32654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32657  # "foo.exe" is OK but "foo" is an error.
32658  #
32659  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32660  # It is also a way to make sure we got the proper file name for the real test later on.
32661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32662  if test "x$test_shortpath" = x; then
32663    # Short path failed, file does not exist as specified.
32664    # Try adding .exe or .cmd
32665    if test -f "${new_path}.exe"; then
32666      input_to_shortpath="${new_path}.exe"
32667    elif test -f "${new_path}.cmd"; then
32668      input_to_shortpath="${new_path}.cmd"
32669    else
32670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32671$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32674      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32675    fi
32676  else
32677    input_to_shortpath="$new_path"
32678  fi
32679
32680  # Call helper function which possibly converts this using DOS-style short mode.
32681  # If so, the updated path is stored in $new_path.
32682  new_path="$input_to_shortpath"
32683
32684  input_path="$input_to_shortpath"
32685  # Check if we need to convert this using DOS-style short mode. If the path
32686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32687  # take no chances and rewrite it.
32688  # Note: m4 eats our [], so we need to use [ and ] instead.
32689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32690  if test "x$has_forbidden_chars" != x; then
32691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32695      # Going to short mode and back again did indeed matter. Since short mode is
32696      # case insensitive, let's make it lowercase to improve readability.
32697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32698      # Now convert it back to Unix-stile (cygpath)
32699      input_path=`$CYGPATH -u "$shortmode_path"`
32700      new_path="$input_path"
32701    fi
32702  fi
32703
32704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32705  if test "x$test_cygdrive_prefix" = x; then
32706    # As a simple fix, exclude /usr/bin since it's not a real path.
32707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32709      # a path prefixed by /cygdrive for fixpath to work.
32710      new_path="$CYGWIN_ROOT_PATH$input_path"
32711    fi
32712  fi
32713
32714  # remove trailing .exe if any
32715  new_path="${new_path/%.exe/}"
32716
32717    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32718
32719  # First separate the path from the arguments. This will split at the first
32720  # space.
32721  complete="$AS"
32722  path="${complete%% *}"
32723  tmp="$complete EOL"
32724  arguments="${tmp#* }"
32725
32726  # Input might be given as Windows format, start by converting to
32727  # unix format.
32728  new_path="$path"
32729
32730  windows_path="$new_path"
32731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32732    unix_path=`$CYGPATH -u "$windows_path"`
32733    new_path="$unix_path"
32734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32736    new_path="$unix_path"
32737  fi
32738
32739
32740  # Now try to locate executable using which
32741  new_path=`$WHICH "$new_path" 2> /dev/null`
32742
32743  if test "x$new_path" = x; then
32744    # Oops. Which didn't find the executable.
32745    # The splitting of arguments from the executable at a space might have been incorrect,
32746    # since paths with space are more likely in Windows. Give it another try with the whole
32747    # argument.
32748    path="$complete"
32749    arguments="EOL"
32750    new_path="$path"
32751
32752  windows_path="$new_path"
32753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32754    unix_path=`$CYGPATH -u "$windows_path"`
32755    new_path="$unix_path"
32756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32758    new_path="$unix_path"
32759  fi
32760
32761
32762    new_path=`$WHICH "$new_path" 2> /dev/null`
32763    # bat and cmd files are not always considered executable in MSYS causing which
32764    # to not find them
32765    if test "x$new_path" = x \
32766        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32767        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32768      new_path="$path"
32769
32770  windows_path="$new_path"
32771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32772    unix_path=`$CYGPATH -u "$windows_path"`
32773    new_path="$unix_path"
32774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32776    new_path="$unix_path"
32777  fi
32778
32779    fi
32780
32781    if test "x$new_path" = x; then
32782      # It's still not found. Now this is an unrecoverable error.
32783      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32784$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32785      has_space=`$ECHO "$complete" | $GREP " "`
32786      if test "x$has_space" != x; then
32787        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32788$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32789      fi
32790      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32791    fi
32792  fi
32793
32794  # Now new_path has a complete unix path to the binary
32795  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32796    # Keep paths in /bin as-is, but remove trailing .exe if any
32797    new_path="${new_path/%.exe/}"
32798    # Do not save /bin paths to all_fixpath_prefixes!
32799  else
32800    # Not in mixed or Windows style, start by that.
32801    new_path=`cmd //c echo $new_path`
32802
32803  input_path="$new_path"
32804  # Check if we need to convert this using DOS-style short mode. If the path
32805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32806  # take no chances and rewrite it.
32807  # Note: m4 eats our [], so we need to use [ and ] instead.
32808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32809  if test "x$has_forbidden_chars" != x; then
32810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32812  fi
32813
32814    # Output is in $new_path
32815
32816  windows_path="$new_path"
32817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32818    unix_path=`$CYGPATH -u "$windows_path"`
32819    new_path="$unix_path"
32820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32822    new_path="$unix_path"
32823  fi
32824
32825    # remove trailing .exe if any
32826    new_path="${new_path/%.exe/}"
32827
32828    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32829    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32830  fi
32831
32832    else
32833      # We're on a unix platform. Hooray! :)
32834      # First separate the path from the arguments. This will split at the first
32835      # space.
32836      complete="$AS"
32837      path="${complete%% *}"
32838      tmp="$complete EOL"
32839      arguments="${tmp#* }"
32840
32841      # Cannot rely on the command "which" here since it doesn't always work.
32842      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32843      if test -z "$is_absolute_path"; then
32844        # Path to executable is not absolute. Find it.
32845        IFS_save="$IFS"
32846        IFS=:
32847        for p in $PATH; do
32848          if test -f "$p/$path" && test -x "$p/$path"; then
32849            new_path="$p/$path"
32850            break
32851          fi
32852        done
32853        IFS="$IFS_save"
32854      else
32855        # This is an absolute path, we can use it without further modifications.
32856        new_path="$path"
32857      fi
32858
32859      if test "x$new_path" = x; then
32860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32861$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32862        has_space=`$ECHO "$complete" | $GREP " "`
32863        if test "x$has_space" != x; then
32864          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32865$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32866        fi
32867        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32868      fi
32869    fi
32870
32871    # Now join together the path and the arguments once again
32872    if test "x$arguments" != xEOL; then
32873      new_complete="$new_path ${arguments% *}"
32874    else
32875      new_complete="$new_path"
32876    fi
32877
32878    if test "x$complete" != "x$new_complete"; then
32879      AS="$new_complete"
32880      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32881$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32882    fi
32883  fi
32884
32885  else
32886    # FIXME: is this correct for microsoft?
32887    AS="$CC -c"
32888  fi
32889
32890
32891  #
32892  # Setup the archiver (AR)
32893  #
32894  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32895    # The corresponding ar tool is lib.exe (used to create static libraries)
32896    # Extract the first word of "lib", so it can be a program name with args.
32897set dummy lib; ac_word=$2
32898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32899$as_echo_n "checking for $ac_word... " >&6; }
32900if ${ac_cv_prog_AR+:} false; then :
32901  $as_echo_n "(cached) " >&6
32902else
32903  if test -n "$AR"; then
32904  ac_cv_prog_AR="$AR" # Let the user override the test.
32905else
32906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32907for as_dir in $PATH
32908do
32909  IFS=$as_save_IFS
32910  test -z "$as_dir" && as_dir=.
32911    for ac_exec_ext in '' $ac_executable_extensions; do
32912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32913    ac_cv_prog_AR="lib"
32914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32915    break 2
32916  fi
32917done
32918  done
32919IFS=$as_save_IFS
32920
32921fi
32922fi
32923AR=$ac_cv_prog_AR
32924if test -n "$AR"; then
32925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32926$as_echo "$AR" >&6; }
32927else
32928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32929$as_echo "no" >&6; }
32930fi
32931
32932
32933  else
32934
32935
32936  # Publish this variable in the help.
32937
32938
32939  if test "x$AR" = x; then
32940    # The variable is not set by user, try to locate tool using the code snippet
32941    if test -n "$ac_tool_prefix"; then
32942  for ac_prog in ar
32943  do
32944    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32945set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32947$as_echo_n "checking for $ac_word... " >&6; }
32948if ${ac_cv_prog_AR+:} false; then :
32949  $as_echo_n "(cached) " >&6
32950else
32951  if test -n "$AR"; then
32952  ac_cv_prog_AR="$AR" # Let the user override the test.
32953else
32954as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32955for as_dir in $PATH
32956do
32957  IFS=$as_save_IFS
32958  test -z "$as_dir" && as_dir=.
32959    for ac_exec_ext in '' $ac_executable_extensions; do
32960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32961    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32963    break 2
32964  fi
32965done
32966  done
32967IFS=$as_save_IFS
32968
32969fi
32970fi
32971AR=$ac_cv_prog_AR
32972if test -n "$AR"; then
32973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32974$as_echo "$AR" >&6; }
32975else
32976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32977$as_echo "no" >&6; }
32978fi
32979
32980
32981    test -n "$AR" && break
32982  done
32983fi
32984if test -z "$AR"; then
32985  ac_ct_AR=$AR
32986  for ac_prog in ar
32987do
32988  # Extract the first word of "$ac_prog", so it can be a program name with args.
32989set dummy $ac_prog; ac_word=$2
32990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32991$as_echo_n "checking for $ac_word... " >&6; }
32992if ${ac_cv_prog_ac_ct_AR+:} false; then :
32993  $as_echo_n "(cached) " >&6
32994else
32995  if test -n "$ac_ct_AR"; then
32996  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32997else
32998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32999for as_dir in $PATH
33000do
33001  IFS=$as_save_IFS
33002  test -z "$as_dir" && as_dir=.
33003    for ac_exec_ext in '' $ac_executable_extensions; do
33004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33005    ac_cv_prog_ac_ct_AR="$ac_prog"
33006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33007    break 2
33008  fi
33009done
33010  done
33011IFS=$as_save_IFS
33012
33013fi
33014fi
33015ac_ct_AR=$ac_cv_prog_ac_ct_AR
33016if test -n "$ac_ct_AR"; then
33017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33018$as_echo "$ac_ct_AR" >&6; }
33019else
33020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33021$as_echo "no" >&6; }
33022fi
33023
33024
33025  test -n "$ac_ct_AR" && break
33026done
33027
33028  if test "x$ac_ct_AR" = x; then
33029    AR=""
33030  else
33031    case $cross_compiling:$ac_tool_warned in
33032yes:)
33033{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33034$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33035ac_tool_warned=yes ;;
33036esac
33037    AR=$ac_ct_AR
33038  fi
33039fi
33040
33041  else
33042    # The variable is set, but is it from the command line or the environment?
33043
33044    # Try to remove the string !AR! from our list.
33045    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
33046    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33047      # If it failed, the variable was not from the command line. Ignore it,
33048      # but warn the user (except for BASH, which is always set by the calling BASH).
33049      if test "xAR" != xBASH; then
33050        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
33051$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
33052      fi
33053      # Try to locate tool using the code snippet
33054      if test -n "$ac_tool_prefix"; then
33055  for ac_prog in ar
33056  do
33057    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33058set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33060$as_echo_n "checking for $ac_word... " >&6; }
33061if ${ac_cv_prog_AR+:} false; then :
33062  $as_echo_n "(cached) " >&6
33063else
33064  if test -n "$AR"; then
33065  ac_cv_prog_AR="$AR" # Let the user override the test.
33066else
33067as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33068for as_dir in $PATH
33069do
33070  IFS=$as_save_IFS
33071  test -z "$as_dir" && as_dir=.
33072    for ac_exec_ext in '' $ac_executable_extensions; do
33073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33074    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
33075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33076    break 2
33077  fi
33078done
33079  done
33080IFS=$as_save_IFS
33081
33082fi
33083fi
33084AR=$ac_cv_prog_AR
33085if test -n "$AR"; then
33086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33087$as_echo "$AR" >&6; }
33088else
33089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33090$as_echo "no" >&6; }
33091fi
33092
33093
33094    test -n "$AR" && break
33095  done
33096fi
33097if test -z "$AR"; then
33098  ac_ct_AR=$AR
33099  for ac_prog in ar
33100do
33101  # Extract the first word of "$ac_prog", so it can be a program name with args.
33102set dummy $ac_prog; ac_word=$2
33103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33104$as_echo_n "checking for $ac_word... " >&6; }
33105if ${ac_cv_prog_ac_ct_AR+:} false; then :
33106  $as_echo_n "(cached) " >&6
33107else
33108  if test -n "$ac_ct_AR"; then
33109  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
33110else
33111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33112for as_dir in $PATH
33113do
33114  IFS=$as_save_IFS
33115  test -z "$as_dir" && as_dir=.
33116    for ac_exec_ext in '' $ac_executable_extensions; do
33117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33118    ac_cv_prog_ac_ct_AR="$ac_prog"
33119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33120    break 2
33121  fi
33122done
33123  done
33124IFS=$as_save_IFS
33125
33126fi
33127fi
33128ac_ct_AR=$ac_cv_prog_ac_ct_AR
33129if test -n "$ac_ct_AR"; then
33130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
33131$as_echo "$ac_ct_AR" >&6; }
33132else
33133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33134$as_echo "no" >&6; }
33135fi
33136
33137
33138  test -n "$ac_ct_AR" && break
33139done
33140
33141  if test "x$ac_ct_AR" = x; then
33142    AR=""
33143  else
33144    case $cross_compiling:$ac_tool_warned in
33145yes:)
33146{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33147$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33148ac_tool_warned=yes ;;
33149esac
33150    AR=$ac_ct_AR
33151  fi
33152fi
33153
33154    else
33155      # If it succeeded, then it was overridden by the user. We will use it
33156      # for the tool.
33157
33158      # First remove it from the list of overridden variables, so we can test
33159      # for unknown variables in the end.
33160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33161
33162      # Check if the provided tool contains a complete path.
33163      tool_specified="$AR"
33164      tool_basename="${tool_specified##*/}"
33165      if test "x$tool_basename" = "x$tool_specified"; then
33166        # A command without a complete path is provided, search $PATH.
33167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
33168$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
33169        # Extract the first word of "$tool_basename", so it can be a program name with args.
33170set dummy $tool_basename; ac_word=$2
33171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33172$as_echo_n "checking for $ac_word... " >&6; }
33173if ${ac_cv_path_AR+:} false; then :
33174  $as_echo_n "(cached) " >&6
33175else
33176  case $AR in
33177  [\\/]* | ?:[\\/]*)
33178  ac_cv_path_AR="$AR" # Let the user override the test with a path.
33179  ;;
33180  *)
33181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33182for as_dir in $PATH
33183do
33184  IFS=$as_save_IFS
33185  test -z "$as_dir" && as_dir=.
33186    for ac_exec_ext in '' $ac_executable_extensions; do
33187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33188    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
33189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33190    break 2
33191  fi
33192done
33193  done
33194IFS=$as_save_IFS
33195
33196  ;;
33197esac
33198fi
33199AR=$ac_cv_path_AR
33200if test -n "$AR"; then
33201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
33202$as_echo "$AR" >&6; }
33203else
33204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33205$as_echo "no" >&6; }
33206fi
33207
33208
33209        if test "x$AR" = x; then
33210          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33211        fi
33212      else
33213        # Otherwise we believe it is a complete path. Use it as it is.
33214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
33215$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
33216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
33217$as_echo_n "checking for AR... " >&6; }
33218        if test ! -x "$tool_specified"; then
33219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33220$as_echo "not found" >&6; }
33221          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
33222        fi
33223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33224$as_echo "$tool_specified" >&6; }
33225      fi
33226    fi
33227  fi
33228
33229
33230  fi
33231
33232  # Only process if variable expands to non-empty
33233
33234  if test "x$AR" != x; then
33235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33236
33237  # First separate the path from the arguments. This will split at the first
33238  # space.
33239  complete="$AR"
33240  path="${complete%% *}"
33241  tmp="$complete EOL"
33242  arguments="${tmp#* }"
33243
33244  # Input might be given as Windows format, start by converting to
33245  # unix format.
33246  new_path=`$CYGPATH -u "$path"`
33247
33248  # Now try to locate executable using which
33249  new_path=`$WHICH "$new_path" 2> /dev/null`
33250  # bat and cmd files are not always considered executable in cygwin causing which
33251  # to not find them
33252  if test "x$new_path" = x \
33253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33255    new_path=`$CYGPATH -u "$path"`
33256  fi
33257  if test "x$new_path" = x; then
33258    # Oops. Which didn't find the executable.
33259    # The splitting of arguments from the executable at a space might have been incorrect,
33260    # since paths with space are more likely in Windows. Give it another try with the whole
33261    # argument.
33262    path="$complete"
33263    arguments="EOL"
33264    new_path=`$CYGPATH -u "$path"`
33265    new_path=`$WHICH "$new_path" 2> /dev/null`
33266    # bat and cmd files are not always considered executable in cygwin causing which
33267    # to not find them
33268    if test "x$new_path" = x \
33269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33271      new_path=`$CYGPATH -u "$path"`
33272    fi
33273    if test "x$new_path" = x; then
33274      # It's still not found. Now this is an unrecoverable error.
33275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33276$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33277      has_space=`$ECHO "$complete" | $GREP " "`
33278      if test "x$has_space" != x; then
33279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33281      fi
33282      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33283    fi
33284  fi
33285
33286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33289  # "foo.exe" is OK but "foo" is an error.
33290  #
33291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33292  # It is also a way to make sure we got the proper file name for the real test later on.
33293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33294  if test "x$test_shortpath" = x; then
33295    # Short path failed, file does not exist as specified.
33296    # Try adding .exe or .cmd
33297    if test -f "${new_path}.exe"; then
33298      input_to_shortpath="${new_path}.exe"
33299    elif test -f "${new_path}.cmd"; then
33300      input_to_shortpath="${new_path}.cmd"
33301    else
33302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
33303$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
33304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33306      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33307    fi
33308  else
33309    input_to_shortpath="$new_path"
33310  fi
33311
33312  # Call helper function which possibly converts this using DOS-style short mode.
33313  # If so, the updated path is stored in $new_path.
33314  new_path="$input_to_shortpath"
33315
33316  input_path="$input_to_shortpath"
33317  # Check if we need to convert this using DOS-style short mode. If the path
33318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33319  # take no chances and rewrite it.
33320  # Note: m4 eats our [], so we need to use [ and ] instead.
33321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33322  if test "x$has_forbidden_chars" != x; then
33323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33327      # Going to short mode and back again did indeed matter. Since short mode is
33328      # case insensitive, let's make it lowercase to improve readability.
33329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33330      # Now convert it back to Unix-stile (cygpath)
33331      input_path=`$CYGPATH -u "$shortmode_path"`
33332      new_path="$input_path"
33333    fi
33334  fi
33335
33336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33337  if test "x$test_cygdrive_prefix" = x; then
33338    # As a simple fix, exclude /usr/bin since it's not a real path.
33339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33341      # a path prefixed by /cygdrive for fixpath to work.
33342      new_path="$CYGWIN_ROOT_PATH$input_path"
33343    fi
33344  fi
33345
33346  # remove trailing .exe if any
33347  new_path="${new_path/%.exe/}"
33348
33349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33350
33351  # First separate the path from the arguments. This will split at the first
33352  # space.
33353  complete="$AR"
33354  path="${complete%% *}"
33355  tmp="$complete EOL"
33356  arguments="${tmp#* }"
33357
33358  # Input might be given as Windows format, start by converting to
33359  # unix format.
33360  new_path="$path"
33361
33362  windows_path="$new_path"
33363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33364    unix_path=`$CYGPATH -u "$windows_path"`
33365    new_path="$unix_path"
33366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33368    new_path="$unix_path"
33369  fi
33370
33371
33372  # Now try to locate executable using which
33373  new_path=`$WHICH "$new_path" 2> /dev/null`
33374
33375  if test "x$new_path" = x; then
33376    # Oops. Which didn't find the executable.
33377    # The splitting of arguments from the executable at a space might have been incorrect,
33378    # since paths with space are more likely in Windows. Give it another try with the whole
33379    # argument.
33380    path="$complete"
33381    arguments="EOL"
33382    new_path="$path"
33383
33384  windows_path="$new_path"
33385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386    unix_path=`$CYGPATH -u "$windows_path"`
33387    new_path="$unix_path"
33388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33390    new_path="$unix_path"
33391  fi
33392
33393
33394    new_path=`$WHICH "$new_path" 2> /dev/null`
33395    # bat and cmd files are not always considered executable in MSYS causing which
33396    # to not find them
33397    if test "x$new_path" = x \
33398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33400      new_path="$path"
33401
33402  windows_path="$new_path"
33403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33404    unix_path=`$CYGPATH -u "$windows_path"`
33405    new_path="$unix_path"
33406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33408    new_path="$unix_path"
33409  fi
33410
33411    fi
33412
33413    if test "x$new_path" = x; then
33414      # It's still not found. Now this is an unrecoverable error.
33415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33416$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33417      has_space=`$ECHO "$complete" | $GREP " "`
33418      if test "x$has_space" != x; then
33419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33421      fi
33422      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33423    fi
33424  fi
33425
33426  # Now new_path has a complete unix path to the binary
33427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33428    # Keep paths in /bin as-is, but remove trailing .exe if any
33429    new_path="${new_path/%.exe/}"
33430    # Do not save /bin paths to all_fixpath_prefixes!
33431  else
33432    # Not in mixed or Windows style, start by that.
33433    new_path=`cmd //c echo $new_path`
33434
33435  input_path="$new_path"
33436  # Check if we need to convert this using DOS-style short mode. If the path
33437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33438  # take no chances and rewrite it.
33439  # Note: m4 eats our [], so we need to use [ and ] instead.
33440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33441  if test "x$has_forbidden_chars" != x; then
33442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33444  fi
33445
33446    # Output is in $new_path
33447
33448  windows_path="$new_path"
33449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33450    unix_path=`$CYGPATH -u "$windows_path"`
33451    new_path="$unix_path"
33452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33454    new_path="$unix_path"
33455  fi
33456
33457    # remove trailing .exe if any
33458    new_path="${new_path/%.exe/}"
33459
33460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33462  fi
33463
33464    else
33465      # We're on a unix platform. Hooray! :)
33466      # First separate the path from the arguments. This will split at the first
33467      # space.
33468      complete="$AR"
33469      path="${complete%% *}"
33470      tmp="$complete EOL"
33471      arguments="${tmp#* }"
33472
33473      # Cannot rely on the command "which" here since it doesn't always work.
33474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33475      if test -z "$is_absolute_path"; then
33476        # Path to executable is not absolute. Find it.
33477        IFS_save="$IFS"
33478        IFS=:
33479        for p in $PATH; do
33480          if test -f "$p/$path" && test -x "$p/$path"; then
33481            new_path="$p/$path"
33482            break
33483          fi
33484        done
33485        IFS="$IFS_save"
33486      else
33487        # This is an absolute path, we can use it without further modifications.
33488        new_path="$path"
33489      fi
33490
33491      if test "x$new_path" = x; then
33492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
33493$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
33494        has_space=`$ECHO "$complete" | $GREP " "`
33495        if test "x$has_space" != x; then
33496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33498        fi
33499        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
33500      fi
33501    fi
33502
33503    # Now join together the path and the arguments once again
33504    if test "x$arguments" != xEOL; then
33505      new_complete="$new_path ${arguments% *}"
33506    else
33507      new_complete="$new_path"
33508    fi
33509
33510    if test "x$complete" != "x$new_complete"; then
33511      AR="$new_complete"
33512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33513$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33514    fi
33515  fi
33516
33517
33518
33519  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33520
33521
33522  # Publish this variable in the help.
33523
33524
33525  if test "x$LIPO" = x; then
33526    # The variable is not set by user, try to locate tool using the code snippet
33527    for ac_prog in lipo
33528do
33529  # Extract the first word of "$ac_prog", so it can be a program name with args.
33530set dummy $ac_prog; ac_word=$2
33531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33532$as_echo_n "checking for $ac_word... " >&6; }
33533if ${ac_cv_path_LIPO+:} false; then :
33534  $as_echo_n "(cached) " >&6
33535else
33536  case $LIPO in
33537  [\\/]* | ?:[\\/]*)
33538  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33539  ;;
33540  *)
33541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33542for as_dir in $PATH
33543do
33544  IFS=$as_save_IFS
33545  test -z "$as_dir" && as_dir=.
33546    for ac_exec_ext in '' $ac_executable_extensions; do
33547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33548    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33550    break 2
33551  fi
33552done
33553  done
33554IFS=$as_save_IFS
33555
33556  ;;
33557esac
33558fi
33559LIPO=$ac_cv_path_LIPO
33560if test -n "$LIPO"; then
33561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33562$as_echo "$LIPO" >&6; }
33563else
33564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33565$as_echo "no" >&6; }
33566fi
33567
33568
33569  test -n "$LIPO" && break
33570done
33571
33572  else
33573    # The variable is set, but is it from the command line or the environment?
33574
33575    # Try to remove the string !LIPO! from our list.
33576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33578      # If it failed, the variable was not from the command line. Ignore it,
33579      # but warn the user (except for BASH, which is always set by the calling BASH).
33580      if test "xLIPO" != xBASH; then
33581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33582$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33583      fi
33584      # Try to locate tool using the code snippet
33585      for ac_prog in lipo
33586do
33587  # Extract the first word of "$ac_prog", so it can be a program name with args.
33588set dummy $ac_prog; ac_word=$2
33589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33590$as_echo_n "checking for $ac_word... " >&6; }
33591if ${ac_cv_path_LIPO+:} false; then :
33592  $as_echo_n "(cached) " >&6
33593else
33594  case $LIPO in
33595  [\\/]* | ?:[\\/]*)
33596  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33597  ;;
33598  *)
33599  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33600for as_dir in $PATH
33601do
33602  IFS=$as_save_IFS
33603  test -z "$as_dir" && as_dir=.
33604    for ac_exec_ext in '' $ac_executable_extensions; do
33605  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33606    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33607    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33608    break 2
33609  fi
33610done
33611  done
33612IFS=$as_save_IFS
33613
33614  ;;
33615esac
33616fi
33617LIPO=$ac_cv_path_LIPO
33618if test -n "$LIPO"; then
33619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33620$as_echo "$LIPO" >&6; }
33621else
33622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33623$as_echo "no" >&6; }
33624fi
33625
33626
33627  test -n "$LIPO" && break
33628done
33629
33630    else
33631      # If it succeeded, then it was overridden by the user. We will use it
33632      # for the tool.
33633
33634      # First remove it from the list of overridden variables, so we can test
33635      # for unknown variables in the end.
33636      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33637
33638      # Check if the provided tool contains a complete path.
33639      tool_specified="$LIPO"
33640      tool_basename="${tool_specified##*/}"
33641      if test "x$tool_basename" = "x$tool_specified"; then
33642        # A command without a complete path is provided, search $PATH.
33643        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33644$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33645        # Extract the first word of "$tool_basename", so it can be a program name with args.
33646set dummy $tool_basename; ac_word=$2
33647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33648$as_echo_n "checking for $ac_word... " >&6; }
33649if ${ac_cv_path_LIPO+:} false; then :
33650  $as_echo_n "(cached) " >&6
33651else
33652  case $LIPO in
33653  [\\/]* | ?:[\\/]*)
33654  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33655  ;;
33656  *)
33657  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33658for as_dir in $PATH
33659do
33660  IFS=$as_save_IFS
33661  test -z "$as_dir" && as_dir=.
33662    for ac_exec_ext in '' $ac_executable_extensions; do
33663  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33664    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33665    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33666    break 2
33667  fi
33668done
33669  done
33670IFS=$as_save_IFS
33671
33672  ;;
33673esac
33674fi
33675LIPO=$ac_cv_path_LIPO
33676if test -n "$LIPO"; then
33677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33678$as_echo "$LIPO" >&6; }
33679else
33680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33681$as_echo "no" >&6; }
33682fi
33683
33684
33685        if test "x$LIPO" = x; then
33686          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33687        fi
33688      else
33689        # Otherwise we believe it is a complete path. Use it as it is.
33690        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33691$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33692        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33693$as_echo_n "checking for LIPO... " >&6; }
33694        if test ! -x "$tool_specified"; then
33695          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33696$as_echo "not found" >&6; }
33697          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33698        fi
33699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33700$as_echo "$tool_specified" >&6; }
33701      fi
33702    fi
33703  fi
33704
33705
33706
33707  # Only process if variable expands to non-empty
33708
33709  if test "x$LIPO" != x; then
33710    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33711
33712  # First separate the path from the arguments. This will split at the first
33713  # space.
33714  complete="$LIPO"
33715  path="${complete%% *}"
33716  tmp="$complete EOL"
33717  arguments="${tmp#* }"
33718
33719  # Input might be given as Windows format, start by converting to
33720  # unix format.
33721  new_path=`$CYGPATH -u "$path"`
33722
33723  # Now try to locate executable using which
33724  new_path=`$WHICH "$new_path" 2> /dev/null`
33725  # bat and cmd files are not always considered executable in cygwin causing which
33726  # to not find them
33727  if test "x$new_path" = x \
33728      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33729      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33730    new_path=`$CYGPATH -u "$path"`
33731  fi
33732  if test "x$new_path" = x; then
33733    # Oops. Which didn't find the executable.
33734    # The splitting of arguments from the executable at a space might have been incorrect,
33735    # since paths with space are more likely in Windows. Give it another try with the whole
33736    # argument.
33737    path="$complete"
33738    arguments="EOL"
33739    new_path=`$CYGPATH -u "$path"`
33740    new_path=`$WHICH "$new_path" 2> /dev/null`
33741    # bat and cmd files are not always considered executable in cygwin causing which
33742    # to not find them
33743    if test "x$new_path" = x \
33744        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33745        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33746      new_path=`$CYGPATH -u "$path"`
33747    fi
33748    if test "x$new_path" = x; then
33749      # It's still not found. Now this is an unrecoverable error.
33750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33751$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33752      has_space=`$ECHO "$complete" | $GREP " "`
33753      if test "x$has_space" != x; then
33754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33756      fi
33757      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33758    fi
33759  fi
33760
33761  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33762  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33763  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33764  # "foo.exe" is OK but "foo" is an error.
33765  #
33766  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33767  # It is also a way to make sure we got the proper file name for the real test later on.
33768  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33769  if test "x$test_shortpath" = x; then
33770    # Short path failed, file does not exist as specified.
33771    # Try adding .exe or .cmd
33772    if test -f "${new_path}.exe"; then
33773      input_to_shortpath="${new_path}.exe"
33774    elif test -f "${new_path}.cmd"; then
33775      input_to_shortpath="${new_path}.cmd"
33776    else
33777      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33778$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33779      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33780$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33781      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33782    fi
33783  else
33784    input_to_shortpath="$new_path"
33785  fi
33786
33787  # Call helper function which possibly converts this using DOS-style short mode.
33788  # If so, the updated path is stored in $new_path.
33789  new_path="$input_to_shortpath"
33790
33791  input_path="$input_to_shortpath"
33792  # Check if we need to convert this using DOS-style short mode. If the path
33793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33794  # take no chances and rewrite it.
33795  # Note: m4 eats our [], so we need to use [ and ] instead.
33796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33797  if test "x$has_forbidden_chars" != x; then
33798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33802      # Going to short mode and back again did indeed matter. Since short mode is
33803      # case insensitive, let's make it lowercase to improve readability.
33804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33805      # Now convert it back to Unix-stile (cygpath)
33806      input_path=`$CYGPATH -u "$shortmode_path"`
33807      new_path="$input_path"
33808    fi
33809  fi
33810
33811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33812  if test "x$test_cygdrive_prefix" = x; then
33813    # As a simple fix, exclude /usr/bin since it's not a real path.
33814    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33816      # a path prefixed by /cygdrive for fixpath to work.
33817      new_path="$CYGWIN_ROOT_PATH$input_path"
33818    fi
33819  fi
33820
33821  # remove trailing .exe if any
33822  new_path="${new_path/%.exe/}"
33823
33824    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33825
33826  # First separate the path from the arguments. This will split at the first
33827  # space.
33828  complete="$LIPO"
33829  path="${complete%% *}"
33830  tmp="$complete EOL"
33831  arguments="${tmp#* }"
33832
33833  # Input might be given as Windows format, start by converting to
33834  # unix format.
33835  new_path="$path"
33836
33837  windows_path="$new_path"
33838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33839    unix_path=`$CYGPATH -u "$windows_path"`
33840    new_path="$unix_path"
33841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33843    new_path="$unix_path"
33844  fi
33845
33846
33847  # Now try to locate executable using which
33848  new_path=`$WHICH "$new_path" 2> /dev/null`
33849
33850  if test "x$new_path" = x; then
33851    # Oops. Which didn't find the executable.
33852    # The splitting of arguments from the executable at a space might have been incorrect,
33853    # since paths with space are more likely in Windows. Give it another try with the whole
33854    # argument.
33855    path="$complete"
33856    arguments="EOL"
33857    new_path="$path"
33858
33859  windows_path="$new_path"
33860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33861    unix_path=`$CYGPATH -u "$windows_path"`
33862    new_path="$unix_path"
33863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33865    new_path="$unix_path"
33866  fi
33867
33868
33869    new_path=`$WHICH "$new_path" 2> /dev/null`
33870    # bat and cmd files are not always considered executable in MSYS causing which
33871    # to not find them
33872    if test "x$new_path" = x \
33873        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33874        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33875      new_path="$path"
33876
33877  windows_path="$new_path"
33878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33879    unix_path=`$CYGPATH -u "$windows_path"`
33880    new_path="$unix_path"
33881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33883    new_path="$unix_path"
33884  fi
33885
33886    fi
33887
33888    if test "x$new_path" = x; then
33889      # It's still not found. Now this is an unrecoverable error.
33890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33891$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33892      has_space=`$ECHO "$complete" | $GREP " "`
33893      if test "x$has_space" != x; then
33894        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33895$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33896      fi
33897      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33898    fi
33899  fi
33900
33901  # Now new_path has a complete unix path to the binary
33902  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33903    # Keep paths in /bin as-is, but remove trailing .exe if any
33904    new_path="${new_path/%.exe/}"
33905    # Do not save /bin paths to all_fixpath_prefixes!
33906  else
33907    # Not in mixed or Windows style, start by that.
33908    new_path=`cmd //c echo $new_path`
33909
33910  input_path="$new_path"
33911  # Check if we need to convert this using DOS-style short mode. If the path
33912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33913  # take no chances and rewrite it.
33914  # Note: m4 eats our [], so we need to use [ and ] instead.
33915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33916  if test "x$has_forbidden_chars" != x; then
33917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33918    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33919  fi
33920
33921    # Output is in $new_path
33922
33923  windows_path="$new_path"
33924  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33925    unix_path=`$CYGPATH -u "$windows_path"`
33926    new_path="$unix_path"
33927  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33928    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33929    new_path="$unix_path"
33930  fi
33931
33932    # remove trailing .exe if any
33933    new_path="${new_path/%.exe/}"
33934
33935    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33936    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33937  fi
33938
33939    else
33940      # We're on a unix platform. Hooray! :)
33941      # First separate the path from the arguments. This will split at the first
33942      # space.
33943      complete="$LIPO"
33944      path="${complete%% *}"
33945      tmp="$complete EOL"
33946      arguments="${tmp#* }"
33947
33948      # Cannot rely on the command "which" here since it doesn't always work.
33949      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33950      if test -z "$is_absolute_path"; then
33951        # Path to executable is not absolute. Find it.
33952        IFS_save="$IFS"
33953        IFS=:
33954        for p in $PATH; do
33955          if test -f "$p/$path" && test -x "$p/$path"; then
33956            new_path="$p/$path"
33957            break
33958          fi
33959        done
33960        IFS="$IFS_save"
33961      else
33962        # This is an absolute path, we can use it without further modifications.
33963        new_path="$path"
33964      fi
33965
33966      if test "x$new_path" = x; then
33967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33968$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33969        has_space=`$ECHO "$complete" | $GREP " "`
33970        if test "x$has_space" != x; then
33971          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33972$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33973        fi
33974        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33975      fi
33976    fi
33977
33978    # Now join together the path and the arguments once again
33979    if test "x$arguments" != xEOL; then
33980      new_complete="$new_path ${arguments% *}"
33981    else
33982      new_complete="$new_path"
33983    fi
33984
33985    if test "x$complete" != "x$new_complete"; then
33986      LIPO="$new_complete"
33987      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33988$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33989    fi
33990  fi
33991
33992  fi
33993
33994  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33995    # Extract the first word of "mt", so it can be a program name with args.
33996set dummy mt; ac_word=$2
33997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33998$as_echo_n "checking for $ac_word... " >&6; }
33999if ${ac_cv_prog_MT+:} false; then :
34000  $as_echo_n "(cached) " >&6
34001else
34002  if test -n "$MT"; then
34003  ac_cv_prog_MT="$MT" # Let the user override the test.
34004else
34005  ac_prog_rejected=no
34006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34007for as_dir in $PATH
34008do
34009  IFS=$as_save_IFS
34010  test -z "$as_dir" && as_dir=.
34011    for ac_exec_ext in '' $ac_executable_extensions; do
34012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34013    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
34014       ac_prog_rejected=yes
34015       continue
34016     fi
34017    ac_cv_prog_MT="mt"
34018    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34019    break 2
34020  fi
34021done
34022  done
34023IFS=$as_save_IFS
34024
34025if test $ac_prog_rejected = yes; then
34026  # We found a bogon in the path, so make sure we never use it.
34027  set dummy $ac_cv_prog_MT
34028  shift
34029  if test $# != 0; then
34030    # We chose a different compiler from the bogus one.
34031    # However, it has the same basename, so the bogon will be chosen
34032    # first if we set MT to just the basename; use the full file name.
34033    shift
34034    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34035  fi
34036fi
34037fi
34038fi
34039MT=$ac_cv_prog_MT
34040if test -n "$MT"; then
34041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34042$as_echo "$MT" >&6; }
34043else
34044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34045$as_echo "no" >&6; }
34046fi
34047
34048
34049
34050  # Only process if variable expands to non-empty
34051
34052  if test "x$MT" != x; then
34053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34054
34055  # First separate the path from the arguments. This will split at the first
34056  # space.
34057  complete="$MT"
34058  path="${complete%% *}"
34059  tmp="$complete EOL"
34060  arguments="${tmp#* }"
34061
34062  # Input might be given as Windows format, start by converting to
34063  # unix format.
34064  new_path=`$CYGPATH -u "$path"`
34065
34066  # Now try to locate executable using which
34067  new_path=`$WHICH "$new_path" 2> /dev/null`
34068  # bat and cmd files are not always considered executable in cygwin causing which
34069  # to not find them
34070  if test "x$new_path" = x \
34071      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34072      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34073    new_path=`$CYGPATH -u "$path"`
34074  fi
34075  if test "x$new_path" = x; then
34076    # Oops. Which didn't find the executable.
34077    # The splitting of arguments from the executable at a space might have been incorrect,
34078    # since paths with space are more likely in Windows. Give it another try with the whole
34079    # argument.
34080    path="$complete"
34081    arguments="EOL"
34082    new_path=`$CYGPATH -u "$path"`
34083    new_path=`$WHICH "$new_path" 2> /dev/null`
34084    # bat and cmd files are not always considered executable in cygwin causing which
34085    # to not find them
34086    if test "x$new_path" = x \
34087        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34088        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34089      new_path=`$CYGPATH -u "$path"`
34090    fi
34091    if test "x$new_path" = x; then
34092      # It's still not found. Now this is an unrecoverable error.
34093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34094$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34095      has_space=`$ECHO "$complete" | $GREP " "`
34096      if test "x$has_space" != x; then
34097        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34098$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34099      fi
34100      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34101    fi
34102  fi
34103
34104  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34105  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34106  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34107  # "foo.exe" is OK but "foo" is an error.
34108  #
34109  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34110  # It is also a way to make sure we got the proper file name for the real test later on.
34111  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34112  if test "x$test_shortpath" = x; then
34113    # Short path failed, file does not exist as specified.
34114    # Try adding .exe or .cmd
34115    if test -f "${new_path}.exe"; then
34116      input_to_shortpath="${new_path}.exe"
34117    elif test -f "${new_path}.cmd"; then
34118      input_to_shortpath="${new_path}.cmd"
34119    else
34120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34121$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34122      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34123$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34124      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34125    fi
34126  else
34127    input_to_shortpath="$new_path"
34128  fi
34129
34130  # Call helper function which possibly converts this using DOS-style short mode.
34131  # If so, the updated path is stored in $new_path.
34132  new_path="$input_to_shortpath"
34133
34134  input_path="$input_to_shortpath"
34135  # Check if we need to convert this using DOS-style short mode. If the path
34136  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34137  # take no chances and rewrite it.
34138  # Note: m4 eats our [], so we need to use [ and ] instead.
34139  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34140  if test "x$has_forbidden_chars" != x; then
34141    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34142    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34143    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34144    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34145      # Going to short mode and back again did indeed matter. Since short mode is
34146      # case insensitive, let's make it lowercase to improve readability.
34147      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34148      # Now convert it back to Unix-stile (cygpath)
34149      input_path=`$CYGPATH -u "$shortmode_path"`
34150      new_path="$input_path"
34151    fi
34152  fi
34153
34154  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34155  if test "x$test_cygdrive_prefix" = x; then
34156    # As a simple fix, exclude /usr/bin since it's not a real path.
34157    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34158      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34159      # a path prefixed by /cygdrive for fixpath to work.
34160      new_path="$CYGWIN_ROOT_PATH$input_path"
34161    fi
34162  fi
34163
34164  # remove trailing .exe if any
34165  new_path="${new_path/%.exe/}"
34166
34167    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34168
34169  # First separate the path from the arguments. This will split at the first
34170  # space.
34171  complete="$MT"
34172  path="${complete%% *}"
34173  tmp="$complete EOL"
34174  arguments="${tmp#* }"
34175
34176  # Input might be given as Windows format, start by converting to
34177  # unix format.
34178  new_path="$path"
34179
34180  windows_path="$new_path"
34181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34182    unix_path=`$CYGPATH -u "$windows_path"`
34183    new_path="$unix_path"
34184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34186    new_path="$unix_path"
34187  fi
34188
34189
34190  # Now try to locate executable using which
34191  new_path=`$WHICH "$new_path" 2> /dev/null`
34192
34193  if test "x$new_path" = x; then
34194    # Oops. Which didn't find the executable.
34195    # The splitting of arguments from the executable at a space might have been incorrect,
34196    # since paths with space are more likely in Windows. Give it another try with the whole
34197    # argument.
34198    path="$complete"
34199    arguments="EOL"
34200    new_path="$path"
34201
34202  windows_path="$new_path"
34203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34204    unix_path=`$CYGPATH -u "$windows_path"`
34205    new_path="$unix_path"
34206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34208    new_path="$unix_path"
34209  fi
34210
34211
34212    new_path=`$WHICH "$new_path" 2> /dev/null`
34213    # bat and cmd files are not always considered executable in MSYS causing which
34214    # to not find them
34215    if test "x$new_path" = x \
34216        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34217        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34218      new_path="$path"
34219
34220  windows_path="$new_path"
34221  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34222    unix_path=`$CYGPATH -u "$windows_path"`
34223    new_path="$unix_path"
34224  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34225    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34226    new_path="$unix_path"
34227  fi
34228
34229    fi
34230
34231    if test "x$new_path" = x; then
34232      # It's still not found. Now this is an unrecoverable error.
34233      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34234$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34235      has_space=`$ECHO "$complete" | $GREP " "`
34236      if test "x$has_space" != x; then
34237        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34238$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34239      fi
34240      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34241    fi
34242  fi
34243
34244  # Now new_path has a complete unix path to the binary
34245  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34246    # Keep paths in /bin as-is, but remove trailing .exe if any
34247    new_path="${new_path/%.exe/}"
34248    # Do not save /bin paths to all_fixpath_prefixes!
34249  else
34250    # Not in mixed or Windows style, start by that.
34251    new_path=`cmd //c echo $new_path`
34252
34253  input_path="$new_path"
34254  # Check if we need to convert this using DOS-style short mode. If the path
34255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34256  # take no chances and rewrite it.
34257  # Note: m4 eats our [], so we need to use [ and ] instead.
34258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34259  if test "x$has_forbidden_chars" != x; then
34260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34261    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34262  fi
34263
34264    # Output is in $new_path
34265
34266  windows_path="$new_path"
34267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34268    unix_path=`$CYGPATH -u "$windows_path"`
34269    new_path="$unix_path"
34270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34272    new_path="$unix_path"
34273  fi
34274
34275    # remove trailing .exe if any
34276    new_path="${new_path/%.exe/}"
34277
34278    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34279    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34280  fi
34281
34282    else
34283      # We're on a unix platform. Hooray! :)
34284      # First separate the path from the arguments. This will split at the first
34285      # space.
34286      complete="$MT"
34287      path="${complete%% *}"
34288      tmp="$complete EOL"
34289      arguments="${tmp#* }"
34290
34291      # Cannot rely on the command "which" here since it doesn't always work.
34292      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34293      if test -z "$is_absolute_path"; then
34294        # Path to executable is not absolute. Find it.
34295        IFS_save="$IFS"
34296        IFS=:
34297        for p in $PATH; do
34298          if test -f "$p/$path" && test -x "$p/$path"; then
34299            new_path="$p/$path"
34300            break
34301          fi
34302        done
34303        IFS="$IFS_save"
34304      else
34305        # This is an absolute path, we can use it without further modifications.
34306        new_path="$path"
34307      fi
34308
34309      if test "x$new_path" = x; then
34310        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34311$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34312        has_space=`$ECHO "$complete" | $GREP " "`
34313        if test "x$has_space" != x; then
34314          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34315$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34316        fi
34317        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34318      fi
34319    fi
34320
34321    # Now join together the path and the arguments once again
34322    if test "x$arguments" != xEOL; then
34323      new_complete="$new_path ${arguments% *}"
34324    else
34325      new_complete="$new_path"
34326    fi
34327
34328    if test "x$complete" != "x$new_complete"; then
34329      MT="$new_complete"
34330      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34331$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34332    fi
34333  fi
34334
34335    # Setup the resource compiler (RC)
34336    # Extract the first word of "rc", so it can be a program name with args.
34337set dummy rc; ac_word=$2
34338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34339$as_echo_n "checking for $ac_word... " >&6; }
34340if ${ac_cv_prog_RC+:} false; then :
34341  $as_echo_n "(cached) " >&6
34342else
34343  if test -n "$RC"; then
34344  ac_cv_prog_RC="$RC" # Let the user override the test.
34345else
34346  ac_prog_rejected=no
34347as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34348for as_dir in $PATH
34349do
34350  IFS=$as_save_IFS
34351  test -z "$as_dir" && as_dir=.
34352    for ac_exec_ext in '' $ac_executable_extensions; do
34353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34354    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34355       ac_prog_rejected=yes
34356       continue
34357     fi
34358    ac_cv_prog_RC="rc"
34359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34360    break 2
34361  fi
34362done
34363  done
34364IFS=$as_save_IFS
34365
34366if test $ac_prog_rejected = yes; then
34367  # We found a bogon in the path, so make sure we never use it.
34368  set dummy $ac_cv_prog_RC
34369  shift
34370  if test $# != 0; then
34371    # We chose a different compiler from the bogus one.
34372    # However, it has the same basename, so the bogon will be chosen
34373    # first if we set RC to just the basename; use the full file name.
34374    shift
34375    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34376  fi
34377fi
34378fi
34379fi
34380RC=$ac_cv_prog_RC
34381if test -n "$RC"; then
34382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34383$as_echo "$RC" >&6; }
34384else
34385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34386$as_echo "no" >&6; }
34387fi
34388
34389
34390
34391  # Only process if variable expands to non-empty
34392
34393  if test "x$RC" != x; then
34394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34395
34396  # First separate the path from the arguments. This will split at the first
34397  # space.
34398  complete="$RC"
34399  path="${complete%% *}"
34400  tmp="$complete EOL"
34401  arguments="${tmp#* }"
34402
34403  # Input might be given as Windows format, start by converting to
34404  # unix format.
34405  new_path=`$CYGPATH -u "$path"`
34406
34407  # Now try to locate executable using which
34408  new_path=`$WHICH "$new_path" 2> /dev/null`
34409  # bat and cmd files are not always considered executable in cygwin causing which
34410  # to not find them
34411  if test "x$new_path" = x \
34412      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34413      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34414    new_path=`$CYGPATH -u "$path"`
34415  fi
34416  if test "x$new_path" = x; then
34417    # Oops. Which didn't find the executable.
34418    # The splitting of arguments from the executable at a space might have been incorrect,
34419    # since paths with space are more likely in Windows. Give it another try with the whole
34420    # argument.
34421    path="$complete"
34422    arguments="EOL"
34423    new_path=`$CYGPATH -u "$path"`
34424    new_path=`$WHICH "$new_path" 2> /dev/null`
34425    # bat and cmd files are not always considered executable in cygwin causing which
34426    # to not find them
34427    if test "x$new_path" = x \
34428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34430      new_path=`$CYGPATH -u "$path"`
34431    fi
34432    if test "x$new_path" = x; then
34433      # It's still not found. Now this is an unrecoverable error.
34434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34435$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34436      has_space=`$ECHO "$complete" | $GREP " "`
34437      if test "x$has_space" != x; then
34438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34440      fi
34441      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34442    fi
34443  fi
34444
34445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34448  # "foo.exe" is OK but "foo" is an error.
34449  #
34450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34451  # It is also a way to make sure we got the proper file name for the real test later on.
34452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34453  if test "x$test_shortpath" = x; then
34454    # Short path failed, file does not exist as specified.
34455    # Try adding .exe or .cmd
34456    if test -f "${new_path}.exe"; then
34457      input_to_shortpath="${new_path}.exe"
34458    elif test -f "${new_path}.cmd"; then
34459      input_to_shortpath="${new_path}.cmd"
34460    else
34461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34462$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34465      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34466    fi
34467  else
34468    input_to_shortpath="$new_path"
34469  fi
34470
34471  # Call helper function which possibly converts this using DOS-style short mode.
34472  # If so, the updated path is stored in $new_path.
34473  new_path="$input_to_shortpath"
34474
34475  input_path="$input_to_shortpath"
34476  # Check if we need to convert this using DOS-style short mode. If the path
34477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34478  # take no chances and rewrite it.
34479  # Note: m4 eats our [], so we need to use [ and ] instead.
34480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34481  if test "x$has_forbidden_chars" != x; then
34482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34486      # Going to short mode and back again did indeed matter. Since short mode is
34487      # case insensitive, let's make it lowercase to improve readability.
34488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34489      # Now convert it back to Unix-stile (cygpath)
34490      input_path=`$CYGPATH -u "$shortmode_path"`
34491      new_path="$input_path"
34492    fi
34493  fi
34494
34495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34496  if test "x$test_cygdrive_prefix" = x; then
34497    # As a simple fix, exclude /usr/bin since it's not a real path.
34498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34500      # a path prefixed by /cygdrive for fixpath to work.
34501      new_path="$CYGWIN_ROOT_PATH$input_path"
34502    fi
34503  fi
34504
34505  # remove trailing .exe if any
34506  new_path="${new_path/%.exe/}"
34507
34508    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34509
34510  # First separate the path from the arguments. This will split at the first
34511  # space.
34512  complete="$RC"
34513  path="${complete%% *}"
34514  tmp="$complete EOL"
34515  arguments="${tmp#* }"
34516
34517  # Input might be given as Windows format, start by converting to
34518  # unix format.
34519  new_path="$path"
34520
34521  windows_path="$new_path"
34522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34523    unix_path=`$CYGPATH -u "$windows_path"`
34524    new_path="$unix_path"
34525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34527    new_path="$unix_path"
34528  fi
34529
34530
34531  # Now try to locate executable using which
34532  new_path=`$WHICH "$new_path" 2> /dev/null`
34533
34534  if test "x$new_path" = x; then
34535    # Oops. Which didn't find the executable.
34536    # The splitting of arguments from the executable at a space might have been incorrect,
34537    # since paths with space are more likely in Windows. Give it another try with the whole
34538    # argument.
34539    path="$complete"
34540    arguments="EOL"
34541    new_path="$path"
34542
34543  windows_path="$new_path"
34544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34545    unix_path=`$CYGPATH -u "$windows_path"`
34546    new_path="$unix_path"
34547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34549    new_path="$unix_path"
34550  fi
34551
34552
34553    new_path=`$WHICH "$new_path" 2> /dev/null`
34554    # bat and cmd files are not always considered executable in MSYS causing which
34555    # to not find them
34556    if test "x$new_path" = x \
34557        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34558        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34559      new_path="$path"
34560
34561  windows_path="$new_path"
34562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34563    unix_path=`$CYGPATH -u "$windows_path"`
34564    new_path="$unix_path"
34565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34567    new_path="$unix_path"
34568  fi
34569
34570    fi
34571
34572    if test "x$new_path" = x; then
34573      # It's still not found. Now this is an unrecoverable error.
34574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34575$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34576      has_space=`$ECHO "$complete" | $GREP " "`
34577      if test "x$has_space" != x; then
34578        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34579$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34580      fi
34581      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34582    fi
34583  fi
34584
34585  # Now new_path has a complete unix path to the binary
34586  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34587    # Keep paths in /bin as-is, but remove trailing .exe if any
34588    new_path="${new_path/%.exe/}"
34589    # Do not save /bin paths to all_fixpath_prefixes!
34590  else
34591    # Not in mixed or Windows style, start by that.
34592    new_path=`cmd //c echo $new_path`
34593
34594  input_path="$new_path"
34595  # Check if we need to convert this using DOS-style short mode. If the path
34596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34597  # take no chances and rewrite it.
34598  # Note: m4 eats our [], so we need to use [ and ] instead.
34599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34600  if test "x$has_forbidden_chars" != x; then
34601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34602    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34603  fi
34604
34605    # Output is in $new_path
34606
34607  windows_path="$new_path"
34608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34609    unix_path=`$CYGPATH -u "$windows_path"`
34610    new_path="$unix_path"
34611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34613    new_path="$unix_path"
34614  fi
34615
34616    # remove trailing .exe if any
34617    new_path="${new_path/%.exe/}"
34618
34619    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34620    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34621  fi
34622
34623    else
34624      # We're on a unix platform. Hooray! :)
34625      # First separate the path from the arguments. This will split at the first
34626      # space.
34627      complete="$RC"
34628      path="${complete%% *}"
34629      tmp="$complete EOL"
34630      arguments="${tmp#* }"
34631
34632      # Cannot rely on the command "which" here since it doesn't always work.
34633      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34634      if test -z "$is_absolute_path"; then
34635        # Path to executable is not absolute. Find it.
34636        IFS_save="$IFS"
34637        IFS=:
34638        for p in $PATH; do
34639          if test -f "$p/$path" && test -x "$p/$path"; then
34640            new_path="$p/$path"
34641            break
34642          fi
34643        done
34644        IFS="$IFS_save"
34645      else
34646        # This is an absolute path, we can use it without further modifications.
34647        new_path="$path"
34648      fi
34649
34650      if test "x$new_path" = x; then
34651        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34652$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34653        has_space=`$ECHO "$complete" | $GREP " "`
34654        if test "x$has_space" != x; then
34655          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34656$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34657        fi
34658        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34659      fi
34660    fi
34661
34662    # Now join together the path and the arguments once again
34663    if test "x$arguments" != xEOL; then
34664      new_complete="$new_path ${arguments% *}"
34665    else
34666      new_complete="$new_path"
34667    fi
34668
34669    if test "x$complete" != "x$new_complete"; then
34670      RC="$new_complete"
34671      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34672$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34673    fi
34674  fi
34675
34676    # Extract the first word of "dumpbin", so it can be a program name with args.
34677set dummy dumpbin; ac_word=$2
34678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34679$as_echo_n "checking for $ac_word... " >&6; }
34680if ${ac_cv_prog_DUMPBIN+:} false; then :
34681  $as_echo_n "(cached) " >&6
34682else
34683  if test -n "$DUMPBIN"; then
34684  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34685else
34686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34687for as_dir in $PATH
34688do
34689  IFS=$as_save_IFS
34690  test -z "$as_dir" && as_dir=.
34691    for ac_exec_ext in '' $ac_executable_extensions; do
34692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34693    ac_cv_prog_DUMPBIN="dumpbin"
34694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34695    break 2
34696  fi
34697done
34698  done
34699IFS=$as_save_IFS
34700
34701fi
34702fi
34703DUMPBIN=$ac_cv_prog_DUMPBIN
34704if test -n "$DUMPBIN"; then
34705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34706$as_echo "$DUMPBIN" >&6; }
34707else
34708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34709$as_echo "no" >&6; }
34710fi
34711
34712
34713
34714  # Only process if variable expands to non-empty
34715
34716  if test "x$DUMPBIN" != x; then
34717    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34718
34719  # First separate the path from the arguments. This will split at the first
34720  # space.
34721  complete="$DUMPBIN"
34722  path="${complete%% *}"
34723  tmp="$complete EOL"
34724  arguments="${tmp#* }"
34725
34726  # Input might be given as Windows format, start by converting to
34727  # unix format.
34728  new_path=`$CYGPATH -u "$path"`
34729
34730  # Now try to locate executable using which
34731  new_path=`$WHICH "$new_path" 2> /dev/null`
34732  # bat and cmd files are not always considered executable in cygwin causing which
34733  # to not find them
34734  if test "x$new_path" = x \
34735      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34736      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34737    new_path=`$CYGPATH -u "$path"`
34738  fi
34739  if test "x$new_path" = x; then
34740    # Oops. Which didn't find the executable.
34741    # The splitting of arguments from the executable at a space might have been incorrect,
34742    # since paths with space are more likely in Windows. Give it another try with the whole
34743    # argument.
34744    path="$complete"
34745    arguments="EOL"
34746    new_path=`$CYGPATH -u "$path"`
34747    new_path=`$WHICH "$new_path" 2> /dev/null`
34748    # bat and cmd files are not always considered executable in cygwin causing which
34749    # to not find them
34750    if test "x$new_path" = x \
34751        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34752        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34753      new_path=`$CYGPATH -u "$path"`
34754    fi
34755    if test "x$new_path" = x; then
34756      # It's still not found. Now this is an unrecoverable error.
34757      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34758$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34759      has_space=`$ECHO "$complete" | $GREP " "`
34760      if test "x$has_space" != x; then
34761        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34762$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34763      fi
34764      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34765    fi
34766  fi
34767
34768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34771  # "foo.exe" is OK but "foo" is an error.
34772  #
34773  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34774  # It is also a way to make sure we got the proper file name for the real test later on.
34775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34776  if test "x$test_shortpath" = x; then
34777    # Short path failed, file does not exist as specified.
34778    # Try adding .exe or .cmd
34779    if test -f "${new_path}.exe"; then
34780      input_to_shortpath="${new_path}.exe"
34781    elif test -f "${new_path}.cmd"; then
34782      input_to_shortpath="${new_path}.cmd"
34783    else
34784      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34785$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34786      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34787$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34788      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34789    fi
34790  else
34791    input_to_shortpath="$new_path"
34792  fi
34793
34794  # Call helper function which possibly converts this using DOS-style short mode.
34795  # If so, the updated path is stored in $new_path.
34796  new_path="$input_to_shortpath"
34797
34798  input_path="$input_to_shortpath"
34799  # Check if we need to convert this using DOS-style short mode. If the path
34800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34801  # take no chances and rewrite it.
34802  # Note: m4 eats our [], so we need to use [ and ] instead.
34803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34804  if test "x$has_forbidden_chars" != x; then
34805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34809      # Going to short mode and back again did indeed matter. Since short mode is
34810      # case insensitive, let's make it lowercase to improve readability.
34811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34812      # Now convert it back to Unix-stile (cygpath)
34813      input_path=`$CYGPATH -u "$shortmode_path"`
34814      new_path="$input_path"
34815    fi
34816  fi
34817
34818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34819  if test "x$test_cygdrive_prefix" = x; then
34820    # As a simple fix, exclude /usr/bin since it's not a real path.
34821    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34823      # a path prefixed by /cygdrive for fixpath to work.
34824      new_path="$CYGWIN_ROOT_PATH$input_path"
34825    fi
34826  fi
34827
34828  # remove trailing .exe if any
34829  new_path="${new_path/%.exe/}"
34830
34831    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34832
34833  # First separate the path from the arguments. This will split at the first
34834  # space.
34835  complete="$DUMPBIN"
34836  path="${complete%% *}"
34837  tmp="$complete EOL"
34838  arguments="${tmp#* }"
34839
34840  # Input might be given as Windows format, start by converting to
34841  # unix format.
34842  new_path="$path"
34843
34844  windows_path="$new_path"
34845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34846    unix_path=`$CYGPATH -u "$windows_path"`
34847    new_path="$unix_path"
34848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34850    new_path="$unix_path"
34851  fi
34852
34853
34854  # Now try to locate executable using which
34855  new_path=`$WHICH "$new_path" 2> /dev/null`
34856
34857  if test "x$new_path" = x; then
34858    # Oops. Which didn't find the executable.
34859    # The splitting of arguments from the executable at a space might have been incorrect,
34860    # since paths with space are more likely in Windows. Give it another try with the whole
34861    # argument.
34862    path="$complete"
34863    arguments="EOL"
34864    new_path="$path"
34865
34866  windows_path="$new_path"
34867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34868    unix_path=`$CYGPATH -u "$windows_path"`
34869    new_path="$unix_path"
34870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34872    new_path="$unix_path"
34873  fi
34874
34875
34876    new_path=`$WHICH "$new_path" 2> /dev/null`
34877    # bat and cmd files are not always considered executable in MSYS causing which
34878    # to not find them
34879    if test "x$new_path" = x \
34880        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34881        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34882      new_path="$path"
34883
34884  windows_path="$new_path"
34885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34886    unix_path=`$CYGPATH -u "$windows_path"`
34887    new_path="$unix_path"
34888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34890    new_path="$unix_path"
34891  fi
34892
34893    fi
34894
34895    if test "x$new_path" = x; then
34896      # It's still not found. Now this is an unrecoverable error.
34897      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34898$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34899      has_space=`$ECHO "$complete" | $GREP " "`
34900      if test "x$has_space" != x; then
34901        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34902$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34903      fi
34904      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34905    fi
34906  fi
34907
34908  # Now new_path has a complete unix path to the binary
34909  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34910    # Keep paths in /bin as-is, but remove trailing .exe if any
34911    new_path="${new_path/%.exe/}"
34912    # Do not save /bin paths to all_fixpath_prefixes!
34913  else
34914    # Not in mixed or Windows style, start by that.
34915    new_path=`cmd //c echo $new_path`
34916
34917  input_path="$new_path"
34918  # Check if we need to convert this using DOS-style short mode. If the path
34919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34920  # take no chances and rewrite it.
34921  # Note: m4 eats our [], so we need to use [ and ] instead.
34922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34923  if test "x$has_forbidden_chars" != x; then
34924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34926  fi
34927
34928    # Output is in $new_path
34929
34930  windows_path="$new_path"
34931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34932    unix_path=`$CYGPATH -u "$windows_path"`
34933    new_path="$unix_path"
34934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34936    new_path="$unix_path"
34937  fi
34938
34939    # remove trailing .exe if any
34940    new_path="${new_path/%.exe/}"
34941
34942    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34943    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34944  fi
34945
34946    else
34947      # We're on a unix platform. Hooray! :)
34948      # First separate the path from the arguments. This will split at the first
34949      # space.
34950      complete="$DUMPBIN"
34951      path="${complete%% *}"
34952      tmp="$complete EOL"
34953      arguments="${tmp#* }"
34954
34955      # Cannot rely on the command "which" here since it doesn't always work.
34956      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34957      if test -z "$is_absolute_path"; then
34958        # Path to executable is not absolute. Find it.
34959        IFS_save="$IFS"
34960        IFS=:
34961        for p in $PATH; do
34962          if test -f "$p/$path" && test -x "$p/$path"; then
34963            new_path="$p/$path"
34964            break
34965          fi
34966        done
34967        IFS="$IFS_save"
34968      else
34969        # This is an absolute path, we can use it without further modifications.
34970        new_path="$path"
34971      fi
34972
34973      if test "x$new_path" = x; then
34974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34975$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34976        has_space=`$ECHO "$complete" | $GREP " "`
34977        if test "x$has_space" != x; then
34978          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34979$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34980        fi
34981        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34982      fi
34983    fi
34984
34985    # Now join together the path and the arguments once again
34986    if test "x$arguments" != xEOL; then
34987      new_complete="$new_path ${arguments% *}"
34988    else
34989      new_complete="$new_path"
34990    fi
34991
34992    if test "x$complete" != "x$new_complete"; then
34993      DUMPBIN="$new_complete"
34994      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34995$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34996    fi
34997  fi
34998
34999    # We need to check for 'msbuild.exe' because at the place where we expect to
35000    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
35001    # won't find the 'msbuild.exe' executable in that case (and the
35002    # 'ac_executable_extensions' is unusable due to performance reasons).
35003    # Notice that we intentionally don't fix up the path to MSBUILD because we
35004    # will call it in a DOS shell during freetype detection on Windows (see
35005    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
35006    # Extract the first word of "msbuild.exe", so it can be a program name with args.
35007set dummy msbuild.exe; ac_word=$2
35008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35009$as_echo_n "checking for $ac_word... " >&6; }
35010if ${ac_cv_prog_MSBUILD+:} false; then :
35011  $as_echo_n "(cached) " >&6
35012else
35013  if test -n "$MSBUILD"; then
35014  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
35015else
35016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35017for as_dir in $PATH
35018do
35019  IFS=$as_save_IFS
35020  test -z "$as_dir" && as_dir=.
35021    for ac_exec_ext in '' $ac_executable_extensions; do
35022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35023    ac_cv_prog_MSBUILD="msbuild.exe"
35024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35025    break 2
35026  fi
35027done
35028  done
35029IFS=$as_save_IFS
35030
35031fi
35032fi
35033MSBUILD=$ac_cv_prog_MSBUILD
35034if test -n "$MSBUILD"; then
35035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
35036$as_echo "$MSBUILD" >&6; }
35037else
35038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35039$as_echo "no" >&6; }
35040fi
35041
35042
35043  fi
35044
35045  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
35046
35047
35048  # Publish this variable in the help.
35049
35050
35051  if test "x$STRIP" = x; then
35052    # The variable is not set by user, try to locate tool using the code snippet
35053    for ac_prog in strip
35054do
35055  # Extract the first word of "$ac_prog", so it can be a program name with args.
35056set dummy $ac_prog; ac_word=$2
35057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35058$as_echo_n "checking for $ac_word... " >&6; }
35059if ${ac_cv_path_STRIP+:} false; then :
35060  $as_echo_n "(cached) " >&6
35061else
35062  case $STRIP in
35063  [\\/]* | ?:[\\/]*)
35064  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35065  ;;
35066  *)
35067  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35068for as_dir in $PATH
35069do
35070  IFS=$as_save_IFS
35071  test -z "$as_dir" && as_dir=.
35072    for ac_exec_ext in '' $ac_executable_extensions; do
35073  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35074    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35075    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35076    break 2
35077  fi
35078done
35079  done
35080IFS=$as_save_IFS
35081
35082  ;;
35083esac
35084fi
35085STRIP=$ac_cv_path_STRIP
35086if test -n "$STRIP"; then
35087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35088$as_echo "$STRIP" >&6; }
35089else
35090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35091$as_echo "no" >&6; }
35092fi
35093
35094
35095  test -n "$STRIP" && break
35096done
35097
35098  else
35099    # The variable is set, but is it from the command line or the environment?
35100
35101    # Try to remove the string !STRIP! from our list.
35102    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
35103    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35104      # If it failed, the variable was not from the command line. Ignore it,
35105      # but warn the user (except for BASH, which is always set by the calling BASH).
35106      if test "xSTRIP" != xBASH; then
35107        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
35108$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
35109      fi
35110      # Try to locate tool using the code snippet
35111      for ac_prog in strip
35112do
35113  # Extract the first word of "$ac_prog", so it can be a program name with args.
35114set dummy $ac_prog; ac_word=$2
35115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35116$as_echo_n "checking for $ac_word... " >&6; }
35117if ${ac_cv_path_STRIP+:} false; then :
35118  $as_echo_n "(cached) " >&6
35119else
35120  case $STRIP in
35121  [\\/]* | ?:[\\/]*)
35122  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35123  ;;
35124  *)
35125  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35126for as_dir in $PATH
35127do
35128  IFS=$as_save_IFS
35129  test -z "$as_dir" && as_dir=.
35130    for ac_exec_ext in '' $ac_executable_extensions; do
35131  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35132    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35133    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35134    break 2
35135  fi
35136done
35137  done
35138IFS=$as_save_IFS
35139
35140  ;;
35141esac
35142fi
35143STRIP=$ac_cv_path_STRIP
35144if test -n "$STRIP"; then
35145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35146$as_echo "$STRIP" >&6; }
35147else
35148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35149$as_echo "no" >&6; }
35150fi
35151
35152
35153  test -n "$STRIP" && break
35154done
35155
35156    else
35157      # If it succeeded, then it was overridden by the user. We will use it
35158      # for the tool.
35159
35160      # First remove it from the list of overridden variables, so we can test
35161      # for unknown variables in the end.
35162      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35163
35164      # Check if the provided tool contains a complete path.
35165      tool_specified="$STRIP"
35166      tool_basename="${tool_specified##*/}"
35167      if test "x$tool_basename" = "x$tool_specified"; then
35168        # A command without a complete path is provided, search $PATH.
35169        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35170$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35171        # Extract the first word of "$tool_basename", so it can be a program name with args.
35172set dummy $tool_basename; ac_word=$2
35173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35174$as_echo_n "checking for $ac_word... " >&6; }
35175if ${ac_cv_path_STRIP+:} false; then :
35176  $as_echo_n "(cached) " >&6
35177else
35178  case $STRIP in
35179  [\\/]* | ?:[\\/]*)
35180  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35181  ;;
35182  *)
35183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35184for as_dir in $PATH
35185do
35186  IFS=$as_save_IFS
35187  test -z "$as_dir" && as_dir=.
35188    for ac_exec_ext in '' $ac_executable_extensions; do
35189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35190    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35192    break 2
35193  fi
35194done
35195  done
35196IFS=$as_save_IFS
35197
35198  ;;
35199esac
35200fi
35201STRIP=$ac_cv_path_STRIP
35202if test -n "$STRIP"; then
35203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35204$as_echo "$STRIP" >&6; }
35205else
35206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35207$as_echo "no" >&6; }
35208fi
35209
35210
35211        if test "x$STRIP" = x; then
35212          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35213        fi
35214      else
35215        # Otherwise we believe it is a complete path. Use it as it is.
35216        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35217$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35218        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35219$as_echo_n "checking for STRIP... " >&6; }
35220        if test ! -x "$tool_specified"; then
35221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35222$as_echo "not found" >&6; }
35223          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35224        fi
35225        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35226$as_echo "$tool_specified" >&6; }
35227      fi
35228    fi
35229  fi
35230
35231
35232
35233  # Only process if variable expands to non-empty
35234
35235  if test "x$STRIP" != x; then
35236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35237
35238  # First separate the path from the arguments. This will split at the first
35239  # space.
35240  complete="$STRIP"
35241  path="${complete%% *}"
35242  tmp="$complete EOL"
35243  arguments="${tmp#* }"
35244
35245  # Input might be given as Windows format, start by converting to
35246  # unix format.
35247  new_path=`$CYGPATH -u "$path"`
35248
35249  # Now try to locate executable using which
35250  new_path=`$WHICH "$new_path" 2> /dev/null`
35251  # bat and cmd files are not always considered executable in cygwin causing which
35252  # to not find them
35253  if test "x$new_path" = x \
35254      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35255      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35256    new_path=`$CYGPATH -u "$path"`
35257  fi
35258  if test "x$new_path" = x; then
35259    # Oops. Which didn't find the executable.
35260    # The splitting of arguments from the executable at a space might have been incorrect,
35261    # since paths with space are more likely in Windows. Give it another try with the whole
35262    # argument.
35263    path="$complete"
35264    arguments="EOL"
35265    new_path=`$CYGPATH -u "$path"`
35266    new_path=`$WHICH "$new_path" 2> /dev/null`
35267    # bat and cmd files are not always considered executable in cygwin causing which
35268    # to not find them
35269    if test "x$new_path" = x \
35270        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35271        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35272      new_path=`$CYGPATH -u "$path"`
35273    fi
35274    if test "x$new_path" = x; then
35275      # It's still not found. Now this is an unrecoverable error.
35276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35277$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35278      has_space=`$ECHO "$complete" | $GREP " "`
35279      if test "x$has_space" != x; then
35280        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35281$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35282      fi
35283      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35284    fi
35285  fi
35286
35287  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35288  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35289  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35290  # "foo.exe" is OK but "foo" is an error.
35291  #
35292  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35293  # It is also a way to make sure we got the proper file name for the real test later on.
35294  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35295  if test "x$test_shortpath" = x; then
35296    # Short path failed, file does not exist as specified.
35297    # Try adding .exe or .cmd
35298    if test -f "${new_path}.exe"; then
35299      input_to_shortpath="${new_path}.exe"
35300    elif test -f "${new_path}.cmd"; then
35301      input_to_shortpath="${new_path}.cmd"
35302    else
35303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35304$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35305      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35306$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35307      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35308    fi
35309  else
35310    input_to_shortpath="$new_path"
35311  fi
35312
35313  # Call helper function which possibly converts this using DOS-style short mode.
35314  # If so, the updated path is stored in $new_path.
35315  new_path="$input_to_shortpath"
35316
35317  input_path="$input_to_shortpath"
35318  # Check if we need to convert this using DOS-style short mode. If the path
35319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35320  # take no chances and rewrite it.
35321  # Note: m4 eats our [], so we need to use [ and ] instead.
35322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35323  if test "x$has_forbidden_chars" != x; then
35324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35328      # Going to short mode and back again did indeed matter. Since short mode is
35329      # case insensitive, let's make it lowercase to improve readability.
35330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35331      # Now convert it back to Unix-stile (cygpath)
35332      input_path=`$CYGPATH -u "$shortmode_path"`
35333      new_path="$input_path"
35334    fi
35335  fi
35336
35337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35338  if test "x$test_cygdrive_prefix" = x; then
35339    # As a simple fix, exclude /usr/bin since it's not a real path.
35340    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35342      # a path prefixed by /cygdrive for fixpath to work.
35343      new_path="$CYGWIN_ROOT_PATH$input_path"
35344    fi
35345  fi
35346
35347  # remove trailing .exe if any
35348  new_path="${new_path/%.exe/}"
35349
35350    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35351
35352  # First separate the path from the arguments. This will split at the first
35353  # space.
35354  complete="$STRIP"
35355  path="${complete%% *}"
35356  tmp="$complete EOL"
35357  arguments="${tmp#* }"
35358
35359  # Input might be given as Windows format, start by converting to
35360  # unix format.
35361  new_path="$path"
35362
35363  windows_path="$new_path"
35364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35365    unix_path=`$CYGPATH -u "$windows_path"`
35366    new_path="$unix_path"
35367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35369    new_path="$unix_path"
35370  fi
35371
35372
35373  # Now try to locate executable using which
35374  new_path=`$WHICH "$new_path" 2> /dev/null`
35375
35376  if test "x$new_path" = x; then
35377    # Oops. Which didn't find the executable.
35378    # The splitting of arguments from the executable at a space might have been incorrect,
35379    # since paths with space are more likely in Windows. Give it another try with the whole
35380    # argument.
35381    path="$complete"
35382    arguments="EOL"
35383    new_path="$path"
35384
35385  windows_path="$new_path"
35386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35387    unix_path=`$CYGPATH -u "$windows_path"`
35388    new_path="$unix_path"
35389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35391    new_path="$unix_path"
35392  fi
35393
35394
35395    new_path=`$WHICH "$new_path" 2> /dev/null`
35396    # bat and cmd files are not always considered executable in MSYS causing which
35397    # to not find them
35398    if test "x$new_path" = x \
35399        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35400        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35401      new_path="$path"
35402
35403  windows_path="$new_path"
35404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35405    unix_path=`$CYGPATH -u "$windows_path"`
35406    new_path="$unix_path"
35407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35409    new_path="$unix_path"
35410  fi
35411
35412    fi
35413
35414    if test "x$new_path" = x; then
35415      # It's still not found. Now this is an unrecoverable error.
35416      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35417$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35418      has_space=`$ECHO "$complete" | $GREP " "`
35419      if test "x$has_space" != x; then
35420        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35421$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35422      fi
35423      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35424    fi
35425  fi
35426
35427  # Now new_path has a complete unix path to the binary
35428  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35429    # Keep paths in /bin as-is, but remove trailing .exe if any
35430    new_path="${new_path/%.exe/}"
35431    # Do not save /bin paths to all_fixpath_prefixes!
35432  else
35433    # Not in mixed or Windows style, start by that.
35434    new_path=`cmd //c echo $new_path`
35435
35436  input_path="$new_path"
35437  # Check if we need to convert this using DOS-style short mode. If the path
35438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35439  # take no chances and rewrite it.
35440  # Note: m4 eats our [], so we need to use [ and ] instead.
35441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35442  if test "x$has_forbidden_chars" != x; then
35443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35444    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35445  fi
35446
35447    # Output is in $new_path
35448
35449  windows_path="$new_path"
35450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35451    unix_path=`$CYGPATH -u "$windows_path"`
35452    new_path="$unix_path"
35453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35455    new_path="$unix_path"
35456  fi
35457
35458    # remove trailing .exe if any
35459    new_path="${new_path/%.exe/}"
35460
35461    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35462    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35463  fi
35464
35465    else
35466      # We're on a unix platform. Hooray! :)
35467      # First separate the path from the arguments. This will split at the first
35468      # space.
35469      complete="$STRIP"
35470      path="${complete%% *}"
35471      tmp="$complete EOL"
35472      arguments="${tmp#* }"
35473
35474      # Cannot rely on the command "which" here since it doesn't always work.
35475      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35476      if test -z "$is_absolute_path"; then
35477        # Path to executable is not absolute. Find it.
35478        IFS_save="$IFS"
35479        IFS=:
35480        for p in $PATH; do
35481          if test -f "$p/$path" && test -x "$p/$path"; then
35482            new_path="$p/$path"
35483            break
35484          fi
35485        done
35486        IFS="$IFS_save"
35487      else
35488        # This is an absolute path, we can use it without further modifications.
35489        new_path="$path"
35490      fi
35491
35492      if test "x$new_path" = x; then
35493        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35494$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35495        has_space=`$ECHO "$complete" | $GREP " "`
35496        if test "x$has_space" != x; then
35497          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35498$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35499        fi
35500        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35501      fi
35502    fi
35503
35504    # Now join together the path and the arguments once again
35505    if test "x$arguments" != xEOL; then
35506      new_complete="$new_path ${arguments% *}"
35507    else
35508      new_complete="$new_path"
35509    fi
35510
35511    if test "x$complete" != "x$new_complete"; then
35512      STRIP="$new_complete"
35513      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35514$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35515    fi
35516  fi
35517
35518
35519
35520  # Publish this variable in the help.
35521
35522
35523  if test "x$NM" = x; then
35524    # The variable is not set by user, try to locate tool using the code snippet
35525    for ac_prog in nm
35526do
35527  # Extract the first word of "$ac_prog", so it can be a program name with args.
35528set dummy $ac_prog; ac_word=$2
35529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35530$as_echo_n "checking for $ac_word... " >&6; }
35531if ${ac_cv_path_NM+:} false; then :
35532  $as_echo_n "(cached) " >&6
35533else
35534  case $NM in
35535  [\\/]* | ?:[\\/]*)
35536  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35537  ;;
35538  *)
35539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35540for as_dir in $PATH
35541do
35542  IFS=$as_save_IFS
35543  test -z "$as_dir" && as_dir=.
35544    for ac_exec_ext in '' $ac_executable_extensions; do
35545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35546    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35548    break 2
35549  fi
35550done
35551  done
35552IFS=$as_save_IFS
35553
35554  ;;
35555esac
35556fi
35557NM=$ac_cv_path_NM
35558if test -n "$NM"; then
35559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35560$as_echo "$NM" >&6; }
35561else
35562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35563$as_echo "no" >&6; }
35564fi
35565
35566
35567  test -n "$NM" && break
35568done
35569
35570  else
35571    # The variable is set, but is it from the command line or the environment?
35572
35573    # Try to remove the string !NM! from our list.
35574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35576      # If it failed, the variable was not from the command line. Ignore it,
35577      # but warn the user (except for BASH, which is always set by the calling BASH).
35578      if test "xNM" != xBASH; then
35579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35580$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35581      fi
35582      # Try to locate tool using the code snippet
35583      for ac_prog in nm
35584do
35585  # Extract the first word of "$ac_prog", so it can be a program name with args.
35586set dummy $ac_prog; ac_word=$2
35587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35588$as_echo_n "checking for $ac_word... " >&6; }
35589if ${ac_cv_path_NM+:} false; then :
35590  $as_echo_n "(cached) " >&6
35591else
35592  case $NM in
35593  [\\/]* | ?:[\\/]*)
35594  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35595  ;;
35596  *)
35597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35598for as_dir in $PATH
35599do
35600  IFS=$as_save_IFS
35601  test -z "$as_dir" && as_dir=.
35602    for ac_exec_ext in '' $ac_executable_extensions; do
35603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35604    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35606    break 2
35607  fi
35608done
35609  done
35610IFS=$as_save_IFS
35611
35612  ;;
35613esac
35614fi
35615NM=$ac_cv_path_NM
35616if test -n "$NM"; then
35617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35618$as_echo "$NM" >&6; }
35619else
35620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35621$as_echo "no" >&6; }
35622fi
35623
35624
35625  test -n "$NM" && break
35626done
35627
35628    else
35629      # If it succeeded, then it was overridden by the user. We will use it
35630      # for the tool.
35631
35632      # First remove it from the list of overridden variables, so we can test
35633      # for unknown variables in the end.
35634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35635
35636      # Check if the provided tool contains a complete path.
35637      tool_specified="$NM"
35638      tool_basename="${tool_specified##*/}"
35639      if test "x$tool_basename" = "x$tool_specified"; then
35640        # A command without a complete path is provided, search $PATH.
35641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35642$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35643        # Extract the first word of "$tool_basename", so it can be a program name with args.
35644set dummy $tool_basename; ac_word=$2
35645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35646$as_echo_n "checking for $ac_word... " >&6; }
35647if ${ac_cv_path_NM+:} false; then :
35648  $as_echo_n "(cached) " >&6
35649else
35650  case $NM in
35651  [\\/]* | ?:[\\/]*)
35652  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35653  ;;
35654  *)
35655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35656for as_dir in $PATH
35657do
35658  IFS=$as_save_IFS
35659  test -z "$as_dir" && as_dir=.
35660    for ac_exec_ext in '' $ac_executable_extensions; do
35661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35662    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35664    break 2
35665  fi
35666done
35667  done
35668IFS=$as_save_IFS
35669
35670  ;;
35671esac
35672fi
35673NM=$ac_cv_path_NM
35674if test -n "$NM"; then
35675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35676$as_echo "$NM" >&6; }
35677else
35678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35679$as_echo "no" >&6; }
35680fi
35681
35682
35683        if test "x$NM" = x; then
35684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35685        fi
35686      else
35687        # Otherwise we believe it is a complete path. Use it as it is.
35688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35689$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35691$as_echo_n "checking for NM... " >&6; }
35692        if test ! -x "$tool_specified"; then
35693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35694$as_echo "not found" >&6; }
35695          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35696        fi
35697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35698$as_echo "$tool_specified" >&6; }
35699      fi
35700    fi
35701  fi
35702
35703
35704
35705  # Only process if variable expands to non-empty
35706
35707  if test "x$NM" != x; then
35708    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35709
35710  # First separate the path from the arguments. This will split at the first
35711  # space.
35712  complete="$NM"
35713  path="${complete%% *}"
35714  tmp="$complete EOL"
35715  arguments="${tmp#* }"
35716
35717  # Input might be given as Windows format, start by converting to
35718  # unix format.
35719  new_path=`$CYGPATH -u "$path"`
35720
35721  # Now try to locate executable using which
35722  new_path=`$WHICH "$new_path" 2> /dev/null`
35723  # bat and cmd files are not always considered executable in cygwin causing which
35724  # to not find them
35725  if test "x$new_path" = x \
35726      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35727      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35728    new_path=`$CYGPATH -u "$path"`
35729  fi
35730  if test "x$new_path" = x; then
35731    # Oops. Which didn't find the executable.
35732    # The splitting of arguments from the executable at a space might have been incorrect,
35733    # since paths with space are more likely in Windows. Give it another try with the whole
35734    # argument.
35735    path="$complete"
35736    arguments="EOL"
35737    new_path=`$CYGPATH -u "$path"`
35738    new_path=`$WHICH "$new_path" 2> /dev/null`
35739    # bat and cmd files are not always considered executable in cygwin causing which
35740    # to not find them
35741    if test "x$new_path" = x \
35742        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35743        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35744      new_path=`$CYGPATH -u "$path"`
35745    fi
35746    if test "x$new_path" = x; then
35747      # It's still not found. Now this is an unrecoverable error.
35748      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35749$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35750      has_space=`$ECHO "$complete" | $GREP " "`
35751      if test "x$has_space" != x; then
35752        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35753$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35754      fi
35755      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35756    fi
35757  fi
35758
35759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35762  # "foo.exe" is OK but "foo" is an error.
35763  #
35764  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35765  # It is also a way to make sure we got the proper file name for the real test later on.
35766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35767  if test "x$test_shortpath" = x; then
35768    # Short path failed, file does not exist as specified.
35769    # Try adding .exe or .cmd
35770    if test -f "${new_path}.exe"; then
35771      input_to_shortpath="${new_path}.exe"
35772    elif test -f "${new_path}.cmd"; then
35773      input_to_shortpath="${new_path}.cmd"
35774    else
35775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35776$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35777      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35778$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35779      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35780    fi
35781  else
35782    input_to_shortpath="$new_path"
35783  fi
35784
35785  # Call helper function which possibly converts this using DOS-style short mode.
35786  # If so, the updated path is stored in $new_path.
35787  new_path="$input_to_shortpath"
35788
35789  input_path="$input_to_shortpath"
35790  # Check if we need to convert this using DOS-style short mode. If the path
35791  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35792  # take no chances and rewrite it.
35793  # Note: m4 eats our [], so we need to use [ and ] instead.
35794  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35795  if test "x$has_forbidden_chars" != x; then
35796    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35797    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35798    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35799    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35800      # Going to short mode and back again did indeed matter. Since short mode is
35801      # case insensitive, let's make it lowercase to improve readability.
35802      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35803      # Now convert it back to Unix-stile (cygpath)
35804      input_path=`$CYGPATH -u "$shortmode_path"`
35805      new_path="$input_path"
35806    fi
35807  fi
35808
35809  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35810  if test "x$test_cygdrive_prefix" = x; then
35811    # As a simple fix, exclude /usr/bin since it's not a real path.
35812    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35813      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35814      # a path prefixed by /cygdrive for fixpath to work.
35815      new_path="$CYGWIN_ROOT_PATH$input_path"
35816    fi
35817  fi
35818
35819  # remove trailing .exe if any
35820  new_path="${new_path/%.exe/}"
35821
35822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35823
35824  # First separate the path from the arguments. This will split at the first
35825  # space.
35826  complete="$NM"
35827  path="${complete%% *}"
35828  tmp="$complete EOL"
35829  arguments="${tmp#* }"
35830
35831  # Input might be given as Windows format, start by converting to
35832  # unix format.
35833  new_path="$path"
35834
35835  windows_path="$new_path"
35836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35837    unix_path=`$CYGPATH -u "$windows_path"`
35838    new_path="$unix_path"
35839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35841    new_path="$unix_path"
35842  fi
35843
35844
35845  # Now try to locate executable using which
35846  new_path=`$WHICH "$new_path" 2> /dev/null`
35847
35848  if test "x$new_path" = x; then
35849    # Oops. Which didn't find the executable.
35850    # The splitting of arguments from the executable at a space might have been incorrect,
35851    # since paths with space are more likely in Windows. Give it another try with the whole
35852    # argument.
35853    path="$complete"
35854    arguments="EOL"
35855    new_path="$path"
35856
35857  windows_path="$new_path"
35858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35859    unix_path=`$CYGPATH -u "$windows_path"`
35860    new_path="$unix_path"
35861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35863    new_path="$unix_path"
35864  fi
35865
35866
35867    new_path=`$WHICH "$new_path" 2> /dev/null`
35868    # bat and cmd files are not always considered executable in MSYS causing which
35869    # to not find them
35870    if test "x$new_path" = x \
35871        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35872        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35873      new_path="$path"
35874
35875  windows_path="$new_path"
35876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35877    unix_path=`$CYGPATH -u "$windows_path"`
35878    new_path="$unix_path"
35879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35881    new_path="$unix_path"
35882  fi
35883
35884    fi
35885
35886    if test "x$new_path" = x; then
35887      # It's still not found. Now this is an unrecoverable error.
35888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35889$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35890      has_space=`$ECHO "$complete" | $GREP " "`
35891      if test "x$has_space" != x; then
35892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35894      fi
35895      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35896    fi
35897  fi
35898
35899  # Now new_path has a complete unix path to the binary
35900  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35901    # Keep paths in /bin as-is, but remove trailing .exe if any
35902    new_path="${new_path/%.exe/}"
35903    # Do not save /bin paths to all_fixpath_prefixes!
35904  else
35905    # Not in mixed or Windows style, start by that.
35906    new_path=`cmd //c echo $new_path`
35907
35908  input_path="$new_path"
35909  # Check if we need to convert this using DOS-style short mode. If the path
35910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35911  # take no chances and rewrite it.
35912  # Note: m4 eats our [], so we need to use [ and ] instead.
35913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35914  if test "x$has_forbidden_chars" != x; then
35915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35916    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35917  fi
35918
35919    # Output is in $new_path
35920
35921  windows_path="$new_path"
35922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35923    unix_path=`$CYGPATH -u "$windows_path"`
35924    new_path="$unix_path"
35925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35927    new_path="$unix_path"
35928  fi
35929
35930    # remove trailing .exe if any
35931    new_path="${new_path/%.exe/}"
35932
35933    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35934    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35935  fi
35936
35937    else
35938      # We're on a unix platform. Hooray! :)
35939      # First separate the path from the arguments. This will split at the first
35940      # space.
35941      complete="$NM"
35942      path="${complete%% *}"
35943      tmp="$complete EOL"
35944      arguments="${tmp#* }"
35945
35946      # Cannot rely on the command "which" here since it doesn't always work.
35947      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35948      if test -z "$is_absolute_path"; then
35949        # Path to executable is not absolute. Find it.
35950        IFS_save="$IFS"
35951        IFS=:
35952        for p in $PATH; do
35953          if test -f "$p/$path" && test -x "$p/$path"; then
35954            new_path="$p/$path"
35955            break
35956          fi
35957        done
35958        IFS="$IFS_save"
35959      else
35960        # This is an absolute path, we can use it without further modifications.
35961        new_path="$path"
35962      fi
35963
35964      if test "x$new_path" = x; then
35965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35966$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35967        has_space=`$ECHO "$complete" | $GREP " "`
35968        if test "x$has_space" != x; then
35969          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35970$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35971        fi
35972        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35973      fi
35974    fi
35975
35976    # Now join together the path and the arguments once again
35977    if test "x$arguments" != xEOL; then
35978      new_complete="$new_path ${arguments% *}"
35979    else
35980      new_complete="$new_path"
35981    fi
35982
35983    if test "x$complete" != "x$new_complete"; then
35984      NM="$new_complete"
35985      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35986$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35987    fi
35988  fi
35989
35990
35991
35992  # Publish this variable in the help.
35993
35994
35995  if test "x$GNM" = x; then
35996    # The variable is not set by user, try to locate tool using the code snippet
35997    for ac_prog in gnm
35998do
35999  # Extract the first word of "$ac_prog", so it can be a program name with args.
36000set dummy $ac_prog; ac_word=$2
36001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36002$as_echo_n "checking for $ac_word... " >&6; }
36003if ${ac_cv_path_GNM+:} false; then :
36004  $as_echo_n "(cached) " >&6
36005else
36006  case $GNM in
36007  [\\/]* | ?:[\\/]*)
36008  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36009  ;;
36010  *)
36011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36012for as_dir in $PATH
36013do
36014  IFS=$as_save_IFS
36015  test -z "$as_dir" && as_dir=.
36016    for ac_exec_ext in '' $ac_executable_extensions; do
36017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36018    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36020    break 2
36021  fi
36022done
36023  done
36024IFS=$as_save_IFS
36025
36026  ;;
36027esac
36028fi
36029GNM=$ac_cv_path_GNM
36030if test -n "$GNM"; then
36031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36032$as_echo "$GNM" >&6; }
36033else
36034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36035$as_echo "no" >&6; }
36036fi
36037
36038
36039  test -n "$GNM" && break
36040done
36041
36042  else
36043    # The variable is set, but is it from the command line or the environment?
36044
36045    # Try to remove the string !GNM! from our list.
36046    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
36047    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36048      # If it failed, the variable was not from the command line. Ignore it,
36049      # but warn the user (except for BASH, which is always set by the calling BASH).
36050      if test "xGNM" != xBASH; then
36051        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
36052$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
36053      fi
36054      # Try to locate tool using the code snippet
36055      for ac_prog in gnm
36056do
36057  # Extract the first word of "$ac_prog", so it can be a program name with args.
36058set dummy $ac_prog; ac_word=$2
36059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36060$as_echo_n "checking for $ac_word... " >&6; }
36061if ${ac_cv_path_GNM+:} false; then :
36062  $as_echo_n "(cached) " >&6
36063else
36064  case $GNM in
36065  [\\/]* | ?:[\\/]*)
36066  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36067  ;;
36068  *)
36069  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36070for as_dir in $PATH
36071do
36072  IFS=$as_save_IFS
36073  test -z "$as_dir" && as_dir=.
36074    for ac_exec_ext in '' $ac_executable_extensions; do
36075  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36076    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36077    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36078    break 2
36079  fi
36080done
36081  done
36082IFS=$as_save_IFS
36083
36084  ;;
36085esac
36086fi
36087GNM=$ac_cv_path_GNM
36088if test -n "$GNM"; then
36089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36090$as_echo "$GNM" >&6; }
36091else
36092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36093$as_echo "no" >&6; }
36094fi
36095
36096
36097  test -n "$GNM" && break
36098done
36099
36100    else
36101      # If it succeeded, then it was overridden by the user. We will use it
36102      # for the tool.
36103
36104      # First remove it from the list of overridden variables, so we can test
36105      # for unknown variables in the end.
36106      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36107
36108      # Check if the provided tool contains a complete path.
36109      tool_specified="$GNM"
36110      tool_basename="${tool_specified##*/}"
36111      if test "x$tool_basename" = "x$tool_specified"; then
36112        # A command without a complete path is provided, search $PATH.
36113        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
36114$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
36115        # Extract the first word of "$tool_basename", so it can be a program name with args.
36116set dummy $tool_basename; ac_word=$2
36117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36118$as_echo_n "checking for $ac_word... " >&6; }
36119if ${ac_cv_path_GNM+:} false; then :
36120  $as_echo_n "(cached) " >&6
36121else
36122  case $GNM in
36123  [\\/]* | ?:[\\/]*)
36124  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
36125  ;;
36126  *)
36127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36128for as_dir in $PATH
36129do
36130  IFS=$as_save_IFS
36131  test -z "$as_dir" && as_dir=.
36132    for ac_exec_ext in '' $ac_executable_extensions; do
36133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36134    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
36135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36136    break 2
36137  fi
36138done
36139  done
36140IFS=$as_save_IFS
36141
36142  ;;
36143esac
36144fi
36145GNM=$ac_cv_path_GNM
36146if test -n "$GNM"; then
36147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
36148$as_echo "$GNM" >&6; }
36149else
36150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36151$as_echo "no" >&6; }
36152fi
36153
36154
36155        if test "x$GNM" = x; then
36156          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36157        fi
36158      else
36159        # Otherwise we believe it is a complete path. Use it as it is.
36160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
36161$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
36162        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
36163$as_echo_n "checking for GNM... " >&6; }
36164        if test ! -x "$tool_specified"; then
36165          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36166$as_echo "not found" >&6; }
36167          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36168        fi
36169        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36170$as_echo "$tool_specified" >&6; }
36171      fi
36172    fi
36173  fi
36174
36175
36176
36177  # Only process if variable expands to non-empty
36178
36179  if test "x$GNM" != x; then
36180    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36181
36182  # First separate the path from the arguments. This will split at the first
36183  # space.
36184  complete="$GNM"
36185  path="${complete%% *}"
36186  tmp="$complete EOL"
36187  arguments="${tmp#* }"
36188
36189  # Input might be given as Windows format, start by converting to
36190  # unix format.
36191  new_path=`$CYGPATH -u "$path"`
36192
36193  # Now try to locate executable using which
36194  new_path=`$WHICH "$new_path" 2> /dev/null`
36195  # bat and cmd files are not always considered executable in cygwin causing which
36196  # to not find them
36197  if test "x$new_path" = x \
36198      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36199      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36200    new_path=`$CYGPATH -u "$path"`
36201  fi
36202  if test "x$new_path" = x; then
36203    # Oops. Which didn't find the executable.
36204    # The splitting of arguments from the executable at a space might have been incorrect,
36205    # since paths with space are more likely in Windows. Give it another try with the whole
36206    # argument.
36207    path="$complete"
36208    arguments="EOL"
36209    new_path=`$CYGPATH -u "$path"`
36210    new_path=`$WHICH "$new_path" 2> /dev/null`
36211    # bat and cmd files are not always considered executable in cygwin causing which
36212    # to not find them
36213    if test "x$new_path" = x \
36214        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36215        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36216      new_path=`$CYGPATH -u "$path"`
36217    fi
36218    if test "x$new_path" = x; then
36219      # It's still not found. Now this is an unrecoverable error.
36220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36221$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36222      has_space=`$ECHO "$complete" | $GREP " "`
36223      if test "x$has_space" != x; then
36224        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36225$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36226      fi
36227      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36228    fi
36229  fi
36230
36231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36234  # "foo.exe" is OK but "foo" is an error.
36235  #
36236  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36237  # It is also a way to make sure we got the proper file name for the real test later on.
36238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36239  if test "x$test_shortpath" = x; then
36240    # Short path failed, file does not exist as specified.
36241    # Try adding .exe or .cmd
36242    if test -f "${new_path}.exe"; then
36243      input_to_shortpath="${new_path}.exe"
36244    elif test -f "${new_path}.cmd"; then
36245      input_to_shortpath="${new_path}.cmd"
36246    else
36247      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36248$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36249      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36250$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36251      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36252    fi
36253  else
36254    input_to_shortpath="$new_path"
36255  fi
36256
36257  # Call helper function which possibly converts this using DOS-style short mode.
36258  # If so, the updated path is stored in $new_path.
36259  new_path="$input_to_shortpath"
36260
36261  input_path="$input_to_shortpath"
36262  # Check if we need to convert this using DOS-style short mode. If the path
36263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36264  # take no chances and rewrite it.
36265  # Note: m4 eats our [], so we need to use [ and ] instead.
36266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36267  if test "x$has_forbidden_chars" != x; then
36268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36272      # Going to short mode and back again did indeed matter. Since short mode is
36273      # case insensitive, let's make it lowercase to improve readability.
36274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36275      # Now convert it back to Unix-stile (cygpath)
36276      input_path=`$CYGPATH -u "$shortmode_path"`
36277      new_path="$input_path"
36278    fi
36279  fi
36280
36281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36282  if test "x$test_cygdrive_prefix" = x; then
36283    # As a simple fix, exclude /usr/bin since it's not a real path.
36284    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36286      # a path prefixed by /cygdrive for fixpath to work.
36287      new_path="$CYGWIN_ROOT_PATH$input_path"
36288    fi
36289  fi
36290
36291  # remove trailing .exe if any
36292  new_path="${new_path/%.exe/}"
36293
36294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36295
36296  # First separate the path from the arguments. This will split at the first
36297  # space.
36298  complete="$GNM"
36299  path="${complete%% *}"
36300  tmp="$complete EOL"
36301  arguments="${tmp#* }"
36302
36303  # Input might be given as Windows format, start by converting to
36304  # unix format.
36305  new_path="$path"
36306
36307  windows_path="$new_path"
36308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36309    unix_path=`$CYGPATH -u "$windows_path"`
36310    new_path="$unix_path"
36311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36312    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36313    new_path="$unix_path"
36314  fi
36315
36316
36317  # Now try to locate executable using which
36318  new_path=`$WHICH "$new_path" 2> /dev/null`
36319
36320  if test "x$new_path" = x; then
36321    # Oops. Which didn't find the executable.
36322    # The splitting of arguments from the executable at a space might have been incorrect,
36323    # since paths with space are more likely in Windows. Give it another try with the whole
36324    # argument.
36325    path="$complete"
36326    arguments="EOL"
36327    new_path="$path"
36328
36329  windows_path="$new_path"
36330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36331    unix_path=`$CYGPATH -u "$windows_path"`
36332    new_path="$unix_path"
36333  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36334    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36335    new_path="$unix_path"
36336  fi
36337
36338
36339    new_path=`$WHICH "$new_path" 2> /dev/null`
36340    # bat and cmd files are not always considered executable in MSYS causing which
36341    # to not find them
36342    if test "x$new_path" = x \
36343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36345      new_path="$path"
36346
36347  windows_path="$new_path"
36348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36349    unix_path=`$CYGPATH -u "$windows_path"`
36350    new_path="$unix_path"
36351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36353    new_path="$unix_path"
36354  fi
36355
36356    fi
36357
36358    if test "x$new_path" = x; then
36359      # It's still not found. Now this is an unrecoverable error.
36360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36361$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36362      has_space=`$ECHO "$complete" | $GREP " "`
36363      if test "x$has_space" != x; then
36364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36366      fi
36367      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36368    fi
36369  fi
36370
36371  # Now new_path has a complete unix path to the binary
36372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36373    # Keep paths in /bin as-is, but remove trailing .exe if any
36374    new_path="${new_path/%.exe/}"
36375    # Do not save /bin paths to all_fixpath_prefixes!
36376  else
36377    # Not in mixed or Windows style, start by that.
36378    new_path=`cmd //c echo $new_path`
36379
36380  input_path="$new_path"
36381  # Check if we need to convert this using DOS-style short mode. If the path
36382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36383  # take no chances and rewrite it.
36384  # Note: m4 eats our [], so we need to use [ and ] instead.
36385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36386  if test "x$has_forbidden_chars" != x; then
36387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36389  fi
36390
36391    # Output is in $new_path
36392
36393  windows_path="$new_path"
36394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36395    unix_path=`$CYGPATH -u "$windows_path"`
36396    new_path="$unix_path"
36397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36399    new_path="$unix_path"
36400  fi
36401
36402    # remove trailing .exe if any
36403    new_path="${new_path/%.exe/}"
36404
36405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36407  fi
36408
36409    else
36410      # We're on a unix platform. Hooray! :)
36411      # First separate the path from the arguments. This will split at the first
36412      # space.
36413      complete="$GNM"
36414      path="${complete%% *}"
36415      tmp="$complete EOL"
36416      arguments="${tmp#* }"
36417
36418      # Cannot rely on the command "which" here since it doesn't always work.
36419      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36420      if test -z "$is_absolute_path"; then
36421        # Path to executable is not absolute. Find it.
36422        IFS_save="$IFS"
36423        IFS=:
36424        for p in $PATH; do
36425          if test -f "$p/$path" && test -x "$p/$path"; then
36426            new_path="$p/$path"
36427            break
36428          fi
36429        done
36430        IFS="$IFS_save"
36431      else
36432        # This is an absolute path, we can use it without further modifications.
36433        new_path="$path"
36434      fi
36435
36436      if test "x$new_path" = x; then
36437        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36438$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36439        has_space=`$ECHO "$complete" | $GREP " "`
36440        if test "x$has_space" != x; then
36441          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36443        fi
36444        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36445      fi
36446    fi
36447
36448    # Now join together the path and the arguments once again
36449    if test "x$arguments" != xEOL; then
36450      new_complete="$new_path ${arguments% *}"
36451    else
36452      new_complete="$new_path"
36453    fi
36454
36455    if test "x$complete" != "x$new_complete"; then
36456      GNM="$new_complete"
36457      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36458$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36459    fi
36460  fi
36461
36462
36463
36464
36465  # Publish this variable in the help.
36466
36467
36468  if test "x$MCS" = x; then
36469    # The variable is not set by user, try to locate tool using the code snippet
36470    for ac_prog in mcs
36471do
36472  # Extract the first word of "$ac_prog", so it can be a program name with args.
36473set dummy $ac_prog; ac_word=$2
36474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36475$as_echo_n "checking for $ac_word... " >&6; }
36476if ${ac_cv_path_MCS+:} false; then :
36477  $as_echo_n "(cached) " >&6
36478else
36479  case $MCS in
36480  [\\/]* | ?:[\\/]*)
36481  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36482  ;;
36483  *)
36484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36485for as_dir in $PATH
36486do
36487  IFS=$as_save_IFS
36488  test -z "$as_dir" && as_dir=.
36489    for ac_exec_ext in '' $ac_executable_extensions; do
36490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36491    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36493    break 2
36494  fi
36495done
36496  done
36497IFS=$as_save_IFS
36498
36499  ;;
36500esac
36501fi
36502MCS=$ac_cv_path_MCS
36503if test -n "$MCS"; then
36504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36505$as_echo "$MCS" >&6; }
36506else
36507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36508$as_echo "no" >&6; }
36509fi
36510
36511
36512  test -n "$MCS" && break
36513done
36514
36515  else
36516    # The variable is set, but is it from the command line or the environment?
36517
36518    # Try to remove the string !MCS! from our list.
36519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36521      # If it failed, the variable was not from the command line. Ignore it,
36522      # but warn the user (except for BASH, which is always set by the calling BASH).
36523      if test "xMCS" != xBASH; then
36524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36525$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36526      fi
36527      # Try to locate tool using the code snippet
36528      for ac_prog in mcs
36529do
36530  # Extract the first word of "$ac_prog", so it can be a program name with args.
36531set dummy $ac_prog; ac_word=$2
36532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36533$as_echo_n "checking for $ac_word... " >&6; }
36534if ${ac_cv_path_MCS+:} false; then :
36535  $as_echo_n "(cached) " >&6
36536else
36537  case $MCS in
36538  [\\/]* | ?:[\\/]*)
36539  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36540  ;;
36541  *)
36542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36543for as_dir in $PATH
36544do
36545  IFS=$as_save_IFS
36546  test -z "$as_dir" && as_dir=.
36547    for ac_exec_ext in '' $ac_executable_extensions; do
36548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36549    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36551    break 2
36552  fi
36553done
36554  done
36555IFS=$as_save_IFS
36556
36557  ;;
36558esac
36559fi
36560MCS=$ac_cv_path_MCS
36561if test -n "$MCS"; then
36562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36563$as_echo "$MCS" >&6; }
36564else
36565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36566$as_echo "no" >&6; }
36567fi
36568
36569
36570  test -n "$MCS" && break
36571done
36572
36573    else
36574      # If it succeeded, then it was overridden by the user. We will use it
36575      # for the tool.
36576
36577      # First remove it from the list of overridden variables, so we can test
36578      # for unknown variables in the end.
36579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36580
36581      # Check if the provided tool contains a complete path.
36582      tool_specified="$MCS"
36583      tool_basename="${tool_specified##*/}"
36584      if test "x$tool_basename" = "x$tool_specified"; then
36585        # A command without a complete path is provided, search $PATH.
36586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36587$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36588        # Extract the first word of "$tool_basename", so it can be a program name with args.
36589set dummy $tool_basename; ac_word=$2
36590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36591$as_echo_n "checking for $ac_word... " >&6; }
36592if ${ac_cv_path_MCS+:} false; then :
36593  $as_echo_n "(cached) " >&6
36594else
36595  case $MCS in
36596  [\\/]* | ?:[\\/]*)
36597  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36598  ;;
36599  *)
36600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36601for as_dir in $PATH
36602do
36603  IFS=$as_save_IFS
36604  test -z "$as_dir" && as_dir=.
36605    for ac_exec_ext in '' $ac_executable_extensions; do
36606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36607    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36609    break 2
36610  fi
36611done
36612  done
36613IFS=$as_save_IFS
36614
36615  ;;
36616esac
36617fi
36618MCS=$ac_cv_path_MCS
36619if test -n "$MCS"; then
36620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36621$as_echo "$MCS" >&6; }
36622else
36623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36624$as_echo "no" >&6; }
36625fi
36626
36627
36628        if test "x$MCS" = x; then
36629          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36630        fi
36631      else
36632        # Otherwise we believe it is a complete path. Use it as it is.
36633        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36634$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36636$as_echo_n "checking for MCS... " >&6; }
36637        if test ! -x "$tool_specified"; then
36638          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36639$as_echo "not found" >&6; }
36640          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36641        fi
36642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36643$as_echo "$tool_specified" >&6; }
36644      fi
36645    fi
36646  fi
36647
36648
36649
36650  # Only process if variable expands to non-empty
36651
36652  if test "x$MCS" != x; then
36653    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36654
36655  # First separate the path from the arguments. This will split at the first
36656  # space.
36657  complete="$MCS"
36658  path="${complete%% *}"
36659  tmp="$complete EOL"
36660  arguments="${tmp#* }"
36661
36662  # Input might be given as Windows format, start by converting to
36663  # unix format.
36664  new_path=`$CYGPATH -u "$path"`
36665
36666  # Now try to locate executable using which
36667  new_path=`$WHICH "$new_path" 2> /dev/null`
36668  # bat and cmd files are not always considered executable in cygwin causing which
36669  # to not find them
36670  if test "x$new_path" = x \
36671      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36672      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36673    new_path=`$CYGPATH -u "$path"`
36674  fi
36675  if test "x$new_path" = x; then
36676    # Oops. Which didn't find the executable.
36677    # The splitting of arguments from the executable at a space might have been incorrect,
36678    # since paths with space are more likely in Windows. Give it another try with the whole
36679    # argument.
36680    path="$complete"
36681    arguments="EOL"
36682    new_path=`$CYGPATH -u "$path"`
36683    new_path=`$WHICH "$new_path" 2> /dev/null`
36684    # bat and cmd files are not always considered executable in cygwin causing which
36685    # to not find them
36686    if test "x$new_path" = x \
36687        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36688        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36689      new_path=`$CYGPATH -u "$path"`
36690    fi
36691    if test "x$new_path" = x; then
36692      # It's still not found. Now this is an unrecoverable error.
36693      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36694$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36695      has_space=`$ECHO "$complete" | $GREP " "`
36696      if test "x$has_space" != x; then
36697        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36698$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36699      fi
36700      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36701    fi
36702  fi
36703
36704  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36705  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36706  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36707  # "foo.exe" is OK but "foo" is an error.
36708  #
36709  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36710  # It is also a way to make sure we got the proper file name for the real test later on.
36711  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36712  if test "x$test_shortpath" = x; then
36713    # Short path failed, file does not exist as specified.
36714    # Try adding .exe or .cmd
36715    if test -f "${new_path}.exe"; then
36716      input_to_shortpath="${new_path}.exe"
36717    elif test -f "${new_path}.cmd"; then
36718      input_to_shortpath="${new_path}.cmd"
36719    else
36720      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36721$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36722      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36723$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36724      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36725    fi
36726  else
36727    input_to_shortpath="$new_path"
36728  fi
36729
36730  # Call helper function which possibly converts this using DOS-style short mode.
36731  # If so, the updated path is stored in $new_path.
36732  new_path="$input_to_shortpath"
36733
36734  input_path="$input_to_shortpath"
36735  # Check if we need to convert this using DOS-style short mode. If the path
36736  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36737  # take no chances and rewrite it.
36738  # Note: m4 eats our [], so we need to use [ and ] instead.
36739  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36740  if test "x$has_forbidden_chars" != x; then
36741    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36742    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36743    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36744    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36745      # Going to short mode and back again did indeed matter. Since short mode is
36746      # case insensitive, let's make it lowercase to improve readability.
36747      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36748      # Now convert it back to Unix-stile (cygpath)
36749      input_path=`$CYGPATH -u "$shortmode_path"`
36750      new_path="$input_path"
36751    fi
36752  fi
36753
36754  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36755  if test "x$test_cygdrive_prefix" = x; then
36756    # As a simple fix, exclude /usr/bin since it's not a real path.
36757    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36758      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36759      # a path prefixed by /cygdrive for fixpath to work.
36760      new_path="$CYGWIN_ROOT_PATH$input_path"
36761    fi
36762  fi
36763
36764  # remove trailing .exe if any
36765  new_path="${new_path/%.exe/}"
36766
36767    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36768
36769  # First separate the path from the arguments. This will split at the first
36770  # space.
36771  complete="$MCS"
36772  path="${complete%% *}"
36773  tmp="$complete EOL"
36774  arguments="${tmp#* }"
36775
36776  # Input might be given as Windows format, start by converting to
36777  # unix format.
36778  new_path="$path"
36779
36780  windows_path="$new_path"
36781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36782    unix_path=`$CYGPATH -u "$windows_path"`
36783    new_path="$unix_path"
36784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36786    new_path="$unix_path"
36787  fi
36788
36789
36790  # Now try to locate executable using which
36791  new_path=`$WHICH "$new_path" 2> /dev/null`
36792
36793  if test "x$new_path" = x; then
36794    # Oops. Which didn't find the executable.
36795    # The splitting of arguments from the executable at a space might have been incorrect,
36796    # since paths with space are more likely in Windows. Give it another try with the whole
36797    # argument.
36798    path="$complete"
36799    arguments="EOL"
36800    new_path="$path"
36801
36802  windows_path="$new_path"
36803  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36804    unix_path=`$CYGPATH -u "$windows_path"`
36805    new_path="$unix_path"
36806  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36807    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36808    new_path="$unix_path"
36809  fi
36810
36811
36812    new_path=`$WHICH "$new_path" 2> /dev/null`
36813    # bat and cmd files are not always considered executable in MSYS causing which
36814    # to not find them
36815    if test "x$new_path" = x \
36816        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36817        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36818      new_path="$path"
36819
36820  windows_path="$new_path"
36821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36822    unix_path=`$CYGPATH -u "$windows_path"`
36823    new_path="$unix_path"
36824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36826    new_path="$unix_path"
36827  fi
36828
36829    fi
36830
36831    if test "x$new_path" = x; then
36832      # It's still not found. Now this is an unrecoverable error.
36833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36834$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36835      has_space=`$ECHO "$complete" | $GREP " "`
36836      if test "x$has_space" != x; then
36837        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36838$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36839      fi
36840      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36841    fi
36842  fi
36843
36844  # Now new_path has a complete unix path to the binary
36845  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36846    # Keep paths in /bin as-is, but remove trailing .exe if any
36847    new_path="${new_path/%.exe/}"
36848    # Do not save /bin paths to all_fixpath_prefixes!
36849  else
36850    # Not in mixed or Windows style, start by that.
36851    new_path=`cmd //c echo $new_path`
36852
36853  input_path="$new_path"
36854  # Check if we need to convert this using DOS-style short mode. If the path
36855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36856  # take no chances and rewrite it.
36857  # Note: m4 eats our [], so we need to use [ and ] instead.
36858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36859  if test "x$has_forbidden_chars" != x; then
36860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36862  fi
36863
36864    # Output is in $new_path
36865
36866  windows_path="$new_path"
36867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36868    unix_path=`$CYGPATH -u "$windows_path"`
36869    new_path="$unix_path"
36870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36872    new_path="$unix_path"
36873  fi
36874
36875    # remove trailing .exe if any
36876    new_path="${new_path/%.exe/}"
36877
36878    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36879    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36880  fi
36881
36882    else
36883      # We're on a unix platform. Hooray! :)
36884      # First separate the path from the arguments. This will split at the first
36885      # space.
36886      complete="$MCS"
36887      path="${complete%% *}"
36888      tmp="$complete EOL"
36889      arguments="${tmp#* }"
36890
36891      # Cannot rely on the command "which" here since it doesn't always work.
36892      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36893      if test -z "$is_absolute_path"; then
36894        # Path to executable is not absolute. Find it.
36895        IFS_save="$IFS"
36896        IFS=:
36897        for p in $PATH; do
36898          if test -f "$p/$path" && test -x "$p/$path"; then
36899            new_path="$p/$path"
36900            break
36901          fi
36902        done
36903        IFS="$IFS_save"
36904      else
36905        # This is an absolute path, we can use it without further modifications.
36906        new_path="$path"
36907      fi
36908
36909      if test "x$new_path" = x; then
36910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36911$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36912        has_space=`$ECHO "$complete" | $GREP " "`
36913        if test "x$has_space" != x; then
36914          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36915$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36916        fi
36917        as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36918      fi
36919    fi
36920
36921    # Now join together the path and the arguments once again
36922    if test "x$arguments" != xEOL; then
36923      new_complete="$new_path ${arguments% *}"
36924    else
36925      new_complete="$new_path"
36926    fi
36927
36928    if test "x$complete" != "x$new_complete"; then
36929      MCS="$new_complete"
36930      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36931$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36932    fi
36933  fi
36934
36935  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36936    # FIXME: we should unify this with the solaris case above.
36937
36938
36939  # Publish this variable in the help.
36940
36941
36942  if test "x$STRIP" = x; then
36943    # The variable is not set by user, try to locate tool using the code snippet
36944    if test -n "$ac_tool_prefix"; then
36945  for ac_prog in strip
36946  do
36947    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36948set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36950$as_echo_n "checking for $ac_word... " >&6; }
36951if ${ac_cv_prog_STRIP+:} false; then :
36952  $as_echo_n "(cached) " >&6
36953else
36954  if test -n "$STRIP"; then
36955  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36956else
36957as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36958for as_dir in $PATH
36959do
36960  IFS=$as_save_IFS
36961  test -z "$as_dir" && as_dir=.
36962    for ac_exec_ext in '' $ac_executable_extensions; do
36963  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36964    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36965    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36966    break 2
36967  fi
36968done
36969  done
36970IFS=$as_save_IFS
36971
36972fi
36973fi
36974STRIP=$ac_cv_prog_STRIP
36975if test -n "$STRIP"; then
36976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36977$as_echo "$STRIP" >&6; }
36978else
36979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36980$as_echo "no" >&6; }
36981fi
36982
36983
36984    test -n "$STRIP" && break
36985  done
36986fi
36987if test -z "$STRIP"; then
36988  ac_ct_STRIP=$STRIP
36989  for ac_prog in strip
36990do
36991  # Extract the first word of "$ac_prog", so it can be a program name with args.
36992set dummy $ac_prog; ac_word=$2
36993{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36994$as_echo_n "checking for $ac_word... " >&6; }
36995if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36996  $as_echo_n "(cached) " >&6
36997else
36998  if test -n "$ac_ct_STRIP"; then
36999  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37000else
37001as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37002for as_dir in $PATH
37003do
37004  IFS=$as_save_IFS
37005  test -z "$as_dir" && as_dir=.
37006    for ac_exec_ext in '' $ac_executable_extensions; do
37007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37008    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37010    break 2
37011  fi
37012done
37013  done
37014IFS=$as_save_IFS
37015
37016fi
37017fi
37018ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37019if test -n "$ac_ct_STRIP"; then
37020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37021$as_echo "$ac_ct_STRIP" >&6; }
37022else
37023  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37024$as_echo "no" >&6; }
37025fi
37026
37027
37028  test -n "$ac_ct_STRIP" && break
37029done
37030
37031  if test "x$ac_ct_STRIP" = x; then
37032    STRIP=""
37033  else
37034    case $cross_compiling:$ac_tool_warned in
37035yes:)
37036{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37037$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37038ac_tool_warned=yes ;;
37039esac
37040    STRIP=$ac_ct_STRIP
37041  fi
37042fi
37043
37044  else
37045    # The variable is set, but is it from the command line or the environment?
37046
37047    # Try to remove the string !STRIP! from our list.
37048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
37049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37050      # If it failed, the variable was not from the command line. Ignore it,
37051      # but warn the user (except for BASH, which is always set by the calling BASH).
37052      if test "xSTRIP" != xBASH; then
37053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
37054$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
37055      fi
37056      # Try to locate tool using the code snippet
37057      if test -n "$ac_tool_prefix"; then
37058  for ac_prog in strip
37059  do
37060    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37061set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37063$as_echo_n "checking for $ac_word... " >&6; }
37064if ${ac_cv_prog_STRIP+:} false; then :
37065  $as_echo_n "(cached) " >&6
37066else
37067  if test -n "$STRIP"; then
37068  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
37069else
37070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37071for as_dir in $PATH
37072do
37073  IFS=$as_save_IFS
37074  test -z "$as_dir" && as_dir=.
37075    for ac_exec_ext in '' $ac_executable_extensions; do
37076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37077    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
37078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37079    break 2
37080  fi
37081done
37082  done
37083IFS=$as_save_IFS
37084
37085fi
37086fi
37087STRIP=$ac_cv_prog_STRIP
37088if test -n "$STRIP"; then
37089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37090$as_echo "$STRIP" >&6; }
37091else
37092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37093$as_echo "no" >&6; }
37094fi
37095
37096
37097    test -n "$STRIP" && break
37098  done
37099fi
37100if test -z "$STRIP"; then
37101  ac_ct_STRIP=$STRIP
37102  for ac_prog in strip
37103do
37104  # Extract the first word of "$ac_prog", so it can be a program name with args.
37105set dummy $ac_prog; ac_word=$2
37106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37107$as_echo_n "checking for $ac_word... " >&6; }
37108if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
37109  $as_echo_n "(cached) " >&6
37110else
37111  if test -n "$ac_ct_STRIP"; then
37112  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
37113else
37114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37115for as_dir in $PATH
37116do
37117  IFS=$as_save_IFS
37118  test -z "$as_dir" && as_dir=.
37119    for ac_exec_ext in '' $ac_executable_extensions; do
37120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37121    ac_cv_prog_ac_ct_STRIP="$ac_prog"
37122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37123    break 2
37124  fi
37125done
37126  done
37127IFS=$as_save_IFS
37128
37129fi
37130fi
37131ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
37132if test -n "$ac_ct_STRIP"; then
37133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
37134$as_echo "$ac_ct_STRIP" >&6; }
37135else
37136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37137$as_echo "no" >&6; }
37138fi
37139
37140
37141  test -n "$ac_ct_STRIP" && break
37142done
37143
37144  if test "x$ac_ct_STRIP" = x; then
37145    STRIP=""
37146  else
37147    case $cross_compiling:$ac_tool_warned in
37148yes:)
37149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37151ac_tool_warned=yes ;;
37152esac
37153    STRIP=$ac_ct_STRIP
37154  fi
37155fi
37156
37157    else
37158      # If it succeeded, then it was overridden by the user. We will use it
37159      # for the tool.
37160
37161      # First remove it from the list of overridden variables, so we can test
37162      # for unknown variables in the end.
37163      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37164
37165      # Check if the provided tool contains a complete path.
37166      tool_specified="$STRIP"
37167      tool_basename="${tool_specified##*/}"
37168      if test "x$tool_basename" = "x$tool_specified"; then
37169        # A command without a complete path is provided, search $PATH.
37170        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
37171$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
37172        # Extract the first word of "$tool_basename", so it can be a program name with args.
37173set dummy $tool_basename; ac_word=$2
37174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37175$as_echo_n "checking for $ac_word... " >&6; }
37176if ${ac_cv_path_STRIP+:} false; then :
37177  $as_echo_n "(cached) " >&6
37178else
37179  case $STRIP in
37180  [\\/]* | ?:[\\/]*)
37181  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
37182  ;;
37183  *)
37184  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37185for as_dir in $PATH
37186do
37187  IFS=$as_save_IFS
37188  test -z "$as_dir" && as_dir=.
37189    for ac_exec_ext in '' $ac_executable_extensions; do
37190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37191    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
37192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37193    break 2
37194  fi
37195done
37196  done
37197IFS=$as_save_IFS
37198
37199  ;;
37200esac
37201fi
37202STRIP=$ac_cv_path_STRIP
37203if test -n "$STRIP"; then
37204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
37205$as_echo "$STRIP" >&6; }
37206else
37207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37208$as_echo "no" >&6; }
37209fi
37210
37211
37212        if test "x$STRIP" = x; then
37213          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37214        fi
37215      else
37216        # Otherwise we believe it is a complete path. Use it as it is.
37217        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37218$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37219        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37220$as_echo_n "checking for STRIP... " >&6; }
37221        if test ! -x "$tool_specified"; then
37222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37223$as_echo "not found" >&6; }
37224          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37225        fi
37226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37227$as_echo "$tool_specified" >&6; }
37228      fi
37229    fi
37230  fi
37231
37232
37233
37234  # Only process if variable expands to non-empty
37235
37236  if test "x$STRIP" != x; then
37237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37238
37239  # First separate the path from the arguments. This will split at the first
37240  # space.
37241  complete="$STRIP"
37242  path="${complete%% *}"
37243  tmp="$complete EOL"
37244  arguments="${tmp#* }"
37245
37246  # Input might be given as Windows format, start by converting to
37247  # unix format.
37248  new_path=`$CYGPATH -u "$path"`
37249
37250  # Now try to locate executable using which
37251  new_path=`$WHICH "$new_path" 2> /dev/null`
37252  # bat and cmd files are not always considered executable in cygwin causing which
37253  # to not find them
37254  if test "x$new_path" = x \
37255      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37256      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37257    new_path=`$CYGPATH -u "$path"`
37258  fi
37259  if test "x$new_path" = x; then
37260    # Oops. Which didn't find the executable.
37261    # The splitting of arguments from the executable at a space might have been incorrect,
37262    # since paths with space are more likely in Windows. Give it another try with the whole
37263    # argument.
37264    path="$complete"
37265    arguments="EOL"
37266    new_path=`$CYGPATH -u "$path"`
37267    new_path=`$WHICH "$new_path" 2> /dev/null`
37268    # bat and cmd files are not always considered executable in cygwin causing which
37269    # to not find them
37270    if test "x$new_path" = x \
37271        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37272        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37273      new_path=`$CYGPATH -u "$path"`
37274    fi
37275    if test "x$new_path" = x; then
37276      # It's still not found. Now this is an unrecoverable error.
37277      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37278$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37279      has_space=`$ECHO "$complete" | $GREP " "`
37280      if test "x$has_space" != x; then
37281        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37282$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37283      fi
37284      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37285    fi
37286  fi
37287
37288  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37289  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37290  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37291  # "foo.exe" is OK but "foo" is an error.
37292  #
37293  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37294  # It is also a way to make sure we got the proper file name for the real test later on.
37295  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37296  if test "x$test_shortpath" = x; then
37297    # Short path failed, file does not exist as specified.
37298    # Try adding .exe or .cmd
37299    if test -f "${new_path}.exe"; then
37300      input_to_shortpath="${new_path}.exe"
37301    elif test -f "${new_path}.cmd"; then
37302      input_to_shortpath="${new_path}.cmd"
37303    else
37304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37305$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37306      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37307$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37308      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37309    fi
37310  else
37311    input_to_shortpath="$new_path"
37312  fi
37313
37314  # Call helper function which possibly converts this using DOS-style short mode.
37315  # If so, the updated path is stored in $new_path.
37316  new_path="$input_to_shortpath"
37317
37318  input_path="$input_to_shortpath"
37319  # Check if we need to convert this using DOS-style short mode. If the path
37320  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37321  # take no chances and rewrite it.
37322  # Note: m4 eats our [], so we need to use [ and ] instead.
37323  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37324  if test "x$has_forbidden_chars" != x; then
37325    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37326    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37327    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37328    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37329      # Going to short mode and back again did indeed matter. Since short mode is
37330      # case insensitive, let's make it lowercase to improve readability.
37331      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37332      # Now convert it back to Unix-stile (cygpath)
37333      input_path=`$CYGPATH -u "$shortmode_path"`
37334      new_path="$input_path"
37335    fi
37336  fi
37337
37338  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37339  if test "x$test_cygdrive_prefix" = x; then
37340    # As a simple fix, exclude /usr/bin since it's not a real path.
37341    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37342      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37343      # a path prefixed by /cygdrive for fixpath to work.
37344      new_path="$CYGWIN_ROOT_PATH$input_path"
37345    fi
37346  fi
37347
37348  # remove trailing .exe if any
37349  new_path="${new_path/%.exe/}"
37350
37351    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37352
37353  # First separate the path from the arguments. This will split at the first
37354  # space.
37355  complete="$STRIP"
37356  path="${complete%% *}"
37357  tmp="$complete EOL"
37358  arguments="${tmp#* }"
37359
37360  # Input might be given as Windows format, start by converting to
37361  # unix format.
37362  new_path="$path"
37363
37364  windows_path="$new_path"
37365  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37366    unix_path=`$CYGPATH -u "$windows_path"`
37367    new_path="$unix_path"
37368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37369    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37370    new_path="$unix_path"
37371  fi
37372
37373
37374  # Now try to locate executable using which
37375  new_path=`$WHICH "$new_path" 2> /dev/null`
37376
37377  if test "x$new_path" = x; then
37378    # Oops. Which didn't find the executable.
37379    # The splitting of arguments from the executable at a space might have been incorrect,
37380    # since paths with space are more likely in Windows. Give it another try with the whole
37381    # argument.
37382    path="$complete"
37383    arguments="EOL"
37384    new_path="$path"
37385
37386  windows_path="$new_path"
37387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37388    unix_path=`$CYGPATH -u "$windows_path"`
37389    new_path="$unix_path"
37390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37392    new_path="$unix_path"
37393  fi
37394
37395
37396    new_path=`$WHICH "$new_path" 2> /dev/null`
37397    # bat and cmd files are not always considered executable in MSYS causing which
37398    # to not find them
37399    if test "x$new_path" = x \
37400        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37401        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37402      new_path="$path"
37403
37404  windows_path="$new_path"
37405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37406    unix_path=`$CYGPATH -u "$windows_path"`
37407    new_path="$unix_path"
37408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37410    new_path="$unix_path"
37411  fi
37412
37413    fi
37414
37415    if test "x$new_path" = x; then
37416      # It's still not found. Now this is an unrecoverable error.
37417      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37418$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37419      has_space=`$ECHO "$complete" | $GREP " "`
37420      if test "x$has_space" != x; then
37421        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37422$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37423      fi
37424      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37425    fi
37426  fi
37427
37428  # Now new_path has a complete unix path to the binary
37429  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37430    # Keep paths in /bin as-is, but remove trailing .exe if any
37431    new_path="${new_path/%.exe/}"
37432    # Do not save /bin paths to all_fixpath_prefixes!
37433  else
37434    # Not in mixed or Windows style, start by that.
37435    new_path=`cmd //c echo $new_path`
37436
37437  input_path="$new_path"
37438  # Check if we need to convert this using DOS-style short mode. If the path
37439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37440  # take no chances and rewrite it.
37441  # Note: m4 eats our [], so we need to use [ and ] instead.
37442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37443  if test "x$has_forbidden_chars" != x; then
37444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37446  fi
37447
37448    # Output is in $new_path
37449
37450  windows_path="$new_path"
37451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37452    unix_path=`$CYGPATH -u "$windows_path"`
37453    new_path="$unix_path"
37454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37456    new_path="$unix_path"
37457  fi
37458
37459    # remove trailing .exe if any
37460    new_path="${new_path/%.exe/}"
37461
37462    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37463    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37464  fi
37465
37466    else
37467      # We're on a unix platform. Hooray! :)
37468      # First separate the path from the arguments. This will split at the first
37469      # space.
37470      complete="$STRIP"
37471      path="${complete%% *}"
37472      tmp="$complete EOL"
37473      arguments="${tmp#* }"
37474
37475      # Cannot rely on the command "which" here since it doesn't always work.
37476      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37477      if test -z "$is_absolute_path"; then
37478        # Path to executable is not absolute. Find it.
37479        IFS_save="$IFS"
37480        IFS=:
37481        for p in $PATH; do
37482          if test -f "$p/$path" && test -x "$p/$path"; then
37483            new_path="$p/$path"
37484            break
37485          fi
37486        done
37487        IFS="$IFS_save"
37488      else
37489        # This is an absolute path, we can use it without further modifications.
37490        new_path="$path"
37491      fi
37492
37493      if test "x$new_path" = x; then
37494        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37495$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37496        has_space=`$ECHO "$complete" | $GREP " "`
37497        if test "x$has_space" != x; then
37498          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37499$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37500        fi
37501        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37502      fi
37503    fi
37504
37505    # Now join together the path and the arguments once again
37506    if test "x$arguments" != xEOL; then
37507      new_complete="$new_path ${arguments% *}"
37508    else
37509      new_complete="$new_path"
37510    fi
37511
37512    if test "x$complete" != "x$new_complete"; then
37513      STRIP="$new_complete"
37514      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37515$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37516    fi
37517  fi
37518
37519
37520
37521  # Publish this variable in the help.
37522
37523
37524  if test "x$NM" = x; then
37525    # The variable is not set by user, try to locate tool using the code snippet
37526    if test -n "$ac_tool_prefix"; then
37527  for ac_prog in nm
37528  do
37529    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37530set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37532$as_echo_n "checking for $ac_word... " >&6; }
37533if ${ac_cv_prog_NM+:} false; then :
37534  $as_echo_n "(cached) " >&6
37535else
37536  if test -n "$NM"; then
37537  ac_cv_prog_NM="$NM" # Let the user override the test.
37538else
37539as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37540for as_dir in $PATH
37541do
37542  IFS=$as_save_IFS
37543  test -z "$as_dir" && as_dir=.
37544    for ac_exec_ext in '' $ac_executable_extensions; do
37545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37546    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37548    break 2
37549  fi
37550done
37551  done
37552IFS=$as_save_IFS
37553
37554fi
37555fi
37556NM=$ac_cv_prog_NM
37557if test -n "$NM"; then
37558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37559$as_echo "$NM" >&6; }
37560else
37561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37562$as_echo "no" >&6; }
37563fi
37564
37565
37566    test -n "$NM" && break
37567  done
37568fi
37569if test -z "$NM"; then
37570  ac_ct_NM=$NM
37571  for ac_prog in nm
37572do
37573  # Extract the first word of "$ac_prog", so it can be a program name with args.
37574set dummy $ac_prog; ac_word=$2
37575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37576$as_echo_n "checking for $ac_word... " >&6; }
37577if ${ac_cv_prog_ac_ct_NM+:} false; then :
37578  $as_echo_n "(cached) " >&6
37579else
37580  if test -n "$ac_ct_NM"; then
37581  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37582else
37583as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37584for as_dir in $PATH
37585do
37586  IFS=$as_save_IFS
37587  test -z "$as_dir" && as_dir=.
37588    for ac_exec_ext in '' $ac_executable_extensions; do
37589  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37590    ac_cv_prog_ac_ct_NM="$ac_prog"
37591    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37592    break 2
37593  fi
37594done
37595  done
37596IFS=$as_save_IFS
37597
37598fi
37599fi
37600ac_ct_NM=$ac_cv_prog_ac_ct_NM
37601if test -n "$ac_ct_NM"; then
37602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37603$as_echo "$ac_ct_NM" >&6; }
37604else
37605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37606$as_echo "no" >&6; }
37607fi
37608
37609
37610  test -n "$ac_ct_NM" && break
37611done
37612
37613  if test "x$ac_ct_NM" = x; then
37614    NM=""
37615  else
37616    case $cross_compiling:$ac_tool_warned in
37617yes:)
37618{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37619$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37620ac_tool_warned=yes ;;
37621esac
37622    NM=$ac_ct_NM
37623  fi
37624fi
37625
37626  else
37627    # The variable is set, but is it from the command line or the environment?
37628
37629    # Try to remove the string !NM! from our list.
37630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37632      # If it failed, the variable was not from the command line. Ignore it,
37633      # but warn the user (except for BASH, which is always set by the calling BASH).
37634      if test "xNM" != xBASH; then
37635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37636$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37637      fi
37638      # Try to locate tool using the code snippet
37639      if test -n "$ac_tool_prefix"; then
37640  for ac_prog in nm
37641  do
37642    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37643set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37645$as_echo_n "checking for $ac_word... " >&6; }
37646if ${ac_cv_prog_NM+:} false; then :
37647  $as_echo_n "(cached) " >&6
37648else
37649  if test -n "$NM"; then
37650  ac_cv_prog_NM="$NM" # Let the user override the test.
37651else
37652as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37653for as_dir in $PATH
37654do
37655  IFS=$as_save_IFS
37656  test -z "$as_dir" && as_dir=.
37657    for ac_exec_ext in '' $ac_executable_extensions; do
37658  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37659    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37660    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37661    break 2
37662  fi
37663done
37664  done
37665IFS=$as_save_IFS
37666
37667fi
37668fi
37669NM=$ac_cv_prog_NM
37670if test -n "$NM"; then
37671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37672$as_echo "$NM" >&6; }
37673else
37674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37675$as_echo "no" >&6; }
37676fi
37677
37678
37679    test -n "$NM" && break
37680  done
37681fi
37682if test -z "$NM"; then
37683  ac_ct_NM=$NM
37684  for ac_prog in nm
37685do
37686  # Extract the first word of "$ac_prog", so it can be a program name with args.
37687set dummy $ac_prog; ac_word=$2
37688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37689$as_echo_n "checking for $ac_word... " >&6; }
37690if ${ac_cv_prog_ac_ct_NM+:} false; then :
37691  $as_echo_n "(cached) " >&6
37692else
37693  if test -n "$ac_ct_NM"; then
37694  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37695else
37696as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37697for as_dir in $PATH
37698do
37699  IFS=$as_save_IFS
37700  test -z "$as_dir" && as_dir=.
37701    for ac_exec_ext in '' $ac_executable_extensions; do
37702  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37703    ac_cv_prog_ac_ct_NM="$ac_prog"
37704    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37705    break 2
37706  fi
37707done
37708  done
37709IFS=$as_save_IFS
37710
37711fi
37712fi
37713ac_ct_NM=$ac_cv_prog_ac_ct_NM
37714if test -n "$ac_ct_NM"; then
37715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37716$as_echo "$ac_ct_NM" >&6; }
37717else
37718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37719$as_echo "no" >&6; }
37720fi
37721
37722
37723  test -n "$ac_ct_NM" && break
37724done
37725
37726  if test "x$ac_ct_NM" = x; then
37727    NM=""
37728  else
37729    case $cross_compiling:$ac_tool_warned in
37730yes:)
37731{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37732$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37733ac_tool_warned=yes ;;
37734esac
37735    NM=$ac_ct_NM
37736  fi
37737fi
37738
37739    else
37740      # If it succeeded, then it was overridden by the user. We will use it
37741      # for the tool.
37742
37743      # First remove it from the list of overridden variables, so we can test
37744      # for unknown variables in the end.
37745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37746
37747      # Check if the provided tool contains a complete path.
37748      tool_specified="$NM"
37749      tool_basename="${tool_specified##*/}"
37750      if test "x$tool_basename" = "x$tool_specified"; then
37751        # A command without a complete path is provided, search $PATH.
37752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37753$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37754        # Extract the first word of "$tool_basename", so it can be a program name with args.
37755set dummy $tool_basename; ac_word=$2
37756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37757$as_echo_n "checking for $ac_word... " >&6; }
37758if ${ac_cv_path_NM+:} false; then :
37759  $as_echo_n "(cached) " >&6
37760else
37761  case $NM in
37762  [\\/]* | ?:[\\/]*)
37763  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37764  ;;
37765  *)
37766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37767for as_dir in $PATH
37768do
37769  IFS=$as_save_IFS
37770  test -z "$as_dir" && as_dir=.
37771    for ac_exec_ext in '' $ac_executable_extensions; do
37772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37773    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37775    break 2
37776  fi
37777done
37778  done
37779IFS=$as_save_IFS
37780
37781  ;;
37782esac
37783fi
37784NM=$ac_cv_path_NM
37785if test -n "$NM"; then
37786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37787$as_echo "$NM" >&6; }
37788else
37789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37790$as_echo "no" >&6; }
37791fi
37792
37793
37794        if test "x$NM" = x; then
37795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37796        fi
37797      else
37798        # Otherwise we believe it is a complete path. Use it as it is.
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37800$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37802$as_echo_n "checking for NM... " >&6; }
37803        if test ! -x "$tool_specified"; then
37804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37805$as_echo "not found" >&6; }
37806          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37807        fi
37808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37809$as_echo "$tool_specified" >&6; }
37810      fi
37811    fi
37812  fi
37813
37814
37815
37816  # Only process if variable expands to non-empty
37817
37818  if test "x$NM" != x; then
37819    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37820
37821  # First separate the path from the arguments. This will split at the first
37822  # space.
37823  complete="$NM"
37824  path="${complete%% *}"
37825  tmp="$complete EOL"
37826  arguments="${tmp#* }"
37827
37828  # Input might be given as Windows format, start by converting to
37829  # unix format.
37830  new_path=`$CYGPATH -u "$path"`
37831
37832  # Now try to locate executable using which
37833  new_path=`$WHICH "$new_path" 2> /dev/null`
37834  # bat and cmd files are not always considered executable in cygwin causing which
37835  # to not find them
37836  if test "x$new_path" = x \
37837      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37838      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37839    new_path=`$CYGPATH -u "$path"`
37840  fi
37841  if test "x$new_path" = x; then
37842    # Oops. Which didn't find the executable.
37843    # The splitting of arguments from the executable at a space might have been incorrect,
37844    # since paths with space are more likely in Windows. Give it another try with the whole
37845    # argument.
37846    path="$complete"
37847    arguments="EOL"
37848    new_path=`$CYGPATH -u "$path"`
37849    new_path=`$WHICH "$new_path" 2> /dev/null`
37850    # bat and cmd files are not always considered executable in cygwin causing which
37851    # to not find them
37852    if test "x$new_path" = x \
37853        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37854        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37855      new_path=`$CYGPATH -u "$path"`
37856    fi
37857    if test "x$new_path" = x; then
37858      # It's still not found. Now this is an unrecoverable error.
37859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37860$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37861      has_space=`$ECHO "$complete" | $GREP " "`
37862      if test "x$has_space" != x; then
37863        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37864$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37865      fi
37866      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37867    fi
37868  fi
37869
37870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37873  # "foo.exe" is OK but "foo" is an error.
37874  #
37875  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37876  # It is also a way to make sure we got the proper file name for the real test later on.
37877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37878  if test "x$test_shortpath" = x; then
37879    # Short path failed, file does not exist as specified.
37880    # Try adding .exe or .cmd
37881    if test -f "${new_path}.exe"; then
37882      input_to_shortpath="${new_path}.exe"
37883    elif test -f "${new_path}.cmd"; then
37884      input_to_shortpath="${new_path}.cmd"
37885    else
37886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37887$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37888      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37889$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37890      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37891    fi
37892  else
37893    input_to_shortpath="$new_path"
37894  fi
37895
37896  # Call helper function which possibly converts this using DOS-style short mode.
37897  # If so, the updated path is stored in $new_path.
37898  new_path="$input_to_shortpath"
37899
37900  input_path="$input_to_shortpath"
37901  # Check if we need to convert this using DOS-style short mode. If the path
37902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37903  # take no chances and rewrite it.
37904  # Note: m4 eats our [], so we need to use [ and ] instead.
37905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37906  if test "x$has_forbidden_chars" != x; then
37907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37911      # Going to short mode and back again did indeed matter. Since short mode is
37912      # case insensitive, let's make it lowercase to improve readability.
37913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37914      # Now convert it back to Unix-stile (cygpath)
37915      input_path=`$CYGPATH -u "$shortmode_path"`
37916      new_path="$input_path"
37917    fi
37918  fi
37919
37920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37921  if test "x$test_cygdrive_prefix" = x; then
37922    # As a simple fix, exclude /usr/bin since it's not a real path.
37923    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37925      # a path prefixed by /cygdrive for fixpath to work.
37926      new_path="$CYGWIN_ROOT_PATH$input_path"
37927    fi
37928  fi
37929
37930  # remove trailing .exe if any
37931  new_path="${new_path/%.exe/}"
37932
37933    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37934
37935  # First separate the path from the arguments. This will split at the first
37936  # space.
37937  complete="$NM"
37938  path="${complete%% *}"
37939  tmp="$complete EOL"
37940  arguments="${tmp#* }"
37941
37942  # Input might be given as Windows format, start by converting to
37943  # unix format.
37944  new_path="$path"
37945
37946  windows_path="$new_path"
37947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37948    unix_path=`$CYGPATH -u "$windows_path"`
37949    new_path="$unix_path"
37950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37952    new_path="$unix_path"
37953  fi
37954
37955
37956  # Now try to locate executable using which
37957  new_path=`$WHICH "$new_path" 2> /dev/null`
37958
37959  if test "x$new_path" = x; then
37960    # Oops. Which didn't find the executable.
37961    # The splitting of arguments from the executable at a space might have been incorrect,
37962    # since paths with space are more likely in Windows. Give it another try with the whole
37963    # argument.
37964    path="$complete"
37965    arguments="EOL"
37966    new_path="$path"
37967
37968  windows_path="$new_path"
37969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37970    unix_path=`$CYGPATH -u "$windows_path"`
37971    new_path="$unix_path"
37972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37974    new_path="$unix_path"
37975  fi
37976
37977
37978    new_path=`$WHICH "$new_path" 2> /dev/null`
37979    # bat and cmd files are not always considered executable in MSYS causing which
37980    # to not find them
37981    if test "x$new_path" = x \
37982        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37983        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37984      new_path="$path"
37985
37986  windows_path="$new_path"
37987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37988    unix_path=`$CYGPATH -u "$windows_path"`
37989    new_path="$unix_path"
37990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37992    new_path="$unix_path"
37993  fi
37994
37995    fi
37996
37997    if test "x$new_path" = x; then
37998      # It's still not found. Now this is an unrecoverable error.
37999      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38000$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38001      has_space=`$ECHO "$complete" | $GREP " "`
38002      if test "x$has_space" != x; then
38003        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38004$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38005      fi
38006      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38007    fi
38008  fi
38009
38010  # Now new_path has a complete unix path to the binary
38011  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38012    # Keep paths in /bin as-is, but remove trailing .exe if any
38013    new_path="${new_path/%.exe/}"
38014    # Do not save /bin paths to all_fixpath_prefixes!
38015  else
38016    # Not in mixed or Windows style, start by that.
38017    new_path=`cmd //c echo $new_path`
38018
38019  input_path="$new_path"
38020  # Check if we need to convert this using DOS-style short mode. If the path
38021  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38022  # take no chances and rewrite it.
38023  # Note: m4 eats our [], so we need to use [ and ] instead.
38024  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38025  if test "x$has_forbidden_chars" != x; then
38026    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38027    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38028  fi
38029
38030    # Output is in $new_path
38031
38032  windows_path="$new_path"
38033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38034    unix_path=`$CYGPATH -u "$windows_path"`
38035    new_path="$unix_path"
38036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38038    new_path="$unix_path"
38039  fi
38040
38041    # remove trailing .exe if any
38042    new_path="${new_path/%.exe/}"
38043
38044    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38045    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38046  fi
38047
38048    else
38049      # We're on a unix platform. Hooray! :)
38050      # First separate the path from the arguments. This will split at the first
38051      # space.
38052      complete="$NM"
38053      path="${complete%% *}"
38054      tmp="$complete EOL"
38055      arguments="${tmp#* }"
38056
38057      # Cannot rely on the command "which" here since it doesn't always work.
38058      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38059      if test -z "$is_absolute_path"; then
38060        # Path to executable is not absolute. Find it.
38061        IFS_save="$IFS"
38062        IFS=:
38063        for p in $PATH; do
38064          if test -f "$p/$path" && test -x "$p/$path"; then
38065            new_path="$p/$path"
38066            break
38067          fi
38068        done
38069        IFS="$IFS_save"
38070      else
38071        # This is an absolute path, we can use it without further modifications.
38072        new_path="$path"
38073      fi
38074
38075      if test "x$new_path" = x; then
38076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
38077$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
38078        has_space=`$ECHO "$complete" | $GREP " "`
38079        if test "x$has_space" != x; then
38080          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38081$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38082        fi
38083        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
38084      fi
38085    fi
38086
38087    # Now join together the path and the arguments once again
38088    if test "x$arguments" != xEOL; then
38089      new_complete="$new_path ${arguments% *}"
38090    else
38091      new_complete="$new_path"
38092    fi
38093
38094    if test "x$complete" != "x$new_complete"; then
38095      NM="$new_complete"
38096      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
38097$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
38098    fi
38099  fi
38100
38101    GNM="$NM"
38102
38103  fi
38104
38105  # objcopy is used for moving debug symbols to separate files when
38106  # full debug symbols are enabled.
38107  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
38108
38109
38110  # Publish this variable in the help.
38111
38112
38113  if test "x$OBJCOPY" = x; then
38114    # The variable is not set by user, try to locate tool using the code snippet
38115    if test -n "$ac_tool_prefix"; then
38116  for ac_prog in gobjcopy objcopy
38117  do
38118    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38119set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38121$as_echo_n "checking for $ac_word... " >&6; }
38122if ${ac_cv_prog_OBJCOPY+:} false; then :
38123  $as_echo_n "(cached) " >&6
38124else
38125  if test -n "$OBJCOPY"; then
38126  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38127else
38128as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38129for as_dir in $PATH
38130do
38131  IFS=$as_save_IFS
38132  test -z "$as_dir" && as_dir=.
38133    for ac_exec_ext in '' $ac_executable_extensions; do
38134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38135    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38137    break 2
38138  fi
38139done
38140  done
38141IFS=$as_save_IFS
38142
38143fi
38144fi
38145OBJCOPY=$ac_cv_prog_OBJCOPY
38146if test -n "$OBJCOPY"; then
38147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38148$as_echo "$OBJCOPY" >&6; }
38149else
38150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38151$as_echo "no" >&6; }
38152fi
38153
38154
38155    test -n "$OBJCOPY" && break
38156  done
38157fi
38158if test -z "$OBJCOPY"; then
38159  ac_ct_OBJCOPY=$OBJCOPY
38160  for ac_prog in gobjcopy objcopy
38161do
38162  # Extract the first word of "$ac_prog", so it can be a program name with args.
38163set dummy $ac_prog; ac_word=$2
38164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38165$as_echo_n "checking for $ac_word... " >&6; }
38166if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38167  $as_echo_n "(cached) " >&6
38168else
38169  if test -n "$ac_ct_OBJCOPY"; then
38170  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38171else
38172as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38173for as_dir in $PATH
38174do
38175  IFS=$as_save_IFS
38176  test -z "$as_dir" && as_dir=.
38177    for ac_exec_ext in '' $ac_executable_extensions; do
38178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38179    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38181    break 2
38182  fi
38183done
38184  done
38185IFS=$as_save_IFS
38186
38187fi
38188fi
38189ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38190if test -n "$ac_ct_OBJCOPY"; then
38191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38192$as_echo "$ac_ct_OBJCOPY" >&6; }
38193else
38194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38195$as_echo "no" >&6; }
38196fi
38197
38198
38199  test -n "$ac_ct_OBJCOPY" && break
38200done
38201
38202  if test "x$ac_ct_OBJCOPY" = x; then
38203    OBJCOPY=""
38204  else
38205    case $cross_compiling:$ac_tool_warned in
38206yes:)
38207{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38208$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38209ac_tool_warned=yes ;;
38210esac
38211    OBJCOPY=$ac_ct_OBJCOPY
38212  fi
38213fi
38214
38215  else
38216    # The variable is set, but is it from the command line or the environment?
38217
38218    # Try to remove the string !OBJCOPY! from our list.
38219    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
38220    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38221      # If it failed, the variable was not from the command line. Ignore it,
38222      # but warn the user (except for BASH, which is always set by the calling BASH).
38223      if test "xOBJCOPY" != xBASH; then
38224        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
38225$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
38226      fi
38227      # Try to locate tool using the code snippet
38228      if test -n "$ac_tool_prefix"; then
38229  for ac_prog in gobjcopy objcopy
38230  do
38231    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38232set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38234$as_echo_n "checking for $ac_word... " >&6; }
38235if ${ac_cv_prog_OBJCOPY+:} false; then :
38236  $as_echo_n "(cached) " >&6
38237else
38238  if test -n "$OBJCOPY"; then
38239  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
38240else
38241as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38242for as_dir in $PATH
38243do
38244  IFS=$as_save_IFS
38245  test -z "$as_dir" && as_dir=.
38246    for ac_exec_ext in '' $ac_executable_extensions; do
38247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38248    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
38249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38250    break 2
38251  fi
38252done
38253  done
38254IFS=$as_save_IFS
38255
38256fi
38257fi
38258OBJCOPY=$ac_cv_prog_OBJCOPY
38259if test -n "$OBJCOPY"; then
38260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38261$as_echo "$OBJCOPY" >&6; }
38262else
38263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38264$as_echo "no" >&6; }
38265fi
38266
38267
38268    test -n "$OBJCOPY" && break
38269  done
38270fi
38271if test -z "$OBJCOPY"; then
38272  ac_ct_OBJCOPY=$OBJCOPY
38273  for ac_prog in gobjcopy objcopy
38274do
38275  # Extract the first word of "$ac_prog", so it can be a program name with args.
38276set dummy $ac_prog; ac_word=$2
38277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38278$as_echo_n "checking for $ac_word... " >&6; }
38279if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38280  $as_echo_n "(cached) " >&6
38281else
38282  if test -n "$ac_ct_OBJCOPY"; then
38283  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38284else
38285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38286for as_dir in $PATH
38287do
38288  IFS=$as_save_IFS
38289  test -z "$as_dir" && as_dir=.
38290    for ac_exec_ext in '' $ac_executable_extensions; do
38291  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38292    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38293    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38294    break 2
38295  fi
38296done
38297  done
38298IFS=$as_save_IFS
38299
38300fi
38301fi
38302ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38303if test -n "$ac_ct_OBJCOPY"; then
38304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38305$as_echo "$ac_ct_OBJCOPY" >&6; }
38306else
38307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38308$as_echo "no" >&6; }
38309fi
38310
38311
38312  test -n "$ac_ct_OBJCOPY" && break
38313done
38314
38315  if test "x$ac_ct_OBJCOPY" = x; then
38316    OBJCOPY=""
38317  else
38318    case $cross_compiling:$ac_tool_warned in
38319yes:)
38320{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38321$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38322ac_tool_warned=yes ;;
38323esac
38324    OBJCOPY=$ac_ct_OBJCOPY
38325  fi
38326fi
38327
38328    else
38329      # If it succeeded, then it was overridden by the user. We will use it
38330      # for the tool.
38331
38332      # First remove it from the list of overridden variables, so we can test
38333      # for unknown variables in the end.
38334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38335
38336      # Check if the provided tool contains a complete path.
38337      tool_specified="$OBJCOPY"
38338      tool_basename="${tool_specified##*/}"
38339      if test "x$tool_basename" = "x$tool_specified"; then
38340        # A command without a complete path is provided, search $PATH.
38341        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38342$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38343        # Extract the first word of "$tool_basename", so it can be a program name with args.
38344set dummy $tool_basename; ac_word=$2
38345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38346$as_echo_n "checking for $ac_word... " >&6; }
38347if ${ac_cv_path_OBJCOPY+:} false; then :
38348  $as_echo_n "(cached) " >&6
38349else
38350  case $OBJCOPY in
38351  [\\/]* | ?:[\\/]*)
38352  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38353  ;;
38354  *)
38355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38356for as_dir in $PATH
38357do
38358  IFS=$as_save_IFS
38359  test -z "$as_dir" && as_dir=.
38360    for ac_exec_ext in '' $ac_executable_extensions; do
38361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38362    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38364    break 2
38365  fi
38366done
38367  done
38368IFS=$as_save_IFS
38369
38370  ;;
38371esac
38372fi
38373OBJCOPY=$ac_cv_path_OBJCOPY
38374if test -n "$OBJCOPY"; then
38375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38376$as_echo "$OBJCOPY" >&6; }
38377else
38378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38379$as_echo "no" >&6; }
38380fi
38381
38382
38383        if test "x$OBJCOPY" = x; then
38384          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38385        fi
38386      else
38387        # Otherwise we believe it is a complete path. Use it as it is.
38388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38389$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38390        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38391$as_echo_n "checking for OBJCOPY... " >&6; }
38392        if test ! -x "$tool_specified"; then
38393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38394$as_echo "not found" >&6; }
38395          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38396        fi
38397        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38398$as_echo "$tool_specified" >&6; }
38399      fi
38400    fi
38401  fi
38402
38403
38404    # Only call fixup if objcopy was found.
38405    if test -n "$OBJCOPY"; then
38406
38407  # Only process if variable expands to non-empty
38408
38409  if test "x$OBJCOPY" != x; then
38410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38411
38412  # First separate the path from the arguments. This will split at the first
38413  # space.
38414  complete="$OBJCOPY"
38415  path="${complete%% *}"
38416  tmp="$complete EOL"
38417  arguments="${tmp#* }"
38418
38419  # Input might be given as Windows format, start by converting to
38420  # unix format.
38421  new_path=`$CYGPATH -u "$path"`
38422
38423  # Now try to locate executable using which
38424  new_path=`$WHICH "$new_path" 2> /dev/null`
38425  # bat and cmd files are not always considered executable in cygwin causing which
38426  # to not find them
38427  if test "x$new_path" = x \
38428      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38429      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38430    new_path=`$CYGPATH -u "$path"`
38431  fi
38432  if test "x$new_path" = x; then
38433    # Oops. Which didn't find the executable.
38434    # The splitting of arguments from the executable at a space might have been incorrect,
38435    # since paths with space are more likely in Windows. Give it another try with the whole
38436    # argument.
38437    path="$complete"
38438    arguments="EOL"
38439    new_path=`$CYGPATH -u "$path"`
38440    new_path=`$WHICH "$new_path" 2> /dev/null`
38441    # bat and cmd files are not always considered executable in cygwin causing which
38442    # to not find them
38443    if test "x$new_path" = x \
38444        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38445        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38446      new_path=`$CYGPATH -u "$path"`
38447    fi
38448    if test "x$new_path" = x; then
38449      # It's still not found. Now this is an unrecoverable error.
38450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38451$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38452      has_space=`$ECHO "$complete" | $GREP " "`
38453      if test "x$has_space" != x; then
38454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38456      fi
38457      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38458    fi
38459  fi
38460
38461  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38462  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38463  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38464  # "foo.exe" is OK but "foo" is an error.
38465  #
38466  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38467  # It is also a way to make sure we got the proper file name for the real test later on.
38468  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38469  if test "x$test_shortpath" = x; then
38470    # Short path failed, file does not exist as specified.
38471    # Try adding .exe or .cmd
38472    if test -f "${new_path}.exe"; then
38473      input_to_shortpath="${new_path}.exe"
38474    elif test -f "${new_path}.cmd"; then
38475      input_to_shortpath="${new_path}.cmd"
38476    else
38477      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38478$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38479      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38480$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38481      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38482    fi
38483  else
38484    input_to_shortpath="$new_path"
38485  fi
38486
38487  # Call helper function which possibly converts this using DOS-style short mode.
38488  # If so, the updated path is stored in $new_path.
38489  new_path="$input_to_shortpath"
38490
38491  input_path="$input_to_shortpath"
38492  # Check if we need to convert this using DOS-style short mode. If the path
38493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38494  # take no chances and rewrite it.
38495  # Note: m4 eats our [], so we need to use [ and ] instead.
38496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38497  if test "x$has_forbidden_chars" != x; then
38498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38499    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38500    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38501    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38502      # Going to short mode and back again did indeed matter. Since short mode is
38503      # case insensitive, let's make it lowercase to improve readability.
38504      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38505      # Now convert it back to Unix-stile (cygpath)
38506      input_path=`$CYGPATH -u "$shortmode_path"`
38507      new_path="$input_path"
38508    fi
38509  fi
38510
38511  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38512  if test "x$test_cygdrive_prefix" = x; then
38513    # As a simple fix, exclude /usr/bin since it's not a real path.
38514    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38515      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38516      # a path prefixed by /cygdrive for fixpath to work.
38517      new_path="$CYGWIN_ROOT_PATH$input_path"
38518    fi
38519  fi
38520
38521  # remove trailing .exe if any
38522  new_path="${new_path/%.exe/}"
38523
38524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38525
38526  # First separate the path from the arguments. This will split at the first
38527  # space.
38528  complete="$OBJCOPY"
38529  path="${complete%% *}"
38530  tmp="$complete EOL"
38531  arguments="${tmp#* }"
38532
38533  # Input might be given as Windows format, start by converting to
38534  # unix format.
38535  new_path="$path"
38536
38537  windows_path="$new_path"
38538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38539    unix_path=`$CYGPATH -u "$windows_path"`
38540    new_path="$unix_path"
38541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38543    new_path="$unix_path"
38544  fi
38545
38546
38547  # Now try to locate executable using which
38548  new_path=`$WHICH "$new_path" 2> /dev/null`
38549
38550  if test "x$new_path" = x; then
38551    # Oops. Which didn't find the executable.
38552    # The splitting of arguments from the executable at a space might have been incorrect,
38553    # since paths with space are more likely in Windows. Give it another try with the whole
38554    # argument.
38555    path="$complete"
38556    arguments="EOL"
38557    new_path="$path"
38558
38559  windows_path="$new_path"
38560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38561    unix_path=`$CYGPATH -u "$windows_path"`
38562    new_path="$unix_path"
38563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38565    new_path="$unix_path"
38566  fi
38567
38568
38569    new_path=`$WHICH "$new_path" 2> /dev/null`
38570    # bat and cmd files are not always considered executable in MSYS causing which
38571    # to not find them
38572    if test "x$new_path" = x \
38573        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38574        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38575      new_path="$path"
38576
38577  windows_path="$new_path"
38578  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38579    unix_path=`$CYGPATH -u "$windows_path"`
38580    new_path="$unix_path"
38581  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38582    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38583    new_path="$unix_path"
38584  fi
38585
38586    fi
38587
38588    if test "x$new_path" = x; then
38589      # It's still not found. Now this is an unrecoverable error.
38590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38591$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38592      has_space=`$ECHO "$complete" | $GREP " "`
38593      if test "x$has_space" != x; then
38594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38596      fi
38597      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38598    fi
38599  fi
38600
38601  # Now new_path has a complete unix path to the binary
38602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38603    # Keep paths in /bin as-is, but remove trailing .exe if any
38604    new_path="${new_path/%.exe/}"
38605    # Do not save /bin paths to all_fixpath_prefixes!
38606  else
38607    # Not in mixed or Windows style, start by that.
38608    new_path=`cmd //c echo $new_path`
38609
38610  input_path="$new_path"
38611  # Check if we need to convert this using DOS-style short mode. If the path
38612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38613  # take no chances and rewrite it.
38614  # Note: m4 eats our [], so we need to use [ and ] instead.
38615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38616  if test "x$has_forbidden_chars" != x; then
38617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38619  fi
38620
38621    # Output is in $new_path
38622
38623  windows_path="$new_path"
38624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38625    unix_path=`$CYGPATH -u "$windows_path"`
38626    new_path="$unix_path"
38627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38629    new_path="$unix_path"
38630  fi
38631
38632    # remove trailing .exe if any
38633    new_path="${new_path/%.exe/}"
38634
38635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38637  fi
38638
38639    else
38640      # We're on a unix platform. Hooray! :)
38641      # First separate the path from the arguments. This will split at the first
38642      # space.
38643      complete="$OBJCOPY"
38644      path="${complete%% *}"
38645      tmp="$complete EOL"
38646      arguments="${tmp#* }"
38647
38648      # Cannot rely on the command "which" here since it doesn't always work.
38649      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38650      if test -z "$is_absolute_path"; then
38651        # Path to executable is not absolute. Find it.
38652        IFS_save="$IFS"
38653        IFS=:
38654        for p in $PATH; do
38655          if test -f "$p/$path" && test -x "$p/$path"; then
38656            new_path="$p/$path"
38657            break
38658          fi
38659        done
38660        IFS="$IFS_save"
38661      else
38662        # This is an absolute path, we can use it without further modifications.
38663        new_path="$path"
38664      fi
38665
38666      if test "x$new_path" = x; then
38667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38668$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38669        has_space=`$ECHO "$complete" | $GREP " "`
38670        if test "x$has_space" != x; then
38671          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38673        fi
38674        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38675      fi
38676    fi
38677
38678    # Now join together the path and the arguments once again
38679    if test "x$arguments" != xEOL; then
38680      new_complete="$new_path ${arguments% *}"
38681    else
38682      new_complete="$new_path"
38683    fi
38684
38685    if test "x$complete" != "x$new_complete"; then
38686      OBJCOPY="$new_complete"
38687      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38688$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38689    fi
38690  fi
38691
38692    fi
38693  fi
38694
38695
38696
38697  # Publish this variable in the help.
38698
38699
38700  if test "x$OBJDUMP" = x; then
38701    # The variable is not set by user, try to locate tool using the code snippet
38702    if test -n "$ac_tool_prefix"; then
38703  for ac_prog in gobjdump objdump
38704  do
38705    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38706set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38708$as_echo_n "checking for $ac_word... " >&6; }
38709if ${ac_cv_prog_OBJDUMP+:} false; then :
38710  $as_echo_n "(cached) " >&6
38711else
38712  if test -n "$OBJDUMP"; then
38713  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38714else
38715as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38716for as_dir in $PATH
38717do
38718  IFS=$as_save_IFS
38719  test -z "$as_dir" && as_dir=.
38720    for ac_exec_ext in '' $ac_executable_extensions; do
38721  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38722    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38723    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38724    break 2
38725  fi
38726done
38727  done
38728IFS=$as_save_IFS
38729
38730fi
38731fi
38732OBJDUMP=$ac_cv_prog_OBJDUMP
38733if test -n "$OBJDUMP"; then
38734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38735$as_echo "$OBJDUMP" >&6; }
38736else
38737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38738$as_echo "no" >&6; }
38739fi
38740
38741
38742    test -n "$OBJDUMP" && break
38743  done
38744fi
38745if test -z "$OBJDUMP"; then
38746  ac_ct_OBJDUMP=$OBJDUMP
38747  for ac_prog in gobjdump objdump
38748do
38749  # Extract the first word of "$ac_prog", so it can be a program name with args.
38750set dummy $ac_prog; ac_word=$2
38751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38752$as_echo_n "checking for $ac_word... " >&6; }
38753if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38754  $as_echo_n "(cached) " >&6
38755else
38756  if test -n "$ac_ct_OBJDUMP"; then
38757  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38758else
38759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38760for as_dir in $PATH
38761do
38762  IFS=$as_save_IFS
38763  test -z "$as_dir" && as_dir=.
38764    for ac_exec_ext in '' $ac_executable_extensions; do
38765  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38766    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38767    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38768    break 2
38769  fi
38770done
38771  done
38772IFS=$as_save_IFS
38773
38774fi
38775fi
38776ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38777if test -n "$ac_ct_OBJDUMP"; then
38778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38779$as_echo "$ac_ct_OBJDUMP" >&6; }
38780else
38781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38782$as_echo "no" >&6; }
38783fi
38784
38785
38786  test -n "$ac_ct_OBJDUMP" && break
38787done
38788
38789  if test "x$ac_ct_OBJDUMP" = x; then
38790    OBJDUMP=""
38791  else
38792    case $cross_compiling:$ac_tool_warned in
38793yes:)
38794{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38795$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38796ac_tool_warned=yes ;;
38797esac
38798    OBJDUMP=$ac_ct_OBJDUMP
38799  fi
38800fi
38801
38802  else
38803    # The variable is set, but is it from the command line or the environment?
38804
38805    # Try to remove the string !OBJDUMP! from our list.
38806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38808      # If it failed, the variable was not from the command line. Ignore it,
38809      # but warn the user (except for BASH, which is always set by the calling BASH).
38810      if test "xOBJDUMP" != xBASH; then
38811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38812$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38813      fi
38814      # Try to locate tool using the code snippet
38815      if test -n "$ac_tool_prefix"; then
38816  for ac_prog in gobjdump objdump
38817  do
38818    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38819set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38821$as_echo_n "checking for $ac_word... " >&6; }
38822if ${ac_cv_prog_OBJDUMP+:} false; then :
38823  $as_echo_n "(cached) " >&6
38824else
38825  if test -n "$OBJDUMP"; then
38826  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38827else
38828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38829for as_dir in $PATH
38830do
38831  IFS=$as_save_IFS
38832  test -z "$as_dir" && as_dir=.
38833    for ac_exec_ext in '' $ac_executable_extensions; do
38834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38835    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38837    break 2
38838  fi
38839done
38840  done
38841IFS=$as_save_IFS
38842
38843fi
38844fi
38845OBJDUMP=$ac_cv_prog_OBJDUMP
38846if test -n "$OBJDUMP"; then
38847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38848$as_echo "$OBJDUMP" >&6; }
38849else
38850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38851$as_echo "no" >&6; }
38852fi
38853
38854
38855    test -n "$OBJDUMP" && break
38856  done
38857fi
38858if test -z "$OBJDUMP"; then
38859  ac_ct_OBJDUMP=$OBJDUMP
38860  for ac_prog in gobjdump objdump
38861do
38862  # Extract the first word of "$ac_prog", so it can be a program name with args.
38863set dummy $ac_prog; ac_word=$2
38864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38865$as_echo_n "checking for $ac_word... " >&6; }
38866if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38867  $as_echo_n "(cached) " >&6
38868else
38869  if test -n "$ac_ct_OBJDUMP"; then
38870  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38871else
38872as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38873for as_dir in $PATH
38874do
38875  IFS=$as_save_IFS
38876  test -z "$as_dir" && as_dir=.
38877    for ac_exec_ext in '' $ac_executable_extensions; do
38878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38879    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38881    break 2
38882  fi
38883done
38884  done
38885IFS=$as_save_IFS
38886
38887fi
38888fi
38889ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38890if test -n "$ac_ct_OBJDUMP"; then
38891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38892$as_echo "$ac_ct_OBJDUMP" >&6; }
38893else
38894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38895$as_echo "no" >&6; }
38896fi
38897
38898
38899  test -n "$ac_ct_OBJDUMP" && break
38900done
38901
38902  if test "x$ac_ct_OBJDUMP" = x; then
38903    OBJDUMP=""
38904  else
38905    case $cross_compiling:$ac_tool_warned in
38906yes:)
38907{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38908$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38909ac_tool_warned=yes ;;
38910esac
38911    OBJDUMP=$ac_ct_OBJDUMP
38912  fi
38913fi
38914
38915    else
38916      # If it succeeded, then it was overridden by the user. We will use it
38917      # for the tool.
38918
38919      # First remove it from the list of overridden variables, so we can test
38920      # for unknown variables in the end.
38921      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38922
38923      # Check if the provided tool contains a complete path.
38924      tool_specified="$OBJDUMP"
38925      tool_basename="${tool_specified##*/}"
38926      if test "x$tool_basename" = "x$tool_specified"; then
38927        # A command without a complete path is provided, search $PATH.
38928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38929$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38930        # Extract the first word of "$tool_basename", so it can be a program name with args.
38931set dummy $tool_basename; ac_word=$2
38932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38933$as_echo_n "checking for $ac_word... " >&6; }
38934if ${ac_cv_path_OBJDUMP+:} false; then :
38935  $as_echo_n "(cached) " >&6
38936else
38937  case $OBJDUMP in
38938  [\\/]* | ?:[\\/]*)
38939  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38940  ;;
38941  *)
38942  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38943for as_dir in $PATH
38944do
38945  IFS=$as_save_IFS
38946  test -z "$as_dir" && as_dir=.
38947    for ac_exec_ext in '' $ac_executable_extensions; do
38948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38949    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38951    break 2
38952  fi
38953done
38954  done
38955IFS=$as_save_IFS
38956
38957  ;;
38958esac
38959fi
38960OBJDUMP=$ac_cv_path_OBJDUMP
38961if test -n "$OBJDUMP"; then
38962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38963$as_echo "$OBJDUMP" >&6; }
38964else
38965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38966$as_echo "no" >&6; }
38967fi
38968
38969
38970        if test "x$OBJDUMP" = x; then
38971          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38972        fi
38973      else
38974        # Otherwise we believe it is a complete path. Use it as it is.
38975        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38976$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38977        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38978$as_echo_n "checking for OBJDUMP... " >&6; }
38979        if test ! -x "$tool_specified"; then
38980          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38981$as_echo "not found" >&6; }
38982          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38983        fi
38984        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38985$as_echo "$tool_specified" >&6; }
38986      fi
38987    fi
38988  fi
38989
38990
38991  if test "x$OBJDUMP" != x; then
38992    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38993    # bails if argument is missing.
38994
38995  # Only process if variable expands to non-empty
38996
38997  if test "x$OBJDUMP" != x; then
38998    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38999
39000  # First separate the path from the arguments. This will split at the first
39001  # space.
39002  complete="$OBJDUMP"
39003  path="${complete%% *}"
39004  tmp="$complete EOL"
39005  arguments="${tmp#* }"
39006
39007  # Input might be given as Windows format, start by converting to
39008  # unix format.
39009  new_path=`$CYGPATH -u "$path"`
39010
39011  # Now try to locate executable using which
39012  new_path=`$WHICH "$new_path" 2> /dev/null`
39013  # bat and cmd files are not always considered executable in cygwin causing which
39014  # to not find them
39015  if test "x$new_path" = x \
39016      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39017      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39018    new_path=`$CYGPATH -u "$path"`
39019  fi
39020  if test "x$new_path" = x; then
39021    # Oops. Which didn't find the executable.
39022    # The splitting of arguments from the executable at a space might have been incorrect,
39023    # since paths with space are more likely in Windows. Give it another try with the whole
39024    # argument.
39025    path="$complete"
39026    arguments="EOL"
39027    new_path=`$CYGPATH -u "$path"`
39028    new_path=`$WHICH "$new_path" 2> /dev/null`
39029    # bat and cmd files are not always considered executable in cygwin causing which
39030    # to not find them
39031    if test "x$new_path" = x \
39032        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39033        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39034      new_path=`$CYGPATH -u "$path"`
39035    fi
39036    if test "x$new_path" = x; then
39037      # It's still not found. Now this is an unrecoverable error.
39038      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39039$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39040      has_space=`$ECHO "$complete" | $GREP " "`
39041      if test "x$has_space" != x; then
39042        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39043$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39044      fi
39045      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39046    fi
39047  fi
39048
39049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39052  # "foo.exe" is OK but "foo" is an error.
39053  #
39054  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39055  # It is also a way to make sure we got the proper file name for the real test later on.
39056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39057  if test "x$test_shortpath" = x; then
39058    # Short path failed, file does not exist as specified.
39059    # Try adding .exe or .cmd
39060    if test -f "${new_path}.exe"; then
39061      input_to_shortpath="${new_path}.exe"
39062    elif test -f "${new_path}.cmd"; then
39063      input_to_shortpath="${new_path}.cmd"
39064    else
39065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
39066$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
39067      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39068$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39069      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39070    fi
39071  else
39072    input_to_shortpath="$new_path"
39073  fi
39074
39075  # Call helper function which possibly converts this using DOS-style short mode.
39076  # If so, the updated path is stored in $new_path.
39077  new_path="$input_to_shortpath"
39078
39079  input_path="$input_to_shortpath"
39080  # Check if we need to convert this using DOS-style short mode. If the path
39081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39082  # take no chances and rewrite it.
39083  # Note: m4 eats our [], so we need to use [ and ] instead.
39084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39085  if test "x$has_forbidden_chars" != x; then
39086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39090      # Going to short mode and back again did indeed matter. Since short mode is
39091      # case insensitive, let's make it lowercase to improve readability.
39092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39093      # Now convert it back to Unix-stile (cygpath)
39094      input_path=`$CYGPATH -u "$shortmode_path"`
39095      new_path="$input_path"
39096    fi
39097  fi
39098
39099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39100  if test "x$test_cygdrive_prefix" = x; then
39101    # As a simple fix, exclude /usr/bin since it's not a real path.
39102    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39104      # a path prefixed by /cygdrive for fixpath to work.
39105      new_path="$CYGWIN_ROOT_PATH$input_path"
39106    fi
39107  fi
39108
39109  # remove trailing .exe if any
39110  new_path="${new_path/%.exe/}"
39111
39112    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39113
39114  # First separate the path from the arguments. This will split at the first
39115  # space.
39116  complete="$OBJDUMP"
39117  path="${complete%% *}"
39118  tmp="$complete EOL"
39119  arguments="${tmp#* }"
39120
39121  # Input might be given as Windows format, start by converting to
39122  # unix format.
39123  new_path="$path"
39124
39125  windows_path="$new_path"
39126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39127    unix_path=`$CYGPATH -u "$windows_path"`
39128    new_path="$unix_path"
39129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39131    new_path="$unix_path"
39132  fi
39133
39134
39135  # Now try to locate executable using which
39136  new_path=`$WHICH "$new_path" 2> /dev/null`
39137
39138  if test "x$new_path" = x; then
39139    # Oops. Which didn't find the executable.
39140    # The splitting of arguments from the executable at a space might have been incorrect,
39141    # since paths with space are more likely in Windows. Give it another try with the whole
39142    # argument.
39143    path="$complete"
39144    arguments="EOL"
39145    new_path="$path"
39146
39147  windows_path="$new_path"
39148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39149    unix_path=`$CYGPATH -u "$windows_path"`
39150    new_path="$unix_path"
39151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39153    new_path="$unix_path"
39154  fi
39155
39156
39157    new_path=`$WHICH "$new_path" 2> /dev/null`
39158    # bat and cmd files are not always considered executable in MSYS causing which
39159    # to not find them
39160    if test "x$new_path" = x \
39161        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39162        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39163      new_path="$path"
39164
39165  windows_path="$new_path"
39166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39167    unix_path=`$CYGPATH -u "$windows_path"`
39168    new_path="$unix_path"
39169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39171    new_path="$unix_path"
39172  fi
39173
39174    fi
39175
39176    if test "x$new_path" = x; then
39177      # It's still not found. Now this is an unrecoverable error.
39178      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39179$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39180      has_space=`$ECHO "$complete" | $GREP " "`
39181      if test "x$has_space" != x; then
39182        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39183$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39184      fi
39185      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39186    fi
39187  fi
39188
39189  # Now new_path has a complete unix path to the binary
39190  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39191    # Keep paths in /bin as-is, but remove trailing .exe if any
39192    new_path="${new_path/%.exe/}"
39193    # Do not save /bin paths to all_fixpath_prefixes!
39194  else
39195    # Not in mixed or Windows style, start by that.
39196    new_path=`cmd //c echo $new_path`
39197
39198  input_path="$new_path"
39199  # Check if we need to convert this using DOS-style short mode. If the path
39200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39201  # take no chances and rewrite it.
39202  # Note: m4 eats our [], so we need to use [ and ] instead.
39203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39204  if test "x$has_forbidden_chars" != x; then
39205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39207  fi
39208
39209    # Output is in $new_path
39210
39211  windows_path="$new_path"
39212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39213    unix_path=`$CYGPATH -u "$windows_path"`
39214    new_path="$unix_path"
39215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39217    new_path="$unix_path"
39218  fi
39219
39220    # remove trailing .exe if any
39221    new_path="${new_path/%.exe/}"
39222
39223    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39224    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39225  fi
39226
39227    else
39228      # We're on a unix platform. Hooray! :)
39229      # First separate the path from the arguments. This will split at the first
39230      # space.
39231      complete="$OBJDUMP"
39232      path="${complete%% *}"
39233      tmp="$complete EOL"
39234      arguments="${tmp#* }"
39235
39236      # Cannot rely on the command "which" here since it doesn't always work.
39237      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39238      if test -z "$is_absolute_path"; then
39239        # Path to executable is not absolute. Find it.
39240        IFS_save="$IFS"
39241        IFS=:
39242        for p in $PATH; do
39243          if test -f "$p/$path" && test -x "$p/$path"; then
39244            new_path="$p/$path"
39245            break
39246          fi
39247        done
39248        IFS="$IFS_save"
39249      else
39250        # This is an absolute path, we can use it without further modifications.
39251        new_path="$path"
39252      fi
39253
39254      if test "x$new_path" = x; then
39255        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
39256$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
39257        has_space=`$ECHO "$complete" | $GREP " "`
39258        if test "x$has_space" != x; then
39259          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39260$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39261        fi
39262        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
39263      fi
39264    fi
39265
39266    # Now join together the path and the arguments once again
39267    if test "x$arguments" != xEOL; then
39268      new_complete="$new_path ${arguments% *}"
39269    else
39270      new_complete="$new_path"
39271    fi
39272
39273    if test "x$complete" != "x$new_complete"; then
39274      OBJDUMP="$new_complete"
39275      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
39276$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
39277    fi
39278  fi
39279
39280  fi
39281
39282
39283  # Restore old path.
39284  PATH="$OLD_PATH"
39285
39286  # Restore the flags to the user specified values.
39287  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
39288  CFLAGS="$ORG_CFLAGS"
39289  CXXFLAGS="$ORG_CXXFLAGS"
39290
39291
39292# Finally do some processing after the detection phase
39293
39294  if test "x$COMPILE_TYPE" = "xcross"; then
39295    # Now we need to find a C/C++ compiler that can build executables for the
39296    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39297    # used once. Also, we need to do this without adding a tools dir to the
39298    # path, otherwise we might pick up cross-compilers which don't use standard
39299    # naming.
39300
39301    # FIXME: we should list the discovered compilers as an exclude pattern!
39302    # If we do that, we can do this detection before POST_DETECTION, and still
39303    # find the build compilers in the tools dir, if needed.
39304
39305
39306  # Publish this variable in the help.
39307
39308
39309  if test "x$BUILD_CC" = x; then
39310    # The variable is not set by user, try to locate tool using the code snippet
39311    for ac_prog in cl cc gcc
39312do
39313  # Extract the first word of "$ac_prog", so it can be a program name with args.
39314set dummy $ac_prog; ac_word=$2
39315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39316$as_echo_n "checking for $ac_word... " >&6; }
39317if ${ac_cv_path_BUILD_CC+:} false; then :
39318  $as_echo_n "(cached) " >&6
39319else
39320  case $BUILD_CC in
39321  [\\/]* | ?:[\\/]*)
39322  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39323  ;;
39324  *)
39325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39326for as_dir in $PATH
39327do
39328  IFS=$as_save_IFS
39329  test -z "$as_dir" && as_dir=.
39330    for ac_exec_ext in '' $ac_executable_extensions; do
39331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39332    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39334    break 2
39335  fi
39336done
39337  done
39338IFS=$as_save_IFS
39339
39340  ;;
39341esac
39342fi
39343BUILD_CC=$ac_cv_path_BUILD_CC
39344if test -n "$BUILD_CC"; then
39345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39346$as_echo "$BUILD_CC" >&6; }
39347else
39348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39349$as_echo "no" >&6; }
39350fi
39351
39352
39353  test -n "$BUILD_CC" && break
39354done
39355
39356  else
39357    # The variable is set, but is it from the command line or the environment?
39358
39359    # Try to remove the string !BUILD_CC! from our list.
39360    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39361    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39362      # If it failed, the variable was not from the command line. Ignore it,
39363      # but warn the user (except for BASH, which is always set by the calling BASH).
39364      if test "xBUILD_CC" != xBASH; then
39365        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39366$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39367      fi
39368      # Try to locate tool using the code snippet
39369      for ac_prog in cl cc gcc
39370do
39371  # Extract the first word of "$ac_prog", so it can be a program name with args.
39372set dummy $ac_prog; ac_word=$2
39373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39374$as_echo_n "checking for $ac_word... " >&6; }
39375if ${ac_cv_path_BUILD_CC+:} false; then :
39376  $as_echo_n "(cached) " >&6
39377else
39378  case $BUILD_CC in
39379  [\\/]* | ?:[\\/]*)
39380  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39381  ;;
39382  *)
39383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39384for as_dir in $PATH
39385do
39386  IFS=$as_save_IFS
39387  test -z "$as_dir" && as_dir=.
39388    for ac_exec_ext in '' $ac_executable_extensions; do
39389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39390    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39392    break 2
39393  fi
39394done
39395  done
39396IFS=$as_save_IFS
39397
39398  ;;
39399esac
39400fi
39401BUILD_CC=$ac_cv_path_BUILD_CC
39402if test -n "$BUILD_CC"; then
39403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39404$as_echo "$BUILD_CC" >&6; }
39405else
39406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39407$as_echo "no" >&6; }
39408fi
39409
39410
39411  test -n "$BUILD_CC" && break
39412done
39413
39414    else
39415      # If it succeeded, then it was overridden by the user. We will use it
39416      # for the tool.
39417
39418      # First remove it from the list of overridden variables, so we can test
39419      # for unknown variables in the end.
39420      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39421
39422      # Check if the provided tool contains a complete path.
39423      tool_specified="$BUILD_CC"
39424      tool_basename="${tool_specified##*/}"
39425      if test "x$tool_basename" = "x$tool_specified"; then
39426        # A command without a complete path is provided, search $PATH.
39427        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39428$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39429        # Extract the first word of "$tool_basename", so it can be a program name with args.
39430set dummy $tool_basename; ac_word=$2
39431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39432$as_echo_n "checking for $ac_word... " >&6; }
39433if ${ac_cv_path_BUILD_CC+:} false; then :
39434  $as_echo_n "(cached) " >&6
39435else
39436  case $BUILD_CC in
39437  [\\/]* | ?:[\\/]*)
39438  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39439  ;;
39440  *)
39441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39442for as_dir in $PATH
39443do
39444  IFS=$as_save_IFS
39445  test -z "$as_dir" && as_dir=.
39446    for ac_exec_ext in '' $ac_executable_extensions; do
39447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39448    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39450    break 2
39451  fi
39452done
39453  done
39454IFS=$as_save_IFS
39455
39456  ;;
39457esac
39458fi
39459BUILD_CC=$ac_cv_path_BUILD_CC
39460if test -n "$BUILD_CC"; then
39461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39462$as_echo "$BUILD_CC" >&6; }
39463else
39464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39465$as_echo "no" >&6; }
39466fi
39467
39468
39469        if test "x$BUILD_CC" = x; then
39470          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39471        fi
39472      else
39473        # Otherwise we believe it is a complete path. Use it as it is.
39474        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39475$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39476        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39477$as_echo_n "checking for BUILD_CC... " >&6; }
39478        if test ! -x "$tool_specified"; then
39479          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39480$as_echo "not found" >&6; }
39481          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39482        fi
39483        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39484$as_echo "$tool_specified" >&6; }
39485      fi
39486    fi
39487  fi
39488
39489
39490
39491  # Only process if variable expands to non-empty
39492
39493  if test "x$BUILD_CC" != x; then
39494    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39495
39496  # First separate the path from the arguments. This will split at the first
39497  # space.
39498  complete="$BUILD_CC"
39499  path="${complete%% *}"
39500  tmp="$complete EOL"
39501  arguments="${tmp#* }"
39502
39503  # Input might be given as Windows format, start by converting to
39504  # unix format.
39505  new_path=`$CYGPATH -u "$path"`
39506
39507  # Now try to locate executable using which
39508  new_path=`$WHICH "$new_path" 2> /dev/null`
39509  # bat and cmd files are not always considered executable in cygwin causing which
39510  # to not find them
39511  if test "x$new_path" = x \
39512      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39513      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39514    new_path=`$CYGPATH -u "$path"`
39515  fi
39516  if test "x$new_path" = x; then
39517    # Oops. Which didn't find the executable.
39518    # The splitting of arguments from the executable at a space might have been incorrect,
39519    # since paths with space are more likely in Windows. Give it another try with the whole
39520    # argument.
39521    path="$complete"
39522    arguments="EOL"
39523    new_path=`$CYGPATH -u "$path"`
39524    new_path=`$WHICH "$new_path" 2> /dev/null`
39525    # bat and cmd files are not always considered executable in cygwin causing which
39526    # to not find them
39527    if test "x$new_path" = x \
39528        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39529        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39530      new_path=`$CYGPATH -u "$path"`
39531    fi
39532    if test "x$new_path" = x; then
39533      # It's still not found. Now this is an unrecoverable error.
39534      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39535$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39536      has_space=`$ECHO "$complete" | $GREP " "`
39537      if test "x$has_space" != x; then
39538        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39539$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39540      fi
39541      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39542    fi
39543  fi
39544
39545  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39546  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39547  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39548  # "foo.exe" is OK but "foo" is an error.
39549  #
39550  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39551  # It is also a way to make sure we got the proper file name for the real test later on.
39552  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39553  if test "x$test_shortpath" = x; then
39554    # Short path failed, file does not exist as specified.
39555    # Try adding .exe or .cmd
39556    if test -f "${new_path}.exe"; then
39557      input_to_shortpath="${new_path}.exe"
39558    elif test -f "${new_path}.cmd"; then
39559      input_to_shortpath="${new_path}.cmd"
39560    else
39561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39562$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39563      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39564$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39565      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39566    fi
39567  else
39568    input_to_shortpath="$new_path"
39569  fi
39570
39571  # Call helper function which possibly converts this using DOS-style short mode.
39572  # If so, the updated path is stored in $new_path.
39573  new_path="$input_to_shortpath"
39574
39575  input_path="$input_to_shortpath"
39576  # Check if we need to convert this using DOS-style short mode. If the path
39577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39578  # take no chances and rewrite it.
39579  # Note: m4 eats our [], so we need to use [ and ] instead.
39580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39581  if test "x$has_forbidden_chars" != x; then
39582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39583    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39584    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39585    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39586      # Going to short mode and back again did indeed matter. Since short mode is
39587      # case insensitive, let's make it lowercase to improve readability.
39588      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39589      # Now convert it back to Unix-stile (cygpath)
39590      input_path=`$CYGPATH -u "$shortmode_path"`
39591      new_path="$input_path"
39592    fi
39593  fi
39594
39595  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39596  if test "x$test_cygdrive_prefix" = x; then
39597    # As a simple fix, exclude /usr/bin since it's not a real path.
39598    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39599      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39600      # a path prefixed by /cygdrive for fixpath to work.
39601      new_path="$CYGWIN_ROOT_PATH$input_path"
39602    fi
39603  fi
39604
39605  # remove trailing .exe if any
39606  new_path="${new_path/%.exe/}"
39607
39608    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39609
39610  # First separate the path from the arguments. This will split at the first
39611  # space.
39612  complete="$BUILD_CC"
39613  path="${complete%% *}"
39614  tmp="$complete EOL"
39615  arguments="${tmp#* }"
39616
39617  # Input might be given as Windows format, start by converting to
39618  # unix format.
39619  new_path="$path"
39620
39621  windows_path="$new_path"
39622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39623    unix_path=`$CYGPATH -u "$windows_path"`
39624    new_path="$unix_path"
39625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39627    new_path="$unix_path"
39628  fi
39629
39630
39631  # Now try to locate executable using which
39632  new_path=`$WHICH "$new_path" 2> /dev/null`
39633
39634  if test "x$new_path" = x; then
39635    # Oops. Which didn't find the executable.
39636    # The splitting of arguments from the executable at a space might have been incorrect,
39637    # since paths with space are more likely in Windows. Give it another try with the whole
39638    # argument.
39639    path="$complete"
39640    arguments="EOL"
39641    new_path="$path"
39642
39643  windows_path="$new_path"
39644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39645    unix_path=`$CYGPATH -u "$windows_path"`
39646    new_path="$unix_path"
39647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39649    new_path="$unix_path"
39650  fi
39651
39652
39653    new_path=`$WHICH "$new_path" 2> /dev/null`
39654    # bat and cmd files are not always considered executable in MSYS causing which
39655    # to not find them
39656    if test "x$new_path" = x \
39657        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39658        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39659      new_path="$path"
39660
39661  windows_path="$new_path"
39662  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39663    unix_path=`$CYGPATH -u "$windows_path"`
39664    new_path="$unix_path"
39665  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39666    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39667    new_path="$unix_path"
39668  fi
39669
39670    fi
39671
39672    if test "x$new_path" = x; then
39673      # It's still not found. Now this is an unrecoverable error.
39674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39675$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39676      has_space=`$ECHO "$complete" | $GREP " "`
39677      if test "x$has_space" != x; then
39678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39680      fi
39681      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39682    fi
39683  fi
39684
39685  # Now new_path has a complete unix path to the binary
39686  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39687    # Keep paths in /bin as-is, but remove trailing .exe if any
39688    new_path="${new_path/%.exe/}"
39689    # Do not save /bin paths to all_fixpath_prefixes!
39690  else
39691    # Not in mixed or Windows style, start by that.
39692    new_path=`cmd //c echo $new_path`
39693
39694  input_path="$new_path"
39695  # Check if we need to convert this using DOS-style short mode. If the path
39696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39697  # take no chances and rewrite it.
39698  # Note: m4 eats our [], so we need to use [ and ] instead.
39699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39700  if test "x$has_forbidden_chars" != x; then
39701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39703  fi
39704
39705    # Output is in $new_path
39706
39707  windows_path="$new_path"
39708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39709    unix_path=`$CYGPATH -u "$windows_path"`
39710    new_path="$unix_path"
39711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39713    new_path="$unix_path"
39714  fi
39715
39716    # remove trailing .exe if any
39717    new_path="${new_path/%.exe/}"
39718
39719    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39720    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39721  fi
39722
39723    else
39724      # We're on a unix platform. Hooray! :)
39725      # First separate the path from the arguments. This will split at the first
39726      # space.
39727      complete="$BUILD_CC"
39728      path="${complete%% *}"
39729      tmp="$complete EOL"
39730      arguments="${tmp#* }"
39731
39732      # Cannot rely on the command "which" here since it doesn't always work.
39733      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39734      if test -z "$is_absolute_path"; then
39735        # Path to executable is not absolute. Find it.
39736        IFS_save="$IFS"
39737        IFS=:
39738        for p in $PATH; do
39739          if test -f "$p/$path" && test -x "$p/$path"; then
39740            new_path="$p/$path"
39741            break
39742          fi
39743        done
39744        IFS="$IFS_save"
39745      else
39746        # This is an absolute path, we can use it without further modifications.
39747        new_path="$path"
39748      fi
39749
39750      if test "x$new_path" = x; then
39751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39752$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39753        has_space=`$ECHO "$complete" | $GREP " "`
39754        if test "x$has_space" != x; then
39755          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39756$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39757        fi
39758        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39759      fi
39760    fi
39761
39762    # Now join together the path and the arguments once again
39763    if test "x$arguments" != xEOL; then
39764      new_complete="$new_path ${arguments% *}"
39765    else
39766      new_complete="$new_path"
39767    fi
39768
39769    if test "x$complete" != "x$new_complete"; then
39770      BUILD_CC="$new_complete"
39771      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39772$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39773    fi
39774  fi
39775
39776
39777
39778  # Publish this variable in the help.
39779
39780
39781  if test "x$BUILD_CXX" = x; then
39782    # The variable is not set by user, try to locate tool using the code snippet
39783    for ac_prog in cl CC g++
39784do
39785  # Extract the first word of "$ac_prog", so it can be a program name with args.
39786set dummy $ac_prog; ac_word=$2
39787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39788$as_echo_n "checking for $ac_word... " >&6; }
39789if ${ac_cv_path_BUILD_CXX+:} false; then :
39790  $as_echo_n "(cached) " >&6
39791else
39792  case $BUILD_CXX in
39793  [\\/]* | ?:[\\/]*)
39794  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39795  ;;
39796  *)
39797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39798for as_dir in $PATH
39799do
39800  IFS=$as_save_IFS
39801  test -z "$as_dir" && as_dir=.
39802    for ac_exec_ext in '' $ac_executable_extensions; do
39803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39804    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39806    break 2
39807  fi
39808done
39809  done
39810IFS=$as_save_IFS
39811
39812  ;;
39813esac
39814fi
39815BUILD_CXX=$ac_cv_path_BUILD_CXX
39816if test -n "$BUILD_CXX"; then
39817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39818$as_echo "$BUILD_CXX" >&6; }
39819else
39820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39821$as_echo "no" >&6; }
39822fi
39823
39824
39825  test -n "$BUILD_CXX" && break
39826done
39827
39828  else
39829    # The variable is set, but is it from the command line or the environment?
39830
39831    # Try to remove the string !BUILD_CXX! from our list.
39832    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39833    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39834      # If it failed, the variable was not from the command line. Ignore it,
39835      # but warn the user (except for BASH, which is always set by the calling BASH).
39836      if test "xBUILD_CXX" != xBASH; then
39837        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39838$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39839      fi
39840      # Try to locate tool using the code snippet
39841      for ac_prog in cl CC g++
39842do
39843  # Extract the first word of "$ac_prog", so it can be a program name with args.
39844set dummy $ac_prog; ac_word=$2
39845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39846$as_echo_n "checking for $ac_word... " >&6; }
39847if ${ac_cv_path_BUILD_CXX+:} false; then :
39848  $as_echo_n "(cached) " >&6
39849else
39850  case $BUILD_CXX in
39851  [\\/]* | ?:[\\/]*)
39852  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39853  ;;
39854  *)
39855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39856for as_dir in $PATH
39857do
39858  IFS=$as_save_IFS
39859  test -z "$as_dir" && as_dir=.
39860    for ac_exec_ext in '' $ac_executable_extensions; do
39861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39862    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39864    break 2
39865  fi
39866done
39867  done
39868IFS=$as_save_IFS
39869
39870  ;;
39871esac
39872fi
39873BUILD_CXX=$ac_cv_path_BUILD_CXX
39874if test -n "$BUILD_CXX"; then
39875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39876$as_echo "$BUILD_CXX" >&6; }
39877else
39878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39879$as_echo "no" >&6; }
39880fi
39881
39882
39883  test -n "$BUILD_CXX" && break
39884done
39885
39886    else
39887      # If it succeeded, then it was overridden by the user. We will use it
39888      # for the tool.
39889
39890      # First remove it from the list of overridden variables, so we can test
39891      # for unknown variables in the end.
39892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39893
39894      # Check if the provided tool contains a complete path.
39895      tool_specified="$BUILD_CXX"
39896      tool_basename="${tool_specified##*/}"
39897      if test "x$tool_basename" = "x$tool_specified"; then
39898        # A command without a complete path is provided, search $PATH.
39899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39900$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39901        # Extract the first word of "$tool_basename", so it can be a program name with args.
39902set dummy $tool_basename; ac_word=$2
39903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39904$as_echo_n "checking for $ac_word... " >&6; }
39905if ${ac_cv_path_BUILD_CXX+:} false; then :
39906  $as_echo_n "(cached) " >&6
39907else
39908  case $BUILD_CXX in
39909  [\\/]* | ?:[\\/]*)
39910  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39911  ;;
39912  *)
39913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39914for as_dir in $PATH
39915do
39916  IFS=$as_save_IFS
39917  test -z "$as_dir" && as_dir=.
39918    for ac_exec_ext in '' $ac_executable_extensions; do
39919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39920    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39922    break 2
39923  fi
39924done
39925  done
39926IFS=$as_save_IFS
39927
39928  ;;
39929esac
39930fi
39931BUILD_CXX=$ac_cv_path_BUILD_CXX
39932if test -n "$BUILD_CXX"; then
39933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39934$as_echo "$BUILD_CXX" >&6; }
39935else
39936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39937$as_echo "no" >&6; }
39938fi
39939
39940
39941        if test "x$BUILD_CXX" = x; then
39942          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39943        fi
39944      else
39945        # Otherwise we believe it is a complete path. Use it as it is.
39946        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39947$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39949$as_echo_n "checking for BUILD_CXX... " >&6; }
39950        if test ! -x "$tool_specified"; then
39951          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39952$as_echo "not found" >&6; }
39953          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39954        fi
39955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39956$as_echo "$tool_specified" >&6; }
39957      fi
39958    fi
39959  fi
39960
39961
39962
39963  # Only process if variable expands to non-empty
39964
39965  if test "x$BUILD_CXX" != x; then
39966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39967
39968  # First separate the path from the arguments. This will split at the first
39969  # space.
39970  complete="$BUILD_CXX"
39971  path="${complete%% *}"
39972  tmp="$complete EOL"
39973  arguments="${tmp#* }"
39974
39975  # Input might be given as Windows format, start by converting to
39976  # unix format.
39977  new_path=`$CYGPATH -u "$path"`
39978
39979  # Now try to locate executable using which
39980  new_path=`$WHICH "$new_path" 2> /dev/null`
39981  # bat and cmd files are not always considered executable in cygwin causing which
39982  # to not find them
39983  if test "x$new_path" = x \
39984      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39985      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39986    new_path=`$CYGPATH -u "$path"`
39987  fi
39988  if test "x$new_path" = x; then
39989    # Oops. Which didn't find the executable.
39990    # The splitting of arguments from the executable at a space might have been incorrect,
39991    # since paths with space are more likely in Windows. Give it another try with the whole
39992    # argument.
39993    path="$complete"
39994    arguments="EOL"
39995    new_path=`$CYGPATH -u "$path"`
39996    new_path=`$WHICH "$new_path" 2> /dev/null`
39997    # bat and cmd files are not always considered executable in cygwin causing which
39998    # to not find them
39999    if test "x$new_path" = x \
40000        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40001        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40002      new_path=`$CYGPATH -u "$path"`
40003    fi
40004    if test "x$new_path" = x; then
40005      # It's still not found. Now this is an unrecoverable error.
40006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40007$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40008      has_space=`$ECHO "$complete" | $GREP " "`
40009      if test "x$has_space" != x; then
40010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40012      fi
40013      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40014    fi
40015  fi
40016
40017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40020  # "foo.exe" is OK but "foo" is an error.
40021  #
40022  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40023  # It is also a way to make sure we got the proper file name for the real test later on.
40024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40025  if test "x$test_shortpath" = x; then
40026    # Short path failed, file does not exist as specified.
40027    # Try adding .exe or .cmd
40028    if test -f "${new_path}.exe"; then
40029      input_to_shortpath="${new_path}.exe"
40030    elif test -f "${new_path}.cmd"; then
40031      input_to_shortpath="${new_path}.cmd"
40032    else
40033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
40034$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
40035      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40036$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40037      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40038    fi
40039  else
40040    input_to_shortpath="$new_path"
40041  fi
40042
40043  # Call helper function which possibly converts this using DOS-style short mode.
40044  # If so, the updated path is stored in $new_path.
40045  new_path="$input_to_shortpath"
40046
40047  input_path="$input_to_shortpath"
40048  # Check if we need to convert this using DOS-style short mode. If the path
40049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40050  # take no chances and rewrite it.
40051  # Note: m4 eats our [], so we need to use [ and ] instead.
40052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40053  if test "x$has_forbidden_chars" != x; then
40054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40055    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40056    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40057    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40058      # Going to short mode and back again did indeed matter. Since short mode is
40059      # case insensitive, let's make it lowercase to improve readability.
40060      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40061      # Now convert it back to Unix-stile (cygpath)
40062      input_path=`$CYGPATH -u "$shortmode_path"`
40063      new_path="$input_path"
40064    fi
40065  fi
40066
40067  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40068  if test "x$test_cygdrive_prefix" = x; then
40069    # As a simple fix, exclude /usr/bin since it's not a real path.
40070    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40071      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40072      # a path prefixed by /cygdrive for fixpath to work.
40073      new_path="$CYGWIN_ROOT_PATH$input_path"
40074    fi
40075  fi
40076
40077  # remove trailing .exe if any
40078  new_path="${new_path/%.exe/}"
40079
40080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40081
40082  # First separate the path from the arguments. This will split at the first
40083  # space.
40084  complete="$BUILD_CXX"
40085  path="${complete%% *}"
40086  tmp="$complete EOL"
40087  arguments="${tmp#* }"
40088
40089  # Input might be given as Windows format, start by converting to
40090  # unix format.
40091  new_path="$path"
40092
40093  windows_path="$new_path"
40094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40095    unix_path=`$CYGPATH -u "$windows_path"`
40096    new_path="$unix_path"
40097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40099    new_path="$unix_path"
40100  fi
40101
40102
40103  # Now try to locate executable using which
40104  new_path=`$WHICH "$new_path" 2> /dev/null`
40105
40106  if test "x$new_path" = x; then
40107    # Oops. Which didn't find the executable.
40108    # The splitting of arguments from the executable at a space might have been incorrect,
40109    # since paths with space are more likely in Windows. Give it another try with the whole
40110    # argument.
40111    path="$complete"
40112    arguments="EOL"
40113    new_path="$path"
40114
40115  windows_path="$new_path"
40116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40117    unix_path=`$CYGPATH -u "$windows_path"`
40118    new_path="$unix_path"
40119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40121    new_path="$unix_path"
40122  fi
40123
40124
40125    new_path=`$WHICH "$new_path" 2> /dev/null`
40126    # bat and cmd files are not always considered executable in MSYS causing which
40127    # to not find them
40128    if test "x$new_path" = x \
40129        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40130        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40131      new_path="$path"
40132
40133  windows_path="$new_path"
40134  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40135    unix_path=`$CYGPATH -u "$windows_path"`
40136    new_path="$unix_path"
40137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40138    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40139    new_path="$unix_path"
40140  fi
40141
40142    fi
40143
40144    if test "x$new_path" = x; then
40145      # It's still not found. Now this is an unrecoverable error.
40146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40147$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40148      has_space=`$ECHO "$complete" | $GREP " "`
40149      if test "x$has_space" != x; then
40150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40152      fi
40153      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40154    fi
40155  fi
40156
40157  # Now new_path has a complete unix path to the binary
40158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40159    # Keep paths in /bin as-is, but remove trailing .exe if any
40160    new_path="${new_path/%.exe/}"
40161    # Do not save /bin paths to all_fixpath_prefixes!
40162  else
40163    # Not in mixed or Windows style, start by that.
40164    new_path=`cmd //c echo $new_path`
40165
40166  input_path="$new_path"
40167  # Check if we need to convert this using DOS-style short mode. If the path
40168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40169  # take no chances and rewrite it.
40170  # Note: m4 eats our [], so we need to use [ and ] instead.
40171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40172  if test "x$has_forbidden_chars" != x; then
40173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40175  fi
40176
40177    # Output is in $new_path
40178
40179  windows_path="$new_path"
40180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40181    unix_path=`$CYGPATH -u "$windows_path"`
40182    new_path="$unix_path"
40183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40185    new_path="$unix_path"
40186  fi
40187
40188    # remove trailing .exe if any
40189    new_path="${new_path/%.exe/}"
40190
40191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40193  fi
40194
40195    else
40196      # We're on a unix platform. Hooray! :)
40197      # First separate the path from the arguments. This will split at the first
40198      # space.
40199      complete="$BUILD_CXX"
40200      path="${complete%% *}"
40201      tmp="$complete EOL"
40202      arguments="${tmp#* }"
40203
40204      # Cannot rely on the command "which" here since it doesn't always work.
40205      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40206      if test -z "$is_absolute_path"; then
40207        # Path to executable is not absolute. Find it.
40208        IFS_save="$IFS"
40209        IFS=:
40210        for p in $PATH; do
40211          if test -f "$p/$path" && test -x "$p/$path"; then
40212            new_path="$p/$path"
40213            break
40214          fi
40215        done
40216        IFS="$IFS_save"
40217      else
40218        # This is an absolute path, we can use it without further modifications.
40219        new_path="$path"
40220      fi
40221
40222      if test "x$new_path" = x; then
40223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
40224$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
40225        has_space=`$ECHO "$complete" | $GREP " "`
40226        if test "x$has_space" != x; then
40227          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40229        fi
40230        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
40231      fi
40232    fi
40233
40234    # Now join together the path and the arguments once again
40235    if test "x$arguments" != xEOL; then
40236      new_complete="$new_path ${arguments% *}"
40237    else
40238      new_complete="$new_path"
40239    fi
40240
40241    if test "x$complete" != "x$new_complete"; then
40242      BUILD_CXX="$new_complete"
40243      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
40244$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
40245    fi
40246  fi
40247
40248
40249
40250  # Publish this variable in the help.
40251
40252
40253  if test "x$BUILD_LD" = x; then
40254    # The variable is not set by user, try to locate tool using the code snippet
40255    for ac_prog in ld
40256do
40257  # Extract the first word of "$ac_prog", so it can be a program name with args.
40258set dummy $ac_prog; ac_word=$2
40259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40260$as_echo_n "checking for $ac_word... " >&6; }
40261if ${ac_cv_path_BUILD_LD+:} false; then :
40262  $as_echo_n "(cached) " >&6
40263else
40264  case $BUILD_LD in
40265  [\\/]* | ?:[\\/]*)
40266  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40267  ;;
40268  *)
40269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40270for as_dir in $PATH
40271do
40272  IFS=$as_save_IFS
40273  test -z "$as_dir" && as_dir=.
40274    for ac_exec_ext in '' $ac_executable_extensions; do
40275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40276    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40278    break 2
40279  fi
40280done
40281  done
40282IFS=$as_save_IFS
40283
40284  ;;
40285esac
40286fi
40287BUILD_LD=$ac_cv_path_BUILD_LD
40288if test -n "$BUILD_LD"; then
40289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40290$as_echo "$BUILD_LD" >&6; }
40291else
40292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40293$as_echo "no" >&6; }
40294fi
40295
40296
40297  test -n "$BUILD_LD" && break
40298done
40299
40300  else
40301    # The variable is set, but is it from the command line or the environment?
40302
40303    # Try to remove the string !BUILD_LD! from our list.
40304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
40305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40306      # If it failed, the variable was not from the command line. Ignore it,
40307      # but warn the user (except for BASH, which is always set by the calling BASH).
40308      if test "xBUILD_LD" != xBASH; then
40309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
40310$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
40311      fi
40312      # Try to locate tool using the code snippet
40313      for ac_prog in ld
40314do
40315  # Extract the first word of "$ac_prog", so it can be a program name with args.
40316set dummy $ac_prog; ac_word=$2
40317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40318$as_echo_n "checking for $ac_word... " >&6; }
40319if ${ac_cv_path_BUILD_LD+:} false; then :
40320  $as_echo_n "(cached) " >&6
40321else
40322  case $BUILD_LD in
40323  [\\/]* | ?:[\\/]*)
40324  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40325  ;;
40326  *)
40327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40328for as_dir in $PATH
40329do
40330  IFS=$as_save_IFS
40331  test -z "$as_dir" && as_dir=.
40332    for ac_exec_ext in '' $ac_executable_extensions; do
40333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40334    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40336    break 2
40337  fi
40338done
40339  done
40340IFS=$as_save_IFS
40341
40342  ;;
40343esac
40344fi
40345BUILD_LD=$ac_cv_path_BUILD_LD
40346if test -n "$BUILD_LD"; then
40347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40348$as_echo "$BUILD_LD" >&6; }
40349else
40350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40351$as_echo "no" >&6; }
40352fi
40353
40354
40355  test -n "$BUILD_LD" && break
40356done
40357
40358    else
40359      # If it succeeded, then it was overridden by the user. We will use it
40360      # for the tool.
40361
40362      # First remove it from the list of overridden variables, so we can test
40363      # for unknown variables in the end.
40364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40365
40366      # Check if the provided tool contains a complete path.
40367      tool_specified="$BUILD_LD"
40368      tool_basename="${tool_specified##*/}"
40369      if test "x$tool_basename" = "x$tool_specified"; then
40370        # A command without a complete path is provided, search $PATH.
40371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40372$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40373        # Extract the first word of "$tool_basename", so it can be a program name with args.
40374set dummy $tool_basename; ac_word=$2
40375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40376$as_echo_n "checking for $ac_word... " >&6; }
40377if ${ac_cv_path_BUILD_LD+:} false; then :
40378  $as_echo_n "(cached) " >&6
40379else
40380  case $BUILD_LD in
40381  [\\/]* | ?:[\\/]*)
40382  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40383  ;;
40384  *)
40385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40386for as_dir in $PATH
40387do
40388  IFS=$as_save_IFS
40389  test -z "$as_dir" && as_dir=.
40390    for ac_exec_ext in '' $ac_executable_extensions; do
40391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40392    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40394    break 2
40395  fi
40396done
40397  done
40398IFS=$as_save_IFS
40399
40400  ;;
40401esac
40402fi
40403BUILD_LD=$ac_cv_path_BUILD_LD
40404if test -n "$BUILD_LD"; then
40405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40406$as_echo "$BUILD_LD" >&6; }
40407else
40408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40409$as_echo "no" >&6; }
40410fi
40411
40412
40413        if test "x$BUILD_LD" = x; then
40414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40415        fi
40416      else
40417        # Otherwise we believe it is a complete path. Use it as it is.
40418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40419$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40421$as_echo_n "checking for BUILD_LD... " >&6; }
40422        if test ! -x "$tool_specified"; then
40423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40424$as_echo "not found" >&6; }
40425          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40426        fi
40427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40428$as_echo "$tool_specified" >&6; }
40429      fi
40430    fi
40431  fi
40432
40433
40434
40435  # Only process if variable expands to non-empty
40436
40437  if test "x$BUILD_LD" != x; then
40438    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40439
40440  # First separate the path from the arguments. This will split at the first
40441  # space.
40442  complete="$BUILD_LD"
40443  path="${complete%% *}"
40444  tmp="$complete EOL"
40445  arguments="${tmp#* }"
40446
40447  # Input might be given as Windows format, start by converting to
40448  # unix format.
40449  new_path=`$CYGPATH -u "$path"`
40450
40451  # Now try to locate executable using which
40452  new_path=`$WHICH "$new_path" 2> /dev/null`
40453  # bat and cmd files are not always considered executable in cygwin causing which
40454  # to not find them
40455  if test "x$new_path" = x \
40456      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40457      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40458    new_path=`$CYGPATH -u "$path"`
40459  fi
40460  if test "x$new_path" = x; then
40461    # Oops. Which didn't find the executable.
40462    # The splitting of arguments from the executable at a space might have been incorrect,
40463    # since paths with space are more likely in Windows. Give it another try with the whole
40464    # argument.
40465    path="$complete"
40466    arguments="EOL"
40467    new_path=`$CYGPATH -u "$path"`
40468    new_path=`$WHICH "$new_path" 2> /dev/null`
40469    # bat and cmd files are not always considered executable in cygwin causing which
40470    # to not find them
40471    if test "x$new_path" = x \
40472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40474      new_path=`$CYGPATH -u "$path"`
40475    fi
40476    if test "x$new_path" = x; then
40477      # It's still not found. Now this is an unrecoverable error.
40478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40479$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40480      has_space=`$ECHO "$complete" | $GREP " "`
40481      if test "x$has_space" != x; then
40482        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40483$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40484      fi
40485      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40486    fi
40487  fi
40488
40489  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40490  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40491  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40492  # "foo.exe" is OK but "foo" is an error.
40493  #
40494  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40495  # It is also a way to make sure we got the proper file name for the real test later on.
40496  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40497  if test "x$test_shortpath" = x; then
40498    # Short path failed, file does not exist as specified.
40499    # Try adding .exe or .cmd
40500    if test -f "${new_path}.exe"; then
40501      input_to_shortpath="${new_path}.exe"
40502    elif test -f "${new_path}.cmd"; then
40503      input_to_shortpath="${new_path}.cmd"
40504    else
40505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40506$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40507      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40508$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40509      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40510    fi
40511  else
40512    input_to_shortpath="$new_path"
40513  fi
40514
40515  # Call helper function which possibly converts this using DOS-style short mode.
40516  # If so, the updated path is stored in $new_path.
40517  new_path="$input_to_shortpath"
40518
40519  input_path="$input_to_shortpath"
40520  # Check if we need to convert this using DOS-style short mode. If the path
40521  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40522  # take no chances and rewrite it.
40523  # Note: m4 eats our [], so we need to use [ and ] instead.
40524  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40525  if test "x$has_forbidden_chars" != x; then
40526    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40527    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40528    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40529    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40530      # Going to short mode and back again did indeed matter. Since short mode is
40531      # case insensitive, let's make it lowercase to improve readability.
40532      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40533      # Now convert it back to Unix-stile (cygpath)
40534      input_path=`$CYGPATH -u "$shortmode_path"`
40535      new_path="$input_path"
40536    fi
40537  fi
40538
40539  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40540  if test "x$test_cygdrive_prefix" = x; then
40541    # As a simple fix, exclude /usr/bin since it's not a real path.
40542    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40543      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40544      # a path prefixed by /cygdrive for fixpath to work.
40545      new_path="$CYGWIN_ROOT_PATH$input_path"
40546    fi
40547  fi
40548
40549  # remove trailing .exe if any
40550  new_path="${new_path/%.exe/}"
40551
40552    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40553
40554  # First separate the path from the arguments. This will split at the first
40555  # space.
40556  complete="$BUILD_LD"
40557  path="${complete%% *}"
40558  tmp="$complete EOL"
40559  arguments="${tmp#* }"
40560
40561  # Input might be given as Windows format, start by converting to
40562  # unix format.
40563  new_path="$path"
40564
40565  windows_path="$new_path"
40566  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40567    unix_path=`$CYGPATH -u "$windows_path"`
40568    new_path="$unix_path"
40569  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40570    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40571    new_path="$unix_path"
40572  fi
40573
40574
40575  # Now try to locate executable using which
40576  new_path=`$WHICH "$new_path" 2> /dev/null`
40577
40578  if test "x$new_path" = x; then
40579    # Oops. Which didn't find the executable.
40580    # The splitting of arguments from the executable at a space might have been incorrect,
40581    # since paths with space are more likely in Windows. Give it another try with the whole
40582    # argument.
40583    path="$complete"
40584    arguments="EOL"
40585    new_path="$path"
40586
40587  windows_path="$new_path"
40588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40589    unix_path=`$CYGPATH -u "$windows_path"`
40590    new_path="$unix_path"
40591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40593    new_path="$unix_path"
40594  fi
40595
40596
40597    new_path=`$WHICH "$new_path" 2> /dev/null`
40598    # bat and cmd files are not always considered executable in MSYS causing which
40599    # to not find them
40600    if test "x$new_path" = x \
40601        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40602        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40603      new_path="$path"
40604
40605  windows_path="$new_path"
40606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40607    unix_path=`$CYGPATH -u "$windows_path"`
40608    new_path="$unix_path"
40609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40611    new_path="$unix_path"
40612  fi
40613
40614    fi
40615
40616    if test "x$new_path" = x; then
40617      # It's still not found. Now this is an unrecoverable error.
40618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40619$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40620      has_space=`$ECHO "$complete" | $GREP " "`
40621      if test "x$has_space" != x; then
40622        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40623$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40624      fi
40625      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40626    fi
40627  fi
40628
40629  # Now new_path has a complete unix path to the binary
40630  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40631    # Keep paths in /bin as-is, but remove trailing .exe if any
40632    new_path="${new_path/%.exe/}"
40633    # Do not save /bin paths to all_fixpath_prefixes!
40634  else
40635    # Not in mixed or Windows style, start by that.
40636    new_path=`cmd //c echo $new_path`
40637
40638  input_path="$new_path"
40639  # Check if we need to convert this using DOS-style short mode. If the path
40640  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40641  # take no chances and rewrite it.
40642  # Note: m4 eats our [], so we need to use [ and ] instead.
40643  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40644  if test "x$has_forbidden_chars" != x; then
40645    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40646    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40647  fi
40648
40649    # Output is in $new_path
40650
40651  windows_path="$new_path"
40652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40653    unix_path=`$CYGPATH -u "$windows_path"`
40654    new_path="$unix_path"
40655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40657    new_path="$unix_path"
40658  fi
40659
40660    # remove trailing .exe if any
40661    new_path="${new_path/%.exe/}"
40662
40663    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40664    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40665  fi
40666
40667    else
40668      # We're on a unix platform. Hooray! :)
40669      # First separate the path from the arguments. This will split at the first
40670      # space.
40671      complete="$BUILD_LD"
40672      path="${complete%% *}"
40673      tmp="$complete EOL"
40674      arguments="${tmp#* }"
40675
40676      # Cannot rely on the command "which" here since it doesn't always work.
40677      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40678      if test -z "$is_absolute_path"; then
40679        # Path to executable is not absolute. Find it.
40680        IFS_save="$IFS"
40681        IFS=:
40682        for p in $PATH; do
40683          if test -f "$p/$path" && test -x "$p/$path"; then
40684            new_path="$p/$path"
40685            break
40686          fi
40687        done
40688        IFS="$IFS_save"
40689      else
40690        # This is an absolute path, we can use it without further modifications.
40691        new_path="$path"
40692      fi
40693
40694      if test "x$new_path" = x; then
40695        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40696$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40697        has_space=`$ECHO "$complete" | $GREP " "`
40698        if test "x$has_space" != x; then
40699          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40700$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40701        fi
40702        as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40703      fi
40704    fi
40705
40706    # Now join together the path and the arguments once again
40707    if test "x$arguments" != xEOL; then
40708      new_complete="$new_path ${arguments% *}"
40709    else
40710      new_complete="$new_path"
40711    fi
40712
40713    if test "x$complete" != "x$new_complete"; then
40714      BUILD_LD="$new_complete"
40715      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40716$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40717    fi
40718  fi
40719
40720  else
40721    # If we are not cross compiling, use the normal target compilers for
40722    # building the build platform executables.
40723    BUILD_CC="$CC"
40724    BUILD_CXX="$CXX"
40725    BUILD_LD="$LD"
40726  fi
40727
40728
40729
40730
40731
40732
40733  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40734    # For hotspot, we need these in Windows mixed path,
40735    # so rewrite them all. Need added .exe suffix.
40736    HOTSPOT_CXX="$CXX.exe"
40737    HOTSPOT_LD="$LD.exe"
40738    HOTSPOT_MT="$MT.exe"
40739    HOTSPOT_RC="$RC.exe"
40740
40741  unix_path="$HOTSPOT_CXX"
40742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40743    windows_path=`$CYGPATH -m "$unix_path"`
40744    HOTSPOT_CXX="$windows_path"
40745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40746    windows_path=`cmd //c echo $unix_path`
40747    HOTSPOT_CXX="$windows_path"
40748  fi
40749
40750
40751  unix_path="$HOTSPOT_LD"
40752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40753    windows_path=`$CYGPATH -m "$unix_path"`
40754    HOTSPOT_LD="$windows_path"
40755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40756    windows_path=`cmd //c echo $unix_path`
40757    HOTSPOT_LD="$windows_path"
40758  fi
40759
40760
40761  unix_path="$HOTSPOT_MT"
40762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40763    windows_path=`$CYGPATH -m "$unix_path"`
40764    HOTSPOT_MT="$windows_path"
40765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40766    windows_path=`cmd //c echo $unix_path`
40767    HOTSPOT_MT="$windows_path"
40768  fi
40769
40770
40771  unix_path="$HOTSPOT_RC"
40772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40773    windows_path=`$CYGPATH -m "$unix_path"`
40774    HOTSPOT_RC="$windows_path"
40775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40776    windows_path=`cmd //c echo $unix_path`
40777    HOTSPOT_RC="$windows_path"
40778  fi
40779
40780
40781
40782  else
40783    HOTSPOT_CXX="$CXX"
40784    HOTSPOT_LD="$LD"
40785  fi
40786
40787
40788
40789  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40790    USE_CLANG=true
40791  fi
40792
40793
40794  # LDEXE is the linker to use, when creating executables. Not really used.
40795  # FIXME: These should just be removed!
40796  LDEXE="$LD"
40797  LDEXECXX="$LDCXX"
40798
40799
40800
40801
40802
40803
40804  # The package path is used only on macosx?
40805  # FIXME: clean this up, and/or move it elsewhere.
40806  PACKAGE_PATH=/opt/local
40807
40808
40809  # Check for extra potential brokenness.
40810  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40811    # On Windows, double-check that we got the right compiler.
40812    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40813    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40814    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40815      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
40816        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
40817      fi
40818    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40819      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40820        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40821      fi
40822    fi
40823  fi
40824
40825  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40826    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40827    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40828    # This is later checked when setting flags.
40829
40830    # "-Og" suppported for GCC 4.8 and later
40831    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40832
40833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40834$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40835  supports=yes
40836
40837  saved_cflags="$CFLAGS"
40838  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40839  ac_ext=c
40840ac_cpp='$CPP $CPPFLAGS'
40841ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40842ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40843ac_compiler_gnu=$ac_cv_c_compiler_gnu
40844
40845  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40846/* end confdefs.h.  */
40847int i;
40848_ACEOF
40849if ac_fn_c_try_compile "$LINENO"; then :
40850
40851else
40852  supports=no
40853fi
40854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40855  ac_ext=cpp
40856ac_cpp='$CXXCPP $CPPFLAGS'
40857ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40858ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40859ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40860
40861  CFLAGS="$saved_cflags"
40862
40863  saved_cxxflags="$CXXFLAGS"
40864  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40865  ac_ext=cpp
40866ac_cpp='$CXXCPP $CPPFLAGS'
40867ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40868ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40869ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40870
40871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40872/* end confdefs.h.  */
40873int i;
40874_ACEOF
40875if ac_fn_cxx_try_compile "$LINENO"; then :
40876
40877else
40878  supports=no
40879fi
40880rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40881  ac_ext=cpp
40882ac_cpp='$CXXCPP $CPPFLAGS'
40883ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40884ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40885ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40886
40887  CXXFLAGS="$saved_cxxflags"
40888
40889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40890$as_echo "$supports" >&6; }
40891  if test "x$supports" = "xyes" ; then
40892    HAS_CFLAG_OPTIMIZE_DEBUG=true
40893  else
40894    HAS_CFLAG_OPTIMIZE_DEBUG=false
40895  fi
40896
40897
40898    # "-z relro" supported in GNU binutils 2.17 and later
40899    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40900
40901  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40902$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40903  supports=yes
40904
40905  saved_ldflags="$LDFLAGS"
40906  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40907  ac_ext=c
40908ac_cpp='$CPP $CPPFLAGS'
40909ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40910ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40911ac_compiler_gnu=$ac_cv_c_compiler_gnu
40912
40913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40914/* end confdefs.h.  */
40915
40916int
40917main ()
40918{
40919
40920  ;
40921  return 0;
40922}
40923_ACEOF
40924if ac_fn_c_try_link "$LINENO"; then :
40925
40926else
40927  supports=no
40928fi
40929rm -f core conftest.err conftest.$ac_objext \
40930    conftest$ac_exeext conftest.$ac_ext
40931  ac_ext=cpp
40932ac_cpp='$CXXCPP $CPPFLAGS'
40933ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40934ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40935ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40936
40937  LDFLAGS="$saved_ldflags"
40938
40939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40940$as_echo "$supports" >&6; }
40941  if test "x$supports" = "xyes" ; then
40942    HAS_LINKER_RELRO=true
40943  else
40944    HAS_LINKER_RELRO=false
40945  fi
40946
40947
40948    # "-z now" supported in GNU binutils 2.11 and later
40949    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40950
40951  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40952$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40953  supports=yes
40954
40955  saved_ldflags="$LDFLAGS"
40956  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40957  ac_ext=c
40958ac_cpp='$CPP $CPPFLAGS'
40959ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40960ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40961ac_compiler_gnu=$ac_cv_c_compiler_gnu
40962
40963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40964/* end confdefs.h.  */
40965
40966int
40967main ()
40968{
40969
40970  ;
40971  return 0;
40972}
40973_ACEOF
40974if ac_fn_c_try_link "$LINENO"; then :
40975
40976else
40977  supports=no
40978fi
40979rm -f core conftest.err conftest.$ac_objext \
40980    conftest$ac_exeext conftest.$ac_ext
40981  ac_ext=cpp
40982ac_cpp='$CXXCPP $CPPFLAGS'
40983ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40984ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40985ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40986
40987  LDFLAGS="$saved_ldflags"
40988
40989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40990$as_echo "$supports" >&6; }
40991  if test "x$supports" = "xyes" ; then
40992    HAS_LINKER_NOW=true
40993  else
40994    HAS_LINKER_NOW=false
40995  fi
40996
40997  fi
40998
40999  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
41000  # in executable.'
41001  USING_BROKEN_SUSE_LD=no
41002  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
41003    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
41004$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
41005    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
41006    $ECHO "int main() { }" > main.c
41007    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
41008      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41009$as_echo "no" >&6; }
41010      USING_BROKEN_SUSE_LD=no
41011    else
41012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41013$as_echo "yes" >&6; }
41014      USING_BROKEN_SUSE_LD=yes
41015    fi
41016    rm -rf version-script.map main.c a.out
41017  fi
41018
41019
41020
41021# Setup the JTReg Regression Test Harness.
41022
41023
41024# Check whether --with-jtreg was given.
41025if test "${with_jtreg+set}" = set; then :
41026  withval=$with_jtreg;
41027else
41028  with_jtreg=no
41029fi
41030
41031
41032  if test "x$with_jtreg" = xno; then
41033    # jtreg disabled
41034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41035$as_echo_n "checking for jtreg... " >&6; }
41036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41037$as_echo "no" >&6; }
41038  else
41039    if test "x$with_jtreg" != xyes; then
41040      # with path specified.
41041      JT_HOME="$with_jtreg"
41042    fi
41043
41044    if test "x$JT_HOME" != x; then
41045      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
41046$as_echo_n "checking for jtreg... " >&6; }
41047
41048      # use JT_HOME enviroment var.
41049
41050  # Only process if variable expands to non-empty
41051
41052  if test "x$JT_HOME" != x; then
41053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41054
41055  # Input might be given as Windows format, start by converting to
41056  # unix format.
41057  path="$JT_HOME"
41058  new_path=`$CYGPATH -u "$path"`
41059
41060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41063  # "foo.exe" is OK but "foo" is an error.
41064  #
41065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
41066  # It is also a way to make sure we got the proper file name for the real test later on.
41067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41068  if test "x$test_shortpath" = x; then
41069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41070$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41071    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
41072  fi
41073
41074  # Call helper function which possibly converts this using DOS-style short mode.
41075  # If so, the updated path is stored in $new_path.
41076
41077  input_path="$new_path"
41078  # Check if we need to convert this using DOS-style short mode. If the path
41079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41080  # take no chances and rewrite it.
41081  # Note: m4 eats our [], so we need to use [ and ] instead.
41082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41083  if test "x$has_forbidden_chars" != x; then
41084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41088      # Going to short mode and back again did indeed matter. Since short mode is
41089      # case insensitive, let's make it lowercase to improve readability.
41090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41091      # Now convert it back to Unix-stile (cygpath)
41092      input_path=`$CYGPATH -u "$shortmode_path"`
41093      new_path="$input_path"
41094    fi
41095  fi
41096
41097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41098  if test "x$test_cygdrive_prefix" = x; then
41099    # As a simple fix, exclude /usr/bin since it's not a real path.
41100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
41101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41102      # a path prefixed by /cygdrive for fixpath to work.
41103      new_path="$CYGWIN_ROOT_PATH$input_path"
41104    fi
41105  fi
41106
41107
41108  if test "x$path" != "x$new_path"; then
41109    JT_HOME="$new_path"
41110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41111$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41112  fi
41113
41114    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41115
41116  path="$JT_HOME"
41117  has_colon=`$ECHO $path | $GREP ^.:`
41118  new_path="$path"
41119  if test "x$has_colon" = x; then
41120    # Not in mixed or Windows style, start by that.
41121    new_path=`cmd //c echo $path`
41122  fi
41123
41124
41125  input_path="$new_path"
41126  # Check if we need to convert this using DOS-style short mode. If the path
41127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41128  # take no chances and rewrite it.
41129  # Note: m4 eats our [], so we need to use [ and ] instead.
41130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41131  if test "x$has_forbidden_chars" != x; then
41132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41134  fi
41135
41136
41137  windows_path="$new_path"
41138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41139    unix_path=`$CYGPATH -u "$windows_path"`
41140    new_path="$unix_path"
41141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41143    new_path="$unix_path"
41144  fi
41145
41146  if test "x$path" != "x$new_path"; then
41147    JT_HOME="$new_path"
41148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
41149$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
41150  fi
41151
41152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
41153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41154
41155    else
41156      # We're on a unix platform. Hooray! :)
41157      path="$JT_HOME"
41158      has_space=`$ECHO "$path" | $GREP " "`
41159      if test "x$has_space" != x; then
41160        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
41161$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
41162        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
41163      fi
41164
41165      # Use eval to expand a potential ~
41166      eval path="$path"
41167      if test ! -f "$path" && test ! -d "$path"; then
41168        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
41169      fi
41170
41171      JT_HOME="`cd "$path"; $THEPWDCMD -L`"
41172    fi
41173  fi
41174
41175
41176      # jtreg win32 script works for everybody
41177      JTREGEXE="$JT_HOME/bin/jtreg"
41178
41179      if test ! -f "$JTREGEXE"; then
41180        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
41181      fi
41182
41183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41184$as_echo "$JTREGEXE" >&6; }
41185    else
41186      # try to find jtreg on path
41187
41188
41189
41190  # Publish this variable in the help.
41191
41192
41193  if test "x$JTREGEXE" = x; then
41194    # The variable is not set by user, try to locate tool using the code snippet
41195    for ac_prog in jtreg
41196do
41197  # Extract the first word of "$ac_prog", so it can be a program name with args.
41198set dummy $ac_prog; ac_word=$2
41199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41200$as_echo_n "checking for $ac_word... " >&6; }
41201if ${ac_cv_path_JTREGEXE+:} false; then :
41202  $as_echo_n "(cached) " >&6
41203else
41204  case $JTREGEXE in
41205  [\\/]* | ?:[\\/]*)
41206  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41207  ;;
41208  *)
41209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41210for as_dir in $PATH
41211do
41212  IFS=$as_save_IFS
41213  test -z "$as_dir" && as_dir=.
41214    for ac_exec_ext in '' $ac_executable_extensions; do
41215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41216    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41218    break 2
41219  fi
41220done
41221  done
41222IFS=$as_save_IFS
41223
41224  ;;
41225esac
41226fi
41227JTREGEXE=$ac_cv_path_JTREGEXE
41228if test -n "$JTREGEXE"; then
41229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41230$as_echo "$JTREGEXE" >&6; }
41231else
41232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41233$as_echo "no" >&6; }
41234fi
41235
41236
41237  test -n "$JTREGEXE" && break
41238done
41239
41240  else
41241    # The variable is set, but is it from the command line or the environment?
41242
41243    # Try to remove the string !JTREGEXE! from our list.
41244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
41245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41246      # If it failed, the variable was not from the command line. Ignore it,
41247      # but warn the user (except for BASH, which is always set by the calling BASH).
41248      if test "xJTREGEXE" != xBASH; then
41249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
41250$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
41251      fi
41252      # Try to locate tool using the code snippet
41253      for ac_prog in jtreg
41254do
41255  # Extract the first word of "$ac_prog", so it can be a program name with args.
41256set dummy $ac_prog; ac_word=$2
41257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41258$as_echo_n "checking for $ac_word... " >&6; }
41259if ${ac_cv_path_JTREGEXE+:} false; then :
41260  $as_echo_n "(cached) " >&6
41261else
41262  case $JTREGEXE in
41263  [\\/]* | ?:[\\/]*)
41264  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41265  ;;
41266  *)
41267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41268for as_dir in $PATH
41269do
41270  IFS=$as_save_IFS
41271  test -z "$as_dir" && as_dir=.
41272    for ac_exec_ext in '' $ac_executable_extensions; do
41273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41274    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41276    break 2
41277  fi
41278done
41279  done
41280IFS=$as_save_IFS
41281
41282  ;;
41283esac
41284fi
41285JTREGEXE=$ac_cv_path_JTREGEXE
41286if test -n "$JTREGEXE"; then
41287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41288$as_echo "$JTREGEXE" >&6; }
41289else
41290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41291$as_echo "no" >&6; }
41292fi
41293
41294
41295  test -n "$JTREGEXE" && break
41296done
41297
41298    else
41299      # If it succeeded, then it was overridden by the user. We will use it
41300      # for the tool.
41301
41302      # First remove it from the list of overridden variables, so we can test
41303      # for unknown variables in the end.
41304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41305
41306      # Check if the provided tool contains a complete path.
41307      tool_specified="$JTREGEXE"
41308      tool_basename="${tool_specified##*/}"
41309      if test "x$tool_basename" = "x$tool_specified"; then
41310        # A command without a complete path is provided, search $PATH.
41311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41312$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41313        # Extract the first word of "$tool_basename", so it can be a program name with args.
41314set dummy $tool_basename; ac_word=$2
41315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41316$as_echo_n "checking for $ac_word... " >&6; }
41317if ${ac_cv_path_JTREGEXE+:} false; then :
41318  $as_echo_n "(cached) " >&6
41319else
41320  case $JTREGEXE in
41321  [\\/]* | ?:[\\/]*)
41322  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41323  ;;
41324  *)
41325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41326for as_dir in $PATH
41327do
41328  IFS=$as_save_IFS
41329  test -z "$as_dir" && as_dir=.
41330    for ac_exec_ext in '' $ac_executable_extensions; do
41331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41332    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41334    break 2
41335  fi
41336done
41337  done
41338IFS=$as_save_IFS
41339
41340  ;;
41341esac
41342fi
41343JTREGEXE=$ac_cv_path_JTREGEXE
41344if test -n "$JTREGEXE"; then
41345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41346$as_echo "$JTREGEXE" >&6; }
41347else
41348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41349$as_echo "no" >&6; }
41350fi
41351
41352
41353        if test "x$JTREGEXE" = x; then
41354          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41355        fi
41356      else
41357        # Otherwise we believe it is a complete path. Use it as it is.
41358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41359$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41361$as_echo_n "checking for JTREGEXE... " >&6; }
41362        if test ! -x "$tool_specified"; then
41363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41364$as_echo "not found" >&6; }
41365          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41366        fi
41367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41368$as_echo "$tool_specified" >&6; }
41369      fi
41370    fi
41371  fi
41372
41373
41374
41375  if test "x$JTREGEXE" = x; then
41376    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41377  fi
41378
41379
41380      JT_HOME="`$DIRNAME $JTREGEXE`"
41381    fi
41382  fi
41383
41384
41385
41386
41387
41388
41389  # Option used to tell the compiler whether to create 32- or 64-bit executables
41390  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41391    COMPILER_TARGET_BITS_FLAG="-q"
41392  else
41393    COMPILER_TARGET_BITS_FLAG="-m"
41394  fi
41395
41396
41397  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41398  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41399    ARFLAGS="-r"
41400  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41401    ARFLAGS="-X64"
41402  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41403    # lib.exe is used as AR to create static libraries.
41404    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41405  else
41406    ARFLAGS=""
41407  fi
41408
41409
41410  ## Setup strip.
41411  # FIXME: should this really be per platform, or should it be per toolchain type?
41412  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41413  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41414  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41415    STRIPFLAGS="-g"
41416  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41417    STRIPFLAGS="-x"
41418  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41419    STRIPFLAGS="-S"
41420  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41421    STRIPFLAGS="-X32_64"
41422  fi
41423
41424  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41425    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41426  fi
41427
41428
41429  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41430    # FIXME: break out into MCSFLAGS
41431    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41432  fi
41433
41434
41435  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41436    CC_OUT_OPTION=-Fo
41437    EXE_OUT_OPTION=-out:
41438    LD_OUT_OPTION=-out:
41439    AR_OUT_OPTION=-out:
41440  else
41441    # The option used to specify the target .o,.a or .so file.
41442    # When compiling, how to specify the to be created object file.
41443    CC_OUT_OPTION='-o$(SPACE)'
41444    # When linking, how to specify the to be created executable.
41445    EXE_OUT_OPTION='-o$(SPACE)'
41446    # When linking, how to specify the to be created dynamically linkable library.
41447    LD_OUT_OPTION='-o$(SPACE)'
41448    # When archiving, how to specify the to be create static archive for object files.
41449    AR_OUT_OPTION='rcs$(SPACE)'
41450  fi
41451
41452
41453
41454
41455
41456  # On Windows, we need to set RC flags.
41457  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41458    RC_FLAGS="-nologo -l0x409"
41459    if test "x$VARIANT" = xOPT; then
41460      RC_FLAGS="$RC_FLAGS -DNDEBUG"
41461    fi
41462
41463    # The version variables used to create RC_FLAGS may be overridden
41464    # in a custom configure script, or possibly the command line.
41465    # Let those variables be expanded at make time in spec.gmk.
41466    # The \$ are escaped to the shell, and the $(...) variables
41467    # are evaluated by make.
41468    RC_FLAGS="$RC_FLAGS \
41469        -D\"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41470        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
41471        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41472        -D\"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41473        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41474        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41475        -D\"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41476  fi
41477
41478
41479  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41480    # silence copyright notice and other headers.
41481    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41482  fi
41483
41484  if test "x$SYSROOT" != "x"; then
41485    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41486      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41487        # Solaris Studio does not have a concept of sysroot. Instead we must
41488        # make sure the default include and lib dirs are appended to each
41489        # compile and link command line.
41490        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41491        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41492            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41493            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41494      fi
41495    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41496      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41497      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41498      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41499    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41500      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
41501      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
41502    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41503      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41504      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41505    fi
41506    # Propagate the sysroot args to hotspot
41507    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41508    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41509    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41510  fi
41511
41512  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41513  # set this here so it doesn't have to be peppered throughout the forest
41514  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41515    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41516    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41517  fi
41518
41519
41520
41521
41522
41523# FIXME: Currently we must test this after toolchain but before flags. Fix!
41524
41525# Now we can test some aspects on the target using configure macros.
41526
41527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41528$as_echo_n "checking for ANSI C header files... " >&6; }
41529if ${ac_cv_header_stdc+:} false; then :
41530  $as_echo_n "(cached) " >&6
41531else
41532  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41533/* end confdefs.h.  */
41534#include <stdlib.h>
41535#include <stdarg.h>
41536#include <string.h>
41537#include <float.h>
41538
41539int
41540main ()
41541{
41542
41543  ;
41544  return 0;
41545}
41546_ACEOF
41547if ac_fn_cxx_try_compile "$LINENO"; then :
41548  ac_cv_header_stdc=yes
41549else
41550  ac_cv_header_stdc=no
41551fi
41552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41553
41554if test $ac_cv_header_stdc = yes; then
41555  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41556  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41557/* end confdefs.h.  */
41558#include <string.h>
41559
41560_ACEOF
41561if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41562  $EGREP "memchr" >/dev/null 2>&1; then :
41563
41564else
41565  ac_cv_header_stdc=no
41566fi
41567rm -f conftest*
41568
41569fi
41570
41571if test $ac_cv_header_stdc = yes; then
41572  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41573  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41574/* end confdefs.h.  */
41575#include <stdlib.h>
41576
41577_ACEOF
41578if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41579  $EGREP "free" >/dev/null 2>&1; then :
41580
41581else
41582  ac_cv_header_stdc=no
41583fi
41584rm -f conftest*
41585
41586fi
41587
41588if test $ac_cv_header_stdc = yes; then
41589  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41590  if test "$cross_compiling" = yes; then :
41591  :
41592else
41593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41594/* end confdefs.h.  */
41595#include <ctype.h>
41596#include <stdlib.h>
41597#if ((' ' & 0x0FF) == 0x020)
41598# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41599# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41600#else
41601# define ISLOWER(c) \
41602		   (('a' <= (c) && (c) <= 'i') \
41603		     || ('j' <= (c) && (c) <= 'r') \
41604		     || ('s' <= (c) && (c) <= 'z'))
41605# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41606#endif
41607
41608#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41609int
41610main ()
41611{
41612  int i;
41613  for (i = 0; i < 256; i++)
41614    if (XOR (islower (i), ISLOWER (i))
41615	|| toupper (i) != TOUPPER (i))
41616      return 2;
41617  return 0;
41618}
41619_ACEOF
41620if ac_fn_cxx_try_run "$LINENO"; then :
41621
41622else
41623  ac_cv_header_stdc=no
41624fi
41625rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41626  conftest.$ac_objext conftest.beam conftest.$ac_ext
41627fi
41628
41629fi
41630fi
41631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41632$as_echo "$ac_cv_header_stdc" >&6; }
41633if test $ac_cv_header_stdc = yes; then
41634
41635$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41636
41637fi
41638
41639# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41640for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41641		  inttypes.h stdint.h unistd.h
41642do :
41643  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41644ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41645"
41646if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41647  cat >>confdefs.h <<_ACEOF
41648#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41649_ACEOF
41650
41651fi
41652
41653done
41654
41655
41656
41657  ###############################################################################
41658  #
41659  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41660  # (The JVM can use 32 or 64 bit Java pointers but that decision
41661  # is made at runtime.)
41662  #
41663
41664  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41665    # Always specify -m flag on Solaris
41666    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41667
41668  # When we add flags to the "official" CFLAGS etc, we need to
41669  # keep track of these additions in ADDED_CFLAGS etc. These
41670  # will later be checked to make sure only controlled additions
41671  # have been made to CFLAGS etc.
41672  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41673  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41674  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41675
41676  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41677  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41678  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41679
41680  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41681  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41682  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41683
41684  elif test "x$COMPILE_TYPE" = xreduced; then
41685    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
41686      # Specify -m if running reduced on unix platforms
41687
41688  # When we add flags to the "official" CFLAGS etc, we need to
41689  # keep track of these additions in ADDED_CFLAGS etc. These
41690  # will later be checked to make sure only controlled additions
41691  # have been made to CFLAGS etc.
41692  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41693  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41694  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41695
41696  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41697  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41698  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41699
41700  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41701  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41702  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41703
41704    fi
41705  fi
41706
41707  # Make compilation sanity check
41708  for ac_header in stdio.h
41709do :
41710  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41711if test "x$ac_cv_header_stdio_h" = xyes; then :
41712  cat >>confdefs.h <<_ACEOF
41713#define HAVE_STDIO_H 1
41714_ACEOF
41715
41716else
41717
41718    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41719$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41720    if test "x$COMPILE_TYPE" = xreduced; then
41721      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41722$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41723    elif test "x$COMPILE_TYPE" = xcross; then
41724      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41725$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41726    fi
41727    as_fn_error $? "Cannot continue." "$LINENO" 5
41728
41729fi
41730
41731done
41732
41733
41734  # The cast to long int works around a bug in the HP C Compiler
41735# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41736# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41737# This bug is HP SR number 8606223364.
41738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41739$as_echo_n "checking size of int *... " >&6; }
41740if ${ac_cv_sizeof_int_p+:} false; then :
41741  $as_echo_n "(cached) " >&6
41742else
41743  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41744
41745else
41746  if test "$ac_cv_type_int_p" = yes; then
41747     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41749as_fn_error 77 "cannot compute sizeof (int *)
41750See \`config.log' for more details" "$LINENO" 5; }
41751   else
41752     ac_cv_sizeof_int_p=0
41753   fi
41754fi
41755
41756fi
41757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41758$as_echo "$ac_cv_sizeof_int_p" >&6; }
41759
41760
41761
41762cat >>confdefs.h <<_ACEOF
41763#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41764_ACEOF
41765
41766
41767
41768  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41769  if test "x$ac_cv_sizeof_int_p" = x; then
41770    # The test failed, lets stick to the assumed value.
41771    { $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
41772$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41773  else
41774    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41775
41776    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41777      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41778      # Let's try to implicitely set the compilers target architecture and retry the test
41779      { $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
41780$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;}
41781      { $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
41782$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;}
41783
41784  # When we add flags to the "official" CFLAGS etc, we need to
41785  # keep track of these additions in ADDED_CFLAGS etc. These
41786  # will later be checked to make sure only controlled additions
41787  # have been made to CFLAGS etc.
41788  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41789  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41790  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41791
41792  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41793  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41794  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41795
41796  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41797  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41798  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41799
41800
41801      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41802      unset ac_cv_sizeof_int_p
41803      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41804      cat >>confdefs.h <<_ACEOF
41805#undef SIZEOF_INT_P
41806_ACEOF
41807
41808      # The cast to long int works around a bug in the HP C Compiler
41809# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41810# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41811# This bug is HP SR number 8606223364.
41812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41813$as_echo_n "checking size of int *... " >&6; }
41814if ${ac_cv_sizeof_int_p+:} false; then :
41815  $as_echo_n "(cached) " >&6
41816else
41817  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41818
41819else
41820  if test "$ac_cv_type_int_p" = yes; then
41821     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41822$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41823as_fn_error 77 "cannot compute sizeof (int *)
41824See \`config.log' for more details" "$LINENO" 5; }
41825   else
41826     ac_cv_sizeof_int_p=0
41827   fi
41828fi
41829
41830fi
41831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41832$as_echo "$ac_cv_sizeof_int_p" >&6; }
41833
41834
41835
41836cat >>confdefs.h <<_ACEOF
41837#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41838_ACEOF
41839
41840
41841
41842      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41843
41844      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41845        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
41846      fi
41847    fi
41848  fi
41849
41850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41851$as_echo_n "checking for target address size... " >&6; }
41852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41853$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41854
41855
41856  ###############################################################################
41857  #
41858  # Is the target little of big endian?
41859  #
41860   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41861$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41862if ${ac_cv_c_bigendian+:} false; then :
41863  $as_echo_n "(cached) " >&6
41864else
41865  ac_cv_c_bigendian=unknown
41866    # See if we're dealing with a universal compiler.
41867    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41868/* end confdefs.h.  */
41869#ifndef __APPLE_CC__
41870	       not a universal capable compiler
41871	     #endif
41872	     typedef int dummy;
41873
41874_ACEOF
41875if ac_fn_cxx_try_compile "$LINENO"; then :
41876
41877	# Check for potential -arch flags.  It is not universal unless
41878	# there are at least two -arch flags with different values.
41879	ac_arch=
41880	ac_prev=
41881	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41882	 if test -n "$ac_prev"; then
41883	   case $ac_word in
41884	     i?86 | x86_64 | ppc | ppc64)
41885	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41886		 ac_arch=$ac_word
41887	       else
41888		 ac_cv_c_bigendian=universal
41889		 break
41890	       fi
41891	       ;;
41892	   esac
41893	   ac_prev=
41894	 elif test "x$ac_word" = "x-arch"; then
41895	   ac_prev=arch
41896	 fi
41897       done
41898fi
41899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41900    if test $ac_cv_c_bigendian = unknown; then
41901      # See if sys/param.h defines the BYTE_ORDER macro.
41902      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41903/* end confdefs.h.  */
41904#include <sys/types.h>
41905	     #include <sys/param.h>
41906
41907int
41908main ()
41909{
41910#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41911		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41912		     && LITTLE_ENDIAN)
41913	      bogus endian macros
41914	     #endif
41915
41916  ;
41917  return 0;
41918}
41919_ACEOF
41920if ac_fn_cxx_try_compile "$LINENO"; then :
41921  # It does; now see whether it defined to BIG_ENDIAN or not.
41922	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41923/* end confdefs.h.  */
41924#include <sys/types.h>
41925		#include <sys/param.h>
41926
41927int
41928main ()
41929{
41930#if BYTE_ORDER != BIG_ENDIAN
41931		 not big endian
41932		#endif
41933
41934  ;
41935  return 0;
41936}
41937_ACEOF
41938if ac_fn_cxx_try_compile "$LINENO"; then :
41939  ac_cv_c_bigendian=yes
41940else
41941  ac_cv_c_bigendian=no
41942fi
41943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41944fi
41945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41946    fi
41947    if test $ac_cv_c_bigendian = unknown; then
41948      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41949      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41950/* end confdefs.h.  */
41951#include <limits.h>
41952
41953int
41954main ()
41955{
41956#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41957	      bogus endian macros
41958	     #endif
41959
41960  ;
41961  return 0;
41962}
41963_ACEOF
41964if ac_fn_cxx_try_compile "$LINENO"; then :
41965  # It does; now see whether it defined to _BIG_ENDIAN or not.
41966	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41967/* end confdefs.h.  */
41968#include <limits.h>
41969
41970int
41971main ()
41972{
41973#ifndef _BIG_ENDIAN
41974		 not big endian
41975		#endif
41976
41977  ;
41978  return 0;
41979}
41980_ACEOF
41981if ac_fn_cxx_try_compile "$LINENO"; then :
41982  ac_cv_c_bigendian=yes
41983else
41984  ac_cv_c_bigendian=no
41985fi
41986rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41987fi
41988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41989    fi
41990    if test $ac_cv_c_bigendian = unknown; then
41991      # Compile a test program.
41992      if test "$cross_compiling" = yes; then :
41993  # Try to guess by grepping values from an object file.
41994	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41995/* end confdefs.h.  */
41996short int ascii_mm[] =
41997		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41998		short int ascii_ii[] =
41999		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
42000		int use_ascii (int i) {
42001		  return ascii_mm[i] + ascii_ii[i];
42002		}
42003		short int ebcdic_ii[] =
42004		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
42005		short int ebcdic_mm[] =
42006		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
42007		int use_ebcdic (int i) {
42008		  return ebcdic_mm[i] + ebcdic_ii[i];
42009		}
42010		extern int foo;
42011
42012int
42013main ()
42014{
42015return use_ascii (foo) == use_ebcdic (foo);
42016  ;
42017  return 0;
42018}
42019_ACEOF
42020if ac_fn_cxx_try_compile "$LINENO"; then :
42021  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
42022	      ac_cv_c_bigendian=yes
42023	    fi
42024	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
42025	      if test "$ac_cv_c_bigendian" = unknown; then
42026		ac_cv_c_bigendian=no
42027	      else
42028		# finding both strings is unlikely to happen, but who knows?
42029		ac_cv_c_bigendian=unknown
42030	      fi
42031	    fi
42032fi
42033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42034else
42035  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42036/* end confdefs.h.  */
42037$ac_includes_default
42038int
42039main ()
42040{
42041
42042	     /* Are we little or big endian?  From Harbison&Steele.  */
42043	     union
42044	     {
42045	       long int l;
42046	       char c[sizeof (long int)];
42047	     } u;
42048	     u.l = 1;
42049	     return u.c[sizeof (long int) - 1] == 1;
42050
42051  ;
42052  return 0;
42053}
42054_ACEOF
42055if ac_fn_cxx_try_run "$LINENO"; then :
42056  ac_cv_c_bigendian=no
42057else
42058  ac_cv_c_bigendian=yes
42059fi
42060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
42061  conftest.$ac_objext conftest.beam conftest.$ac_ext
42062fi
42063
42064    fi
42065fi
42066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
42067$as_echo "$ac_cv_c_bigendian" >&6; }
42068 case $ac_cv_c_bigendian in #(
42069   yes)
42070     ENDIAN="big";; #(
42071   no)
42072     ENDIAN="little" ;; #(
42073   universal)
42074     ENDIAN="universal_endianness"
42075     ;; #(
42076   *)
42077     ENDIAN="unknown" ;;
42078 esac
42079
42080
42081  if test "x$ENDIAN" = xuniversal_endianness; then
42082    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
42083  fi
42084  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
42085    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
42086  fi
42087
42088
42089# Configure flags for the tools
42090
42091  ###############################################################################
42092  #
42093  # How to compile shared libraries.
42094  #
42095
42096  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42097    PICFLAG="-fPIC"
42098    C_FLAG_REORDER=''
42099    CXX_FLAG_REORDER=''
42100
42101    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42102      # Linking is different on MacOSX
42103      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42104      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42105      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42106      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42107      SET_SHARED_LIBRARY_MAPFILE=''
42108    else
42109      # Default works for linux, might work on other platforms as well.
42110      SHARED_LIBRARY_FLAGS='-shared'
42111      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42112      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42113      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42114      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42115    fi
42116  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42117    PICFLAG=''
42118    C_FLAG_REORDER=''
42119    CXX_FLAG_REORDER=''
42120
42121    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42122      # Linking is different on MacOSX
42123      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
42124      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
42125      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42126      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
42127      SET_SHARED_LIBRARY_MAPFILE=''
42128    else
42129      # Default works for linux, might work on other platforms as well.
42130      SHARED_LIBRARY_FLAGS='-shared'
42131      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
42132      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
42133      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
42134      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
42135    fi
42136  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42137    PICFLAG="-KPIC"
42138    C_FLAG_REORDER='-xF'
42139    CXX_FLAG_REORDER='-xF'
42140    SHARED_LIBRARY_FLAGS="-G"
42141    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
42142    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
42143    SET_SHARED_LIBRARY_NAME=''
42144    SET_SHARED_LIBRARY_MAPFILE='-M$1'
42145  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42146    PICFLAG="-qpic=large"
42147    C_FLAG_REORDER=''
42148    CXX_FLAG_REORDER=''
42149    SHARED_LIBRARY_FLAGS="-qmkshrobj"
42150    SET_EXECUTABLE_ORIGIN=""
42151    SET_SHARED_LIBRARY_ORIGIN=''
42152    SET_SHARED_LIBRARY_NAME=''
42153    SET_SHARED_LIBRARY_MAPFILE=''
42154  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42155    PICFLAG=""
42156    C_FLAG_REORDER=''
42157    CXX_FLAG_REORDER=''
42158    SHARED_LIBRARY_FLAGS="-LD"
42159    SET_EXECUTABLE_ORIGIN=''
42160    SET_SHARED_LIBRARY_ORIGIN=''
42161    SET_SHARED_LIBRARY_NAME=''
42162    SET_SHARED_LIBRARY_MAPFILE=''
42163  fi
42164
42165
42166
42167
42168
42169
42170
42171
42172
42173  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42174    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
42175    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
42176    CFLAGS_JDKLIB_EXTRA='-xstrconst'
42177  fi
42178  # The (cross) compiler is now configured, we can now test capabilities
42179  # of the target platform.
42180
42181
42182
42183  ###############################################################################
42184  #
42185  # Setup the opt flags for different compilers
42186  # and different operating systems.
42187  #
42188
42189  # FIXME: this was indirectly the old default, but just inherited.
42190  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42191  #   C_FLAG_DEPS="-MMD -MF"
42192  # fi
42193
42194  # Generate make dependency files
42195  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42196    C_FLAG_DEPS="-MMD -MF"
42197  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42198    C_FLAG_DEPS="-MMD -MF"
42199  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42200    C_FLAG_DEPS="-xMMD -xMF"
42201  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42202    C_FLAG_DEPS="-qmakedep=gcc -MF"
42203  fi
42204  CXX_FLAG_DEPS="$C_FLAG_DEPS"
42205
42206
42207
42208  # Debug symbols
42209  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42210    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
42211      # reduce from default "-g2" option to save space
42212      CFLAGS_DEBUG_SYMBOLS="-g1"
42213      CXXFLAGS_DEBUG_SYMBOLS="-g1"
42214    else
42215      CFLAGS_DEBUG_SYMBOLS="-g"
42216      CXXFLAGS_DEBUG_SYMBOLS="-g"
42217    fi
42218  elif test "x$TOOLCHAIN_TYPE" = xclang; then
42219    CFLAGS_DEBUG_SYMBOLS="-g"
42220    CXXFLAGS_DEBUG_SYMBOLS="-g"
42221  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42222    CFLAGS_DEBUG_SYMBOLS="-g -xs"
42223    # FIXME: likely a bug, this disables debug symbols rather than enables them
42224    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
42225  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42226    CFLAGS_DEBUG_SYMBOLS="-g"
42227    CXXFLAGS_DEBUG_SYMBOLS="-g"
42228  fi
42229
42230
42231
42232  # bounds, memory and behavior checking options
42233  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42234    case $DEBUG_LEVEL in
42235    release )
42236      # no adjustment
42237      ;;
42238    fastdebug )
42239      # no adjustment
42240      ;;
42241    slowdebug )
42242      # Add runtime stack smashing and undefined behavior checks
42243      CFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42244      CXXFLAGS_DEBUG_OPTIONS="-fstack-protector-all --param ssp-buffer-size=1"
42245      ;;
42246    esac
42247  fi
42248
42249
42250
42251  # Optimization levels
42252  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42253    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
42254
42255    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
42256      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
42257      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
42258      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
42259      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
42260      C_O_FLAG_DEBUG="-xregs=no%frameptr"
42261      C_O_FLAG_NONE="-xregs=no%frameptr"
42262      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
42263      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
42264      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
42265      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
42266      CXX_O_FLAG_NONE="-xregs=no%frameptr"
42267      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42268        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
42269        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
42270      fi
42271    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42272      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
42273      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42274      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
42275      C_O_FLAG_DEBUG=""
42276      C_O_FLAG_NONE=""
42277      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
42278      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42279      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
42280      C_O_FLAG_DEBUG=""
42281      CXX_O_FLAG_NONE=""
42282    fi
42283  else
42284    # The remaining toolchains share opt flags between CC and CXX;
42285    # setup for C and duplicate afterwards.
42286    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42287      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42288        # On MacOSX we optimize for size, something
42289        # we should do for all platforms?
42290        C_O_FLAG_HIGHEST="-Os"
42291        C_O_FLAG_HI="-Os"
42292        C_O_FLAG_NORM="-Os"
42293      else
42294        C_O_FLAG_HIGHEST="-O3"
42295        C_O_FLAG_HI="-O3"
42296        C_O_FLAG_NORM="-O2"
42297      fi
42298      C_O_FLAG_DEBUG="-O0"
42299      C_O_FLAG_NONE="-O0"
42300    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42301      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42302        # On MacOSX we optimize for size, something
42303        # we should do for all platforms?
42304        C_O_FLAG_HIGHEST="-Os"
42305        C_O_FLAG_HI="-Os"
42306        C_O_FLAG_NORM="-Os"
42307      else
42308        C_O_FLAG_HIGHEST="-O3"
42309        C_O_FLAG_HI="-O3"
42310        C_O_FLAG_NORM="-O2"
42311      fi
42312      C_O_FLAG_DEBUG="-O0"
42313      C_O_FLAG_NONE="-O0"
42314    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42315      C_O_FLAG_HIGHEST="-O3"
42316      C_O_FLAG_HI="-O3 -qstrict"
42317      C_O_FLAG_NORM="-O2"
42318      C_O_FLAG_DEBUG="-qnoopt"
42319      C_O_FLAG_NONE="-qnoop"
42320    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42321      C_O_FLAG_HIGHEST="-O2"
42322      C_O_FLAG_HI="-O1"
42323      C_O_FLAG_NORM="-O1"
42324      C_O_FLAG_DEBUG="-Od"
42325      C_O_FLAG_NONE="-Od"
42326    fi
42327    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42328    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42329    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42330    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42331    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42332  fi
42333
42334  # Adjust optimization flags according to debug level.
42335  case $DEBUG_LEVEL in
42336    release )
42337      # no adjustment
42338      ;;
42339    fastdebug )
42340      # Not quite so much optimization
42341      C_O_FLAG_HI="$C_O_FLAG_NORM"
42342      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42343      ;;
42344    slowdebug )
42345      # Disable optimization
42346      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42347      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42348      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42349      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42350      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42351      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42352      ;;
42353  esac
42354
42355
42356
42357
42358
42359
42360
42361
42362
42363
42364
42365
42366
42367  # Special extras...
42368  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42369    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42370      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42371      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42372    fi
42373    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42374    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
42375  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42376    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42377    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42378    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42379  fi
42380
42381  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42382    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42383$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42384  fi
42385
42386  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42388$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42389  fi
42390
42391  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42392    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42393$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42394  fi
42395
42396
42397# Check whether --with-extra-cflags was given.
42398if test "${with_extra_cflags+set}" = set; then :
42399  withval=$with_extra_cflags;
42400fi
42401
42402
42403
42404# Check whether --with-extra-cxxflags was given.
42405if test "${with_extra_cxxflags+set}" = set; then :
42406  withval=$with_extra_cxxflags;
42407fi
42408
42409
42410
42411# Check whether --with-extra-ldflags was given.
42412if test "${with_extra_ldflags+set}" = set; then :
42413  withval=$with_extra_ldflags;
42414fi
42415
42416
42417  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42418  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42419  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42420
42421  # Hotspot needs these set in their legacy form
42422  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42423  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42424  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42425
42426
42427
42428
42429
42430  ###############################################################################
42431  #
42432  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42433  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42434  #
42435
42436  # Setup compiler/platform specific flags into
42437  #    CFLAGS_JDK    - C Compiler flags
42438  #    CXXFLAGS_JDK  - C++ Compiler flags
42439  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42440  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42441    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42442        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42443    case $OPENJDK_TARGET_CPU_ARCH in
42444      arm )
42445        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42446        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42447        ;;
42448      ppc )
42449        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42450        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42451        ;;
42452      * )
42453        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42454        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42455        ;;
42456    esac
42457  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42458    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42459    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42460      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42461    fi
42462
42463    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42464    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42465  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42466    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42467    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42468  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42469    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
42470        -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42471        -DWIN32_LEAN_AND_MEAN \
42472        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42473        -DWIN32 -DIAL"
42474    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42475      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42476    else
42477      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42478    fi
42479    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
42480    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
42481    # studio.
42482    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
42483      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42484          -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
42485    fi
42486  fi
42487
42488  ###############################################################################
42489
42490  # Adjust flags according to debug level.
42491  case $DEBUG_LEVEL in
42492    fastdebug | slowdebug )
42493      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42494      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42495      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42496      ;;
42497    release )
42498      ;;
42499    * )
42500      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42501      ;;
42502  esac
42503
42504  # Setup LP64
42505  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42506
42507  # Set some common defines. These works for all compilers, but assume
42508  # -D is universally accepted.
42509
42510  # Setup endianness
42511  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42512    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42513    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42514    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42515    #   Note: -Dmacro         is the same as    #define macro 1
42516    #         -Dmacro=        is the same as    #define macro
42517    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42518      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42519    else
42520      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42521    fi
42522  else
42523    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42524    # are defined in the system?
42525    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42526      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42527    else
42528      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42529    fi
42530  fi
42531
42532  # Setup target OS define. Use OS target name but in upper case.
42533  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42534  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42535
42536  # Setup target CPU
42537  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42538
42539  # Setup debug/release defines
42540  if test "x$DEBUG_LEVEL" = xrelease; then
42541    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42542    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42543      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42544    fi
42545  else
42546    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42547  fi
42548
42549  # Setup release name
42550  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42551
42552
42553  # Set some additional per-OS defines.
42554  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42555    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42556  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42557    # FIXME: PPC64 should not be here.
42558    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42559  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42560    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42561  fi
42562
42563  # Additional macosx handling
42564  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42565    # Setting these parameters makes it an error to link to macosx APIs that are
42566    # newer than the given OS version and makes the linked binaries compatible
42567    # even if built on a newer version of the OS.
42568    # The expected format is X.Y.Z
42569    MACOSX_VERSION_MIN=10.7.0
42570
42571
42572    # The macro takes the version with no dots, ex: 1070
42573    # Let the flags variables get resolved in make for easier override on make
42574    # command line.
42575    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42576    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42577  fi
42578
42579  # Setup some hard coded includes
42580  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42581      -I${JDK_TOPDIR}/src/java.base/share/native/include \
42582      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
42583      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include"
42584
42585  # The shared libraries are compiled using the picflag.
42586  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42587  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42588
42589  # Executable flags
42590  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42591  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42592
42593
42594
42595
42596
42597
42598  # Flags for compiling test libraries
42599  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42600  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
42601
42602  # Flags for compiling test executables
42603  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42604  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42605
42606
42607
42608
42609
42610
42611  # Setup LDFLAGS et al.
42612  #
42613
42614  # Now this is odd. The JDK native libraries have to link against libjvm.so
42615  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42616  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42617  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42618  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42619  # libraries will link to whatever is in memory. Yuck.
42620  #
42621  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42622  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42623    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42624    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42625      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42626    fi
42627    # TODO: make -debug optional "--disable-full-debug-symbols"
42628    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42629  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42630    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42631    # We have previously set HAS_GNU_HASH if this is the case
42632    if test -n "$HAS_GNU_HASH"; then
42633      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42634    fi
42635    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42636      # And since we now know that the linker is gnu, then add -z defs, to forbid
42637      # undefined symbols in object files.
42638      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42639      case $DEBUG_LEVEL in
42640        release )
42641          # tell linker to optimize libraries.
42642          # Should this be supplied to the OSS linker as well?
42643          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42644          ;;
42645        slowdebug )
42646          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42647            # do relocations at load
42648            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42649            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42650          fi
42651          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42652            # mark relocations read only
42653            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42654            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42655          fi
42656          ;;
42657        fastdebug )
42658          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42659            # mark relocations read only
42660            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42661            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42662          fi
42663          ;;
42664        * )
42665          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42666          ;;
42667        esac
42668    fi
42669  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42670    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42671    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42672  fi
42673
42674  # Customize LDFLAGS for executables
42675
42676  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42677
42678  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42679    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42680      LDFLAGS_STACK_SIZE=1048576
42681    else
42682      LDFLAGS_STACK_SIZE=327680
42683    fi
42684    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42685  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42686    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42687  fi
42688
42689  # Customize LDFLAGS for libs
42690  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42691
42692  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42693    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
42694    LDFLAGS_JDKLIB_SUFFIX=""
42695  else
42696    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42697        -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}"
42698
42699    # On some platforms (mac) the linker warns about non existing -L dirs.
42700    # Add server first if available. Linking aginst client does not always produce the same results.
42701    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42702    # Default to server for other variants.
42703    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42704      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42705    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42706      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/client"
42707    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42708      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42709    else
42710      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${OUTPUT_ROOT}/support/modules_libs/java.base${OPENJDK_TARGET_CPU_LIBDIR}/server"
42711    fi
42712
42713    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42714    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42715      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42716    fi
42717  fi
42718
42719
42720
42721
42722
42723
42724
42725  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
42726  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
42727  LDFLAGS_TESTLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX"
42728  LDFLAGS_TESTEXE_SUFFIX="$LDFLAGS_JDKEXE_SUFFIX"
42729
42730
42731
42732
42733
42734
42735
42736  # Some Zero and Shark settings.
42737  # ZERO_ARCHFLAG tells the compiler which mode to build for
42738  case "${OPENJDK_TARGET_CPU}" in
42739    s390)
42740      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42741      ;;
42742    *)
42743      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42744  esac
42745
42746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42747$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42748  supports=yes
42749
42750  saved_cflags="$CFLAGS"
42751  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42752  ac_ext=c
42753ac_cpp='$CPP $CPPFLAGS'
42754ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42755ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42756ac_compiler_gnu=$ac_cv_c_compiler_gnu
42757
42758  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42759/* end confdefs.h.  */
42760int i;
42761_ACEOF
42762if ac_fn_c_try_compile "$LINENO"; then :
42763
42764else
42765  supports=no
42766fi
42767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42768  ac_ext=cpp
42769ac_cpp='$CXXCPP $CPPFLAGS'
42770ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42771ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42772ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42773
42774  CFLAGS="$saved_cflags"
42775
42776  saved_cxxflags="$CXXFLAGS"
42777  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42778  ac_ext=cpp
42779ac_cpp='$CXXCPP $CPPFLAGS'
42780ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42781ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42782ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42783
42784  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42785/* end confdefs.h.  */
42786int i;
42787_ACEOF
42788if ac_fn_cxx_try_compile "$LINENO"; then :
42789
42790else
42791  supports=no
42792fi
42793rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42794  ac_ext=cpp
42795ac_cpp='$CXXCPP $CPPFLAGS'
42796ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42797ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42798ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42799
42800  CXXFLAGS="$saved_cxxflags"
42801
42802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42803$as_echo "$supports" >&6; }
42804  if test "x$supports" = "xyes" ; then
42805    :
42806  else
42807    ZERO_ARCHFLAG=""
42808  fi
42809
42810
42811
42812  # Check that the compiler supports -mX (or -qX on AIX) flags
42813  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42814
42815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42816$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42817  supports=yes
42818
42819  saved_cflags="$CFLAGS"
42820  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42821  ac_ext=c
42822ac_cpp='$CPP $CPPFLAGS'
42823ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42824ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42825ac_compiler_gnu=$ac_cv_c_compiler_gnu
42826
42827  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42828/* end confdefs.h.  */
42829int i;
42830_ACEOF
42831if ac_fn_c_try_compile "$LINENO"; then :
42832
42833else
42834  supports=no
42835fi
42836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42837  ac_ext=cpp
42838ac_cpp='$CXXCPP $CPPFLAGS'
42839ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42840ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42841ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42842
42843  CFLAGS="$saved_cflags"
42844
42845  saved_cxxflags="$CXXFLAGS"
42846  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42847  ac_ext=cpp
42848ac_cpp='$CXXCPP $CPPFLAGS'
42849ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42850ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42851ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42852
42853  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42854/* end confdefs.h.  */
42855int i;
42856_ACEOF
42857if ac_fn_cxx_try_compile "$LINENO"; then :
42858
42859else
42860  supports=no
42861fi
42862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42863  ac_ext=cpp
42864ac_cpp='$CXXCPP $CPPFLAGS'
42865ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42866ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42867ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42868
42869  CXXFLAGS="$saved_cxxflags"
42870
42871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42872$as_echo "$supports" >&6; }
42873  if test "x$supports" = "xyes" ; then
42874    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42875  else
42876    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42877  fi
42878
42879
42880
42881  case "${TOOLCHAIN_TYPE}" in
42882    microsoft)
42883      DISABLE_WARNING_PREFIX="-wd"
42884      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
42885      ;;
42886    solstudio)
42887      DISABLE_WARNING_PREFIX="-erroff="
42888      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42889      ;;
42890    gcc)
42891      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
42892
42893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
42894$as_echo_n "checking if compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
42895  supports=yes
42896
42897  saved_cflags="$CFLAGS"
42898  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
42899  ac_ext=c
42900ac_cpp='$CPP $CPPFLAGS'
42901ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42902ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42903ac_compiler_gnu=$ac_cv_c_compiler_gnu
42904
42905  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42906/* end confdefs.h.  */
42907int i;
42908_ACEOF
42909if ac_fn_c_try_compile "$LINENO"; then :
42910
42911else
42912  supports=no
42913fi
42914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42915  ac_ext=cpp
42916ac_cpp='$CXXCPP $CPPFLAGS'
42917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42920
42921  CFLAGS="$saved_cflags"
42922
42923  saved_cxxflags="$CXXFLAGS"
42924  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
42925  ac_ext=cpp
42926ac_cpp='$CXXCPP $CPPFLAGS'
42927ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42928ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42929ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42930
42931  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42932/* end confdefs.h.  */
42933int i;
42934_ACEOF
42935if ac_fn_cxx_try_compile "$LINENO"; then :
42936
42937else
42938  supports=no
42939fi
42940rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42941  ac_ext=cpp
42942ac_cpp='$CXXCPP $CPPFLAGS'
42943ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42944ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42945ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42946
42947  CXXFLAGS="$saved_cxxflags"
42948
42949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42950$as_echo "$supports" >&6; }
42951  if test "x$supports" = "xyes" ; then
42952    GCC_CAN_DISABLE_WARNINGS=true
42953  else
42954    GCC_CAN_DISABLE_WARNINGS=false
42955
42956  fi
42957
42958      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
42959        DISABLE_WARNING_PREFIX="-Wno-"
42960      else
42961        DISABLE_WARNING_PREFIX=
42962      fi
42963      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42964      ;;
42965    clang)
42966      DISABLE_WARNING_PREFIX="-Wno-"
42967      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42968      ;;
42969  esac
42970
42971
42972
42973
42974# Setup debug symbols (need objcopy from the toolchain for that)
42975
42976  #
42977  # ENABLE_DEBUG_SYMBOLS
42978  # This must be done after the toolchain is setup, since we're looking at objcopy.
42979  #
42980  # Check whether --enable-debug-symbols was given.
42981if test "${enable_debug_symbols+set}" = set; then :
42982  enableval=$enable_debug_symbols;
42983fi
42984
42985
42986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42987$as_echo_n "checking if we should generate debug symbols... " >&6; }
42988
42989  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42990    # explicit enabling of enable-debug-symbols and can't find objcopy
42991    #   this is an error
42992    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42993  fi
42994
42995  if test "x$enable_debug_symbols" = "xyes"; then
42996    ENABLE_DEBUG_SYMBOLS=true
42997  elif test "x$enable_debug_symbols" = "xno"; then
42998    ENABLE_DEBUG_SYMBOLS=false
42999  else
43000    # Default is on if objcopy is found
43001    if test "x$OBJCOPY" != x; then
43002      ENABLE_DEBUG_SYMBOLS=true
43003    # MacOS X and Windows don't use objcopy but default is on for those OSes
43004    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
43005      ENABLE_DEBUG_SYMBOLS=true
43006    else
43007      ENABLE_DEBUG_SYMBOLS=false
43008    fi
43009  fi
43010
43011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
43012$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
43013
43014  #
43015  # ZIP_DEBUGINFO_FILES
43016  #
43017  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
43018$as_echo_n "checking if we should zip debug-info files... " >&6; }
43019  # Check whether --enable-zip-debug-info was given.
43020if test "${enable_zip_debug_info+set}" = set; then :
43021  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
43022else
43023  enable_zip_debug_info="yes"
43024fi
43025
43026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
43027$as_echo "${enable_zip_debug_info}" >&6; }
43028
43029  if test "x${enable_zip_debug_info}" = "xno"; then
43030    ZIP_DEBUGINFO_FILES=false
43031  else
43032    ZIP_DEBUGINFO_FILES=true
43033  fi
43034
43035
43036
43037
43038
43039  # Check whether --enable-native-coverage was given.
43040if test "${enable_native_coverage+set}" = set; then :
43041  enableval=$enable_native_coverage;
43042fi
43043
43044  GCOV_ENABLED="false"
43045  if test "x$enable_native_coverage" = "xyes"; then
43046    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
43047      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43048$as_echo_n "checking if native coverage is enabled... " >&6; }
43049      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43050$as_echo "yes" >&6; }
43051      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
43052      GCOV_LDFLAGS="-fprofile-arcs"
43053      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
43054      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
43055      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
43056      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
43057      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
43058      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
43059      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
43060      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
43061      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
43062      GCOV_ENABLED="true"
43063    else
43064      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
43065    fi
43066  elif test "x$enable_native_coverage" = "xno"; then
43067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
43068$as_echo_n "checking if native coverage is enabled... " >&6; }
43069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43070$as_echo "no" >&6; }
43071  elif test "x$enable_native_coverage" != "x"; then
43072    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
43073  fi
43074
43075
43076
43077
43078###############################################################################
43079#
43080# Check dependencies for external and internal libraries.
43081#
43082###############################################################################
43083
43084# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
43085
43086  # When using cygwin or msys, we need a wrapper binary that renames
43087  # /cygdrive/c/ arguments into c:/ arguments and peeks into
43088  # @files and rewrites these too! This wrapper binary is
43089  # called fixpath.
43090  FIXPATH=
43091  if test "x$OPENJDK_BUILD_OS" = xwindows; then
43092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
43093$as_echo_n "checking if fixpath can be created... " >&6; }
43094    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
43095    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
43096    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
43097      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
43098      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
43099      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
43100      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
43101    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
43102      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
43103      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
43104
43105      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
43106      # @ was chosen as separator to minimize risk of other tools messing around with it
43107      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
43108      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
43109
43110      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
43111    fi
43112    rm -f $OUTPUT_ROOT/fixpath*
43113    cd $OUTPUT_ROOT
43114    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
43115    cd $CURDIR
43116
43117    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
43118      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43119$as_echo "no" >&6; }
43120      cat $OUTPUT_ROOT/fixpath1.log
43121      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
43122    fi
43123    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43124$as_echo "yes" >&6; }
43125    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
43126$as_echo_n "checking if fixpath.exe works... " >&6; }
43127    cd $OUTPUT_ROOT
43128    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
43129    cd $CURDIR
43130    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
43131      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43132$as_echo "no" >&6; }
43133      cat $OUTPUT_ROOT/fixpath2.log
43134      as_fn_error $? "fixpath did not work!" "$LINENO" 5
43135    fi
43136    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43137$as_echo "yes" >&6; }
43138    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
43139  fi
43140
43141
43142
43143
43144
43145
43146  ###############################################################################
43147  #
43148  # OS specific settings that we never will need to probe.
43149  #
43150  if test "x$OPENJDK_TARGET_OS" = xlinux; then
43151    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
43152$as_echo_n "checking what is not needed on Linux?... " >&6; }
43153    PULSE_NOT_NEEDED=yes
43154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
43155$as_echo "pulse" >&6; }
43156  fi
43157
43158  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
43160$as_echo_n "checking what is not needed on Solaris?... " >&6; }
43161    ALSA_NOT_NEEDED=yes
43162    PULSE_NOT_NEEDED=yes
43163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43164$as_echo "alsa pulse" >&6; }
43165  fi
43166
43167  if test "x$OPENJDK_TARGET_OS" = xaix; then
43168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
43169$as_echo_n "checking what is not needed on AIX?... " >&6; }
43170    ALSA_NOT_NEEDED=yes
43171    PULSE_NOT_NEEDED=yes
43172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
43173$as_echo "alsa pulse" >&6; }
43174  fi
43175
43176
43177  if test "x$OPENJDK_TARGET_OS" = xwindows; then
43178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
43179$as_echo_n "checking what is not needed on Windows?... " >&6; }
43180    CUPS_NOT_NEEDED=yes
43181    ALSA_NOT_NEEDED=yes
43182    PULSE_NOT_NEEDED=yes
43183    X11_NOT_NEEDED=yes
43184    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
43185$as_echo "alsa cups pulse x11" >&6; }
43186  fi
43187
43188  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
43190$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
43191    ALSA_NOT_NEEDED=yes
43192    PULSE_NOT_NEEDED=yes
43193    X11_NOT_NEEDED=yes
43194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
43195$as_echo "alsa pulse x11" >&6; }
43196  fi
43197
43198  if test "x$OPENJDK_TARGET_OS" = xbsd; then
43199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
43200$as_echo_n "checking what is not needed on bsd?... " >&6; }
43201    ALSA_NOT_NEEDED=yes
43202    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
43203$as_echo "alsa" >&6; }
43204  fi
43205
43206  if test "x$OPENJDK" = "xfalse"; then
43207    FREETYPE_NOT_NEEDED=yes
43208  fi
43209
43210  if test "x$SUPPORT_HEADFUL" = xno; then
43211    X11_NOT_NEEDED=yes
43212  fi
43213
43214
43215
43216  ###############################################################################
43217  #
43218  # Check for X Windows
43219  #
43220
43221  if test "x$X11_NOT_NEEDED" = xyes; then
43222    if test "x${with_x}" != x; then
43223      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
43224$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
43225    fi
43226    X_CFLAGS=
43227    X_LIBS=
43228  else
43229    # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
43230    # Make a simple check for the libraries at the sysroot, and setup --x-includes and
43231    # --x-libraries for the sysroot, if that seems to be correct.
43232    if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
43233      if test "x$SYSROOT" != "x"; then
43234        if test "x$x_includes" = xNONE; then
43235          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
43236            x_includes="$SYSROOT/usr/X11R6/include"
43237          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
43238            x_includes="$SYSROOT/usr/include"
43239          fi
43240        fi
43241        if test "x$x_libraries" = xNONE; then
43242          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
43243            x_libraries="$SYSROOT/usr/X11R6/lib"
43244          elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
43245            x_libraries="$SYSROOT/usr/lib64"
43246          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
43247            x_libraries="$SYSROOT/usr/lib"
43248          fi
43249        fi
43250      fi
43251    fi
43252
43253    # Now let autoconf do it's magic
43254    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
43255$as_echo_n "checking for X... " >&6; }
43256
43257
43258# Check whether --with-x was given.
43259if test "${with_x+set}" = set; then :
43260  withval=$with_x;
43261fi
43262
43263# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
43264if test "x$with_x" = xno; then
43265  # The user explicitly disabled X.
43266  have_x=disabled
43267else
43268  case $x_includes,$x_libraries in #(
43269    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
43270    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
43271  $as_echo_n "(cached) " >&6
43272else
43273  # One or both of the vars are not set, and there is no cached value.
43274ac_x_includes=no ac_x_libraries=no
43275rm -f -r conftest.dir
43276if mkdir conftest.dir; then
43277  cd conftest.dir
43278  cat >Imakefile <<'_ACEOF'
43279incroot:
43280	@echo incroot='${INCROOT}'
43281usrlibdir:
43282	@echo usrlibdir='${USRLIBDIR}'
43283libdir:
43284	@echo libdir='${LIBDIR}'
43285_ACEOF
43286  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
43287    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
43288    for ac_var in incroot usrlibdir libdir; do
43289      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
43290    done
43291    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
43292    for ac_extension in a so sl dylib la dll; do
43293      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
43294	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
43295	ac_im_usrlibdir=$ac_im_libdir; break
43296      fi
43297    done
43298    # Screen out bogus values from the imake configuration.  They are
43299    # bogus both because they are the default anyway, and because
43300    # using them would break gcc on systems where it needs fixed includes.
43301    case $ac_im_incroot in
43302	/usr/include) ac_x_includes= ;;
43303	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
43304    esac
43305    case $ac_im_usrlibdir in
43306	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
43307	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
43308    esac
43309  fi
43310  cd ..
43311  rm -f -r conftest.dir
43312fi
43313
43314# Standard set of common directories for X headers.
43315# Check X11 before X11Rn because it is often a symlink to the current release.
43316ac_x_header_dirs='
43317/usr/X11/include
43318/usr/X11R7/include
43319/usr/X11R6/include
43320/usr/X11R5/include
43321/usr/X11R4/include
43322
43323/usr/include/X11
43324/usr/include/X11R7
43325/usr/include/X11R6
43326/usr/include/X11R5
43327/usr/include/X11R4
43328
43329/usr/local/X11/include
43330/usr/local/X11R7/include
43331/usr/local/X11R6/include
43332/usr/local/X11R5/include
43333/usr/local/X11R4/include
43334
43335/usr/local/include/X11
43336/usr/local/include/X11R7
43337/usr/local/include/X11R6
43338/usr/local/include/X11R5
43339/usr/local/include/X11R4
43340
43341/usr/X386/include
43342/usr/x386/include
43343/usr/XFree86/include/X11
43344
43345/usr/include
43346/usr/local/include
43347/usr/unsupported/include
43348/usr/athena/include
43349/usr/local/x11r5/include
43350/usr/lpp/Xamples/include
43351
43352/usr/openwin/include
43353/usr/openwin/share/include'
43354
43355if test "$ac_x_includes" = no; then
43356  # Guess where to find include files, by looking for Xlib.h.
43357  # First, try using that file with no special directory specified.
43358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43359/* end confdefs.h.  */
43360#include <X11/Xlib.h>
43361_ACEOF
43362if ac_fn_cxx_try_cpp "$LINENO"; then :
43363  # We can compile using X headers with no special include directory.
43364ac_x_includes=
43365else
43366  for ac_dir in $ac_x_header_dirs; do
43367  if test -r "$ac_dir/X11/Xlib.h"; then
43368    ac_x_includes=$ac_dir
43369    break
43370  fi
43371done
43372fi
43373rm -f conftest.err conftest.i conftest.$ac_ext
43374fi # $ac_x_includes = no
43375
43376if test "$ac_x_libraries" = no; then
43377  # Check for the libraries.
43378  # See if we find them without any special options.
43379  # Don't add to $LIBS permanently.
43380  ac_save_LIBS=$LIBS
43381  LIBS="-lX11 $LIBS"
43382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43383/* end confdefs.h.  */
43384#include <X11/Xlib.h>
43385int
43386main ()
43387{
43388XrmInitialize ()
43389  ;
43390  return 0;
43391}
43392_ACEOF
43393if ac_fn_cxx_try_link "$LINENO"; then :
43394  LIBS=$ac_save_LIBS
43395# We can link X programs with no special library path.
43396ac_x_libraries=
43397else
43398  LIBS=$ac_save_LIBS
43399for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
43400do
43401  # Don't even attempt the hair of trying to link an X program!
43402  for ac_extension in a so sl dylib la dll; do
43403    if test -r "$ac_dir/libX11.$ac_extension"; then
43404      ac_x_libraries=$ac_dir
43405      break 2
43406    fi
43407  done
43408done
43409fi
43410rm -f core conftest.err conftest.$ac_objext \
43411    conftest$ac_exeext conftest.$ac_ext
43412fi # $ac_x_libraries = no
43413
43414case $ac_x_includes,$ac_x_libraries in #(
43415  no,* | *,no | *\'*)
43416    # Didn't find X, or a directory has "'" in its name.
43417    ac_cv_have_x="have_x=no";; #(
43418  *)
43419    # Record where we found X for the cache.
43420    ac_cv_have_x="have_x=yes\
43421	ac_x_includes='$ac_x_includes'\
43422	ac_x_libraries='$ac_x_libraries'"
43423esac
43424fi
43425;; #(
43426    *) have_x=yes;;
43427  esac
43428  eval "$ac_cv_have_x"
43429fi # $with_x != no
43430
43431if test "$have_x" != yes; then
43432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43433$as_echo "$have_x" >&6; }
43434  no_x=yes
43435else
43436  # If each of the values was on the command line, it overrides each guess.
43437  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43438  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43439  # Update the cache value to reflect the command line values.
43440  ac_cv_have_x="have_x=yes\
43441	ac_x_includes='$x_includes'\
43442	ac_x_libraries='$x_libraries'"
43443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43444$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43445fi
43446
43447    if test "$no_x" = yes; then
43448  # Not all programs may use this symbol, but it does not hurt to define it.
43449
43450$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43451
43452  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43453else
43454  if test -n "$x_includes"; then
43455    X_CFLAGS="$X_CFLAGS -I$x_includes"
43456  fi
43457
43458  # It would also be nice to do this for all -L options, not just this one.
43459  if test -n "$x_libraries"; then
43460    X_LIBS="$X_LIBS -L$x_libraries"
43461    # For Solaris; some versions of Sun CC require a space after -R and
43462    # others require no space.  Words are not sufficient . . . .
43463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43464$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43465    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43466    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43467    ac_cxx_werror_flag=yes
43468    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43469/* end confdefs.h.  */
43470
43471int
43472main ()
43473{
43474
43475  ;
43476  return 0;
43477}
43478_ACEOF
43479if ac_fn_cxx_try_link "$LINENO"; then :
43480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43481$as_echo "no" >&6; }
43482       X_LIBS="$X_LIBS -R$x_libraries"
43483else
43484  LIBS="$ac_xsave_LIBS -R $x_libraries"
43485       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43486/* end confdefs.h.  */
43487
43488int
43489main ()
43490{
43491
43492  ;
43493  return 0;
43494}
43495_ACEOF
43496if ac_fn_cxx_try_link "$LINENO"; then :
43497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43498$as_echo "yes" >&6; }
43499	  X_LIBS="$X_LIBS -R $x_libraries"
43500else
43501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43502$as_echo "neither works" >&6; }
43503fi
43504rm -f core conftest.err conftest.$ac_objext \
43505    conftest$ac_exeext conftest.$ac_ext
43506fi
43507rm -f core conftest.err conftest.$ac_objext \
43508    conftest$ac_exeext conftest.$ac_ext
43509    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43510    LIBS=$ac_xsave_LIBS
43511  fi
43512
43513  # Check for system-dependent libraries X programs must link with.
43514  # Do this before checking for the system-independent R6 libraries
43515  # (-lICE), since we may need -lsocket or whatever for X linking.
43516
43517  if test "$ISC" = yes; then
43518    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43519  else
43520    # Martyn Johnson says this is needed for Ultrix, if the X
43521    # libraries were built with DECnet support.  And Karl Berry says
43522    # the Alpha needs dnet_stub (dnet does not exist).
43523    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43524    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43525/* end confdefs.h.  */
43526
43527/* Override any GCC internal prototype to avoid an error.
43528   Use char because int might match the return type of a GCC
43529   builtin and then its argument prototype would still apply.  */
43530#ifdef __cplusplus
43531extern "C"
43532#endif
43533char XOpenDisplay ();
43534int
43535main ()
43536{
43537return XOpenDisplay ();
43538  ;
43539  return 0;
43540}
43541_ACEOF
43542if ac_fn_cxx_try_link "$LINENO"; then :
43543
43544else
43545  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43546$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43547if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43548  $as_echo_n "(cached) " >&6
43549else
43550  ac_check_lib_save_LIBS=$LIBS
43551LIBS="-ldnet  $LIBS"
43552cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43553/* end confdefs.h.  */
43554
43555/* Override any GCC internal prototype to avoid an error.
43556   Use char because int might match the return type of a GCC
43557   builtin and then its argument prototype would still apply.  */
43558#ifdef __cplusplus
43559extern "C"
43560#endif
43561char dnet_ntoa ();
43562int
43563main ()
43564{
43565return dnet_ntoa ();
43566  ;
43567  return 0;
43568}
43569_ACEOF
43570if ac_fn_cxx_try_link "$LINENO"; then :
43571  ac_cv_lib_dnet_dnet_ntoa=yes
43572else
43573  ac_cv_lib_dnet_dnet_ntoa=no
43574fi
43575rm -f core conftest.err conftest.$ac_objext \
43576    conftest$ac_exeext conftest.$ac_ext
43577LIBS=$ac_check_lib_save_LIBS
43578fi
43579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43580$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43581if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43582  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43583fi
43584
43585    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43586      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43587$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43588if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43589  $as_echo_n "(cached) " >&6
43590else
43591  ac_check_lib_save_LIBS=$LIBS
43592LIBS="-ldnet_stub  $LIBS"
43593cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43594/* end confdefs.h.  */
43595
43596/* Override any GCC internal prototype to avoid an error.
43597   Use char because int might match the return type of a GCC
43598   builtin and then its argument prototype would still apply.  */
43599#ifdef __cplusplus
43600extern "C"
43601#endif
43602char dnet_ntoa ();
43603int
43604main ()
43605{
43606return dnet_ntoa ();
43607  ;
43608  return 0;
43609}
43610_ACEOF
43611if ac_fn_cxx_try_link "$LINENO"; then :
43612  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43613else
43614  ac_cv_lib_dnet_stub_dnet_ntoa=no
43615fi
43616rm -f core conftest.err conftest.$ac_objext \
43617    conftest$ac_exeext conftest.$ac_ext
43618LIBS=$ac_check_lib_save_LIBS
43619fi
43620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43621$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43622if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43623  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43624fi
43625
43626    fi
43627fi
43628rm -f core conftest.err conftest.$ac_objext \
43629    conftest$ac_exeext conftest.$ac_ext
43630    LIBS="$ac_xsave_LIBS"
43631
43632    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43633    # to get the SysV transport functions.
43634    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43635    # needs -lnsl.
43636    # The nsl library prevents programs from opening the X display
43637    # on Irix 5.2, according to T.E. Dickey.
43638    # The functions gethostbyname, getservbyname, and inet_addr are
43639    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43640    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43641if test "x$ac_cv_func_gethostbyname" = xyes; then :
43642
43643fi
43644
43645    if test $ac_cv_func_gethostbyname = no; then
43646      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43647$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43648if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43649  $as_echo_n "(cached) " >&6
43650else
43651  ac_check_lib_save_LIBS=$LIBS
43652LIBS="-lnsl  $LIBS"
43653cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43654/* end confdefs.h.  */
43655
43656/* Override any GCC internal prototype to avoid an error.
43657   Use char because int might match the return type of a GCC
43658   builtin and then its argument prototype would still apply.  */
43659#ifdef __cplusplus
43660extern "C"
43661#endif
43662char gethostbyname ();
43663int
43664main ()
43665{
43666return gethostbyname ();
43667  ;
43668  return 0;
43669}
43670_ACEOF
43671if ac_fn_cxx_try_link "$LINENO"; then :
43672  ac_cv_lib_nsl_gethostbyname=yes
43673else
43674  ac_cv_lib_nsl_gethostbyname=no
43675fi
43676rm -f core conftest.err conftest.$ac_objext \
43677    conftest$ac_exeext conftest.$ac_ext
43678LIBS=$ac_check_lib_save_LIBS
43679fi
43680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43681$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43682if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43683  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43684fi
43685
43686      if test $ac_cv_lib_nsl_gethostbyname = no; then
43687	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43688$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43689if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43690  $as_echo_n "(cached) " >&6
43691else
43692  ac_check_lib_save_LIBS=$LIBS
43693LIBS="-lbsd  $LIBS"
43694cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43695/* end confdefs.h.  */
43696
43697/* Override any GCC internal prototype to avoid an error.
43698   Use char because int might match the return type of a GCC
43699   builtin and then its argument prototype would still apply.  */
43700#ifdef __cplusplus
43701extern "C"
43702#endif
43703char gethostbyname ();
43704int
43705main ()
43706{
43707return gethostbyname ();
43708  ;
43709  return 0;
43710}
43711_ACEOF
43712if ac_fn_cxx_try_link "$LINENO"; then :
43713  ac_cv_lib_bsd_gethostbyname=yes
43714else
43715  ac_cv_lib_bsd_gethostbyname=no
43716fi
43717rm -f core conftest.err conftest.$ac_objext \
43718    conftest$ac_exeext conftest.$ac_ext
43719LIBS=$ac_check_lib_save_LIBS
43720fi
43721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43722$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43723if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43724  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43725fi
43726
43727      fi
43728    fi
43729
43730    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43731    # socket/setsockopt and other routines are undefined under SCO ODT
43732    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43733    # on later versions), says Simon Leinen: it contains gethostby*
43734    # variants that don't use the name server (or something).  -lsocket
43735    # must be given before -lnsl if both are needed.  We assume that
43736    # if connect needs -lnsl, so does gethostbyname.
43737    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43738if test "x$ac_cv_func_connect" = xyes; then :
43739
43740fi
43741
43742    if test $ac_cv_func_connect = no; then
43743      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43744$as_echo_n "checking for connect in -lsocket... " >&6; }
43745if ${ac_cv_lib_socket_connect+:} false; then :
43746  $as_echo_n "(cached) " >&6
43747else
43748  ac_check_lib_save_LIBS=$LIBS
43749LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43750cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43751/* end confdefs.h.  */
43752
43753/* Override any GCC internal prototype to avoid an error.
43754   Use char because int might match the return type of a GCC
43755   builtin and then its argument prototype would still apply.  */
43756#ifdef __cplusplus
43757extern "C"
43758#endif
43759char connect ();
43760int
43761main ()
43762{
43763return connect ();
43764  ;
43765  return 0;
43766}
43767_ACEOF
43768if ac_fn_cxx_try_link "$LINENO"; then :
43769  ac_cv_lib_socket_connect=yes
43770else
43771  ac_cv_lib_socket_connect=no
43772fi
43773rm -f core conftest.err conftest.$ac_objext \
43774    conftest$ac_exeext conftest.$ac_ext
43775LIBS=$ac_check_lib_save_LIBS
43776fi
43777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43778$as_echo "$ac_cv_lib_socket_connect" >&6; }
43779if test "x$ac_cv_lib_socket_connect" = xyes; then :
43780  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43781fi
43782
43783    fi
43784
43785    # Guillermo Gomez says -lposix is necessary on A/UX.
43786    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43787if test "x$ac_cv_func_remove" = xyes; then :
43788
43789fi
43790
43791    if test $ac_cv_func_remove = no; then
43792      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43793$as_echo_n "checking for remove in -lposix... " >&6; }
43794if ${ac_cv_lib_posix_remove+:} false; then :
43795  $as_echo_n "(cached) " >&6
43796else
43797  ac_check_lib_save_LIBS=$LIBS
43798LIBS="-lposix  $LIBS"
43799cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43800/* end confdefs.h.  */
43801
43802/* Override any GCC internal prototype to avoid an error.
43803   Use char because int might match the return type of a GCC
43804   builtin and then its argument prototype would still apply.  */
43805#ifdef __cplusplus
43806extern "C"
43807#endif
43808char remove ();
43809int
43810main ()
43811{
43812return remove ();
43813  ;
43814  return 0;
43815}
43816_ACEOF
43817if ac_fn_cxx_try_link "$LINENO"; then :
43818  ac_cv_lib_posix_remove=yes
43819else
43820  ac_cv_lib_posix_remove=no
43821fi
43822rm -f core conftest.err conftest.$ac_objext \
43823    conftest$ac_exeext conftest.$ac_ext
43824LIBS=$ac_check_lib_save_LIBS
43825fi
43826{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43827$as_echo "$ac_cv_lib_posix_remove" >&6; }
43828if test "x$ac_cv_lib_posix_remove" = xyes; then :
43829  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43830fi
43831
43832    fi
43833
43834    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43835    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43836if test "x$ac_cv_func_shmat" = xyes; then :
43837
43838fi
43839
43840    if test $ac_cv_func_shmat = no; then
43841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43842$as_echo_n "checking for shmat in -lipc... " >&6; }
43843if ${ac_cv_lib_ipc_shmat+:} false; then :
43844  $as_echo_n "(cached) " >&6
43845else
43846  ac_check_lib_save_LIBS=$LIBS
43847LIBS="-lipc  $LIBS"
43848cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43849/* end confdefs.h.  */
43850
43851/* Override any GCC internal prototype to avoid an error.
43852   Use char because int might match the return type of a GCC
43853   builtin and then its argument prototype would still apply.  */
43854#ifdef __cplusplus
43855extern "C"
43856#endif
43857char shmat ();
43858int
43859main ()
43860{
43861return shmat ();
43862  ;
43863  return 0;
43864}
43865_ACEOF
43866if ac_fn_cxx_try_link "$LINENO"; then :
43867  ac_cv_lib_ipc_shmat=yes
43868else
43869  ac_cv_lib_ipc_shmat=no
43870fi
43871rm -f core conftest.err conftest.$ac_objext \
43872    conftest$ac_exeext conftest.$ac_ext
43873LIBS=$ac_check_lib_save_LIBS
43874fi
43875{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43876$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43877if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43878  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43879fi
43880
43881    fi
43882  fi
43883
43884  # Check for libraries that X11R6 Xt/Xaw programs need.
43885  ac_save_LDFLAGS=$LDFLAGS
43886  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43887  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43888  # check for ICE first), but we must link in the order -lSM -lICE or
43889  # we get undefined symbols.  So assume we have SM if we have ICE.
43890  # These have to be linked with before -lX11, unlike the other
43891  # libraries we check for below, so use a different variable.
43892  # John Interrante, Karl Berry
43893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43894$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43895if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43896  $as_echo_n "(cached) " >&6
43897else
43898  ac_check_lib_save_LIBS=$LIBS
43899LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43900cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43901/* end confdefs.h.  */
43902
43903/* Override any GCC internal prototype to avoid an error.
43904   Use char because int might match the return type of a GCC
43905   builtin and then its argument prototype would still apply.  */
43906#ifdef __cplusplus
43907extern "C"
43908#endif
43909char IceConnectionNumber ();
43910int
43911main ()
43912{
43913return IceConnectionNumber ();
43914  ;
43915  return 0;
43916}
43917_ACEOF
43918if ac_fn_cxx_try_link "$LINENO"; then :
43919  ac_cv_lib_ICE_IceConnectionNumber=yes
43920else
43921  ac_cv_lib_ICE_IceConnectionNumber=no
43922fi
43923rm -f core conftest.err conftest.$ac_objext \
43924    conftest$ac_exeext conftest.$ac_ext
43925LIBS=$ac_check_lib_save_LIBS
43926fi
43927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43928$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43929if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43930  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43931fi
43932
43933  LDFLAGS=$ac_save_LDFLAGS
43934
43935fi
43936
43937
43938    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43939    # this doesn't make sense so we remove it.
43940    if test "x$COMPILE_TYPE" = xcross; then
43941      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43942    fi
43943
43944    if test "x$no_x" = xyes; then
43945
43946  # Print a helpful message on how to acquire the necessary build dependency.
43947  # x11 is the help tag: freetype, cups, pulse, alsa etc
43948  MISSING_DEPENDENCY=x11
43949
43950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43951    cygwin_help $MISSING_DEPENDENCY
43952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43953    msys_help $MISSING_DEPENDENCY
43954  else
43955    PKGHANDLER_COMMAND=
43956
43957    case $PKGHANDLER in
43958      apt-get)
43959        apt_help     $MISSING_DEPENDENCY ;;
43960      yum)
43961        yum_help     $MISSING_DEPENDENCY ;;
43962      port)
43963        port_help    $MISSING_DEPENDENCY ;;
43964      pkgutil)
43965        pkgutil_help $MISSING_DEPENDENCY ;;
43966      pkgadd)
43967        pkgadd_help  $MISSING_DEPENDENCY ;;
43968    esac
43969
43970    if test "x$PKGHANDLER_COMMAND" != x; then
43971      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43972    fi
43973  fi
43974
43975      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43976    fi
43977
43978    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43979      OPENWIN_HOME="/usr/openwin"
43980      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43981      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43982          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43983          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43984          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43985    fi
43986
43987    ac_ext=c
43988ac_cpp='$CPP $CPPFLAGS'
43989ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43990ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43991ac_compiler_gnu=$ac_cv_c_compiler_gnu
43992
43993    OLD_CFLAGS="$CFLAGS"
43994    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
43995
43996    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43997    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43998do :
43999  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44000ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
44001          # include <X11/Xlib.h>
44002          # include <X11/Xutil.h>
44003
44004
44005"
44006if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44007  cat >>confdefs.h <<_ACEOF
44008#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44009_ACEOF
44010 X11_HEADERS_OK=yes
44011else
44012  X11_HEADERS_OK=no; break
44013fi
44014
44015done
44016
44017
44018    if test "x$X11_HEADERS_OK" = xno; then
44019
44020  # Print a helpful message on how to acquire the necessary build dependency.
44021  # x11 is the help tag: freetype, cups, pulse, alsa etc
44022  MISSING_DEPENDENCY=x11
44023
44024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44025    cygwin_help $MISSING_DEPENDENCY
44026  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44027    msys_help $MISSING_DEPENDENCY
44028  else
44029    PKGHANDLER_COMMAND=
44030
44031    case $PKGHANDLER in
44032      apt-get)
44033        apt_help     $MISSING_DEPENDENCY ;;
44034      yum)
44035        yum_help     $MISSING_DEPENDENCY ;;
44036      port)
44037        port_help    $MISSING_DEPENDENCY ;;
44038      pkgutil)
44039        pkgutil_help $MISSING_DEPENDENCY ;;
44040      pkgadd)
44041        pkgadd_help  $MISSING_DEPENDENCY ;;
44042    esac
44043
44044    if test "x$PKGHANDLER_COMMAND" != x; then
44045      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44046    fi
44047  fi
44048
44049      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
44050    fi
44051
44052    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
44053    # defined in libawt_xawt.
44054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
44055$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
44056    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
44057/* end confdefs.h.  */
44058#include <X11/extensions/Xrender.h>
44059int
44060main ()
44061{
44062XLinearGradient x;
44063  ;
44064  return 0;
44065}
44066_ACEOF
44067if ac_fn_c_try_compile "$LINENO"; then :
44068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44069$as_echo "yes" >&6; }
44070else
44071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44072$as_echo "no" >&6; }
44073         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
44074fi
44075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
44076
44077    CFLAGS="$OLD_CFLAGS"
44078    ac_ext=cpp
44079ac_cpp='$CXXCPP $CPPFLAGS'
44080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
44081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
44082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
44083
44084  fi # X11_NOT_NEEDED
44085
44086
44087
44088
44089
44090
44091  ###############################################################################
44092  #
44093  # The common unix printing system cups is used to print from java.
44094  #
44095
44096# Check whether --with-cups was given.
44097if test "${with_cups+set}" = set; then :
44098  withval=$with_cups;
44099fi
44100
44101
44102# Check whether --with-cups-include was given.
44103if test "${with_cups_include+set}" = set; then :
44104  withval=$with_cups_include;
44105fi
44106
44107
44108  if test "x$CUPS_NOT_NEEDED" = xyes; then
44109    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
44110      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
44111$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
44112    fi
44113    CUPS_CFLAGS=
44114  else
44115    CUPS_FOUND=no
44116
44117    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
44118      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
44119    fi
44120
44121    if test "x${with_cups}" != x; then
44122      CUPS_CFLAGS="-I${with_cups}/include"
44123      CUPS_FOUND=yes
44124    fi
44125    if test "x${with_cups_include}" != x; then
44126      CUPS_CFLAGS="-I${with_cups_include}"
44127      CUPS_FOUND=yes
44128    fi
44129    if test "x$CUPS_FOUND" = xno; then
44130
44131
44132  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44133    # Source the builddeps file again, to make sure it uses the latest variables!
44134    . $builddepsfile
44135    # Look for a target and build machine specific resource!
44136    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44137    if test "x$resource" = x; then
44138      # Ok, lets instead look for a target specific resource
44139      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
44140    fi
44141    if test "x$resource" = x; then
44142      # Ok, lets instead look for a build specific resource
44143      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
44144    fi
44145    if test "x$resource" = x; then
44146      # Ok, lets instead look for a generic resource
44147      # (The cups comes from M4 and not the shell, thus no need for eval here.)
44148      resource=${builddep_cups}
44149    fi
44150    if test "x$resource" != x; then
44151      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
44152$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
44153      # If the resource in the builddeps.conf file is an existing directory,
44154      # for example /java/linux/cups
44155      if test -d ${resource}; then
44156        depdir=${resource}
44157      else
44158
44159  # cups is for example mymodule
44160  # $resource is for example libs/general/libmymod_1_2_3.zip
44161  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44162  # $with_builddeps_dir is for example /localhome/builddeps
44163  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44164  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44165  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44166  filename=`basename $resource`
44167  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44168  filebase=${filename%%.*}
44169  extension=${filename#*.}
44170  installdir=$with_builddeps_dir/$filebase
44171  if test ! -f $installdir/$filename.unpacked; then
44172    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
44173$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44174    if test ! -d $installdir; then
44175      mkdir -p $installdir
44176    fi
44177    if test ! -d $installdir; then
44178      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44179    fi
44180    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
44181    touch $tmpfile
44182    if test ! -f $tmpfile; then
44183      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44184    fi
44185
44186  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44187  # $tmpfile is the local file name for the downloaded file.
44188  VALID_TOOL=no
44189  if test "x$BDEPS_FTP" = xwget; then
44190    VALID_TOOL=yes
44191    wget -O $tmpfile $with_builddeps_server/$resource
44192  fi
44193  if test "x$BDEPS_FTP" = xlftp; then
44194    VALID_TOOL=yes
44195    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44196  fi
44197  if test "x$BDEPS_FTP" = xftp; then
44198    VALID_TOOL=yes
44199    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44200    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44201    FTPUSERPWD=${FTPSERVER%%@*}
44202    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44203      FTPUSER=${userpwd%%:*}
44204      FTPPWD=${userpwd#*@}
44205      FTPSERVER=${FTPSERVER#*@}
44206    else
44207      FTPUSER=ftp
44208      FTPPWD=ftp
44209    fi
44210    # the "pass" command does not work on some
44211    # ftp clients (read ftp.exe) but if it works,
44212    # passive mode is better!
44213    ( \
44214        echo "user $FTPUSER $FTPPWD"        ; \
44215        echo "pass"                         ; \
44216        echo "bin"                          ; \
44217        echo "get $FTPPATH $tmpfile"              ; \
44218    ) | ftp -in $FTPSERVER
44219  fi
44220  if test "x$VALID_TOOL" != xyes; then
44221    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44222  fi
44223
44224    mv $tmpfile $installdir/$filename
44225    if test ! -s $installdir/$filename; then
44226      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44227    fi
44228    case "$extension" in
44229      zip)  echo "Unzipping $installdir/$filename..."
44230        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44231        ;;
44232      tar.gz) echo "Untaring $installdir/$filename..."
44233        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44234        ;;
44235      tgz) echo "Untaring $installdir/$filename..."
44236        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44237        ;;
44238      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44239        ;;
44240    esac
44241  fi
44242  if test -f $installdir/$filename.unpacked; then
44243    depdir=$installdir
44244  fi
44245
44246      fi
44247      # Source the builddeps file again, because in the previous command, the depdir
44248      # was updated to point at the current build dependency install directory.
44249      . $builddepsfile
44250      # Now extract variables from the builddeps.conf files.
44251      theroot=${builddep_cups_ROOT}
44252      thecflags=${builddep_cups_CFLAGS}
44253      thelibs=${builddep_cups_LIBS}
44254      if test "x$depdir" = x; then
44255        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
44256      fi
44257      CUPS=$depdir
44258      if test "x$theroot" != x; then
44259        CUPS="$theroot"
44260      fi
44261      if test "x$thecflags" != x; then
44262        CUPS_CFLAGS="$thecflags"
44263      fi
44264      if test "x$thelibs" != x; then
44265        CUPS_LIBS="$thelibs"
44266      fi
44267      CUPS_FOUND=yes
44268
44269    fi
44270
44271  fi
44272
44273    fi
44274    if test "x$CUPS_FOUND" = xno; then
44275      # Are the cups headers installed in the default /usr/include location?
44276      for ac_header in cups/cups.h cups/ppd.h
44277do :
44278  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
44279ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
44280if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
44281  cat >>confdefs.h <<_ACEOF
44282#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
44283_ACEOF
44284
44285            CUPS_FOUND=yes
44286            CUPS_CFLAGS=
44287            DEFAULT_CUPS=yes
44288
44289
44290fi
44291
44292done
44293
44294    fi
44295    if test "x$CUPS_FOUND" = xno; then
44296      # Getting nervous now? Lets poke around for standard Solaris third-party
44297      # package installation locations.
44298      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
44299$as_echo_n "checking for cups headers... " >&6; }
44300      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
44301        # An SFW package seems to be installed!
44302        CUPS_FOUND=yes
44303        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
44304      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
44305        # A CSW package seems to be installed!
44306        CUPS_FOUND=yes
44307        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
44308      fi
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
44310$as_echo "$CUPS_FOUND" >&6; }
44311    fi
44312    if test "x$CUPS_FOUND" = xno; then
44313
44314  # Print a helpful message on how to acquire the necessary build dependency.
44315  # cups is the help tag: freetype, cups, pulse, alsa etc
44316  MISSING_DEPENDENCY=cups
44317
44318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44319    cygwin_help $MISSING_DEPENDENCY
44320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44321    msys_help $MISSING_DEPENDENCY
44322  else
44323    PKGHANDLER_COMMAND=
44324
44325    case $PKGHANDLER in
44326      apt-get)
44327        apt_help     $MISSING_DEPENDENCY ;;
44328      yum)
44329        yum_help     $MISSING_DEPENDENCY ;;
44330      port)
44331        port_help    $MISSING_DEPENDENCY ;;
44332      pkgutil)
44333        pkgutil_help $MISSING_DEPENDENCY ;;
44334      pkgadd)
44335        pkgadd_help  $MISSING_DEPENDENCY ;;
44336    esac
44337
44338    if test "x$PKGHANDLER_COMMAND" != x; then
44339      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
44340    fi
44341  fi
44342
44343      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
44344    fi
44345  fi
44346
44347
44348
44349
44350
44351
44352  ###############################################################################
44353  #
44354  # The ubiquitous freetype library is used to render fonts.
44355  #
44356
44357# Check whether --with-freetype was given.
44358if test "${with_freetype+set}" = set; then :
44359  withval=$with_freetype;
44360fi
44361
44362
44363# Check whether --with-freetype-include was given.
44364if test "${with_freetype_include+set}" = set; then :
44365  withval=$with_freetype_include;
44366fi
44367
44368
44369# Check whether --with-freetype-lib was given.
44370if test "${with_freetype_lib+set}" = set; then :
44371  withval=$with_freetype_lib;
44372fi
44373
44374
44375# Check whether --with-freetype-src was given.
44376if test "${with_freetype_src+set}" = set; then :
44377  withval=$with_freetype_src;
44378fi
44379
44380  # Check whether --enable-freetype-bundling was given.
44381if test "${enable_freetype_bundling+set}" = set; then :
44382  enableval=$enable_freetype_bundling;
44383fi
44384
44385
44386  # Need to specify explicitly since it needs to be overridden on some versions of macosx
44387  FREETYPE_BASE_NAME=freetype
44388  FREETYPE_CFLAGS=
44389  FREETYPE_LIBS=
44390  FREETYPE_BUNDLE_LIB_PATH=
44391
44392  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
44393    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
44394      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
44395$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
44396    fi
44397    if test "x$enable_freetype_bundling" != x; then
44398      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
44399$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
44400    fi
44401  else
44402    # freetype is needed to build; go get it!
44403
44404    BUNDLE_FREETYPE="$enable_freetype_bundling"
44405
44406    if  test "x$with_freetype_src" != x; then
44407      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44408        # Try to build freetype if --with-freetype-src was given on Windows
44409
44410  FREETYPE_SRC_PATH="$with_freetype_src"
44411  BUILD_FREETYPE=yes
44412
44413  # Check if the freetype sources are acessible..
44414  if ! test -d $FREETYPE_SRC_PATH; then
44415    { $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
44416$as_echo "$as_me: WARNING: --with-freetype-src specified, but can't find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
44417    BUILD_FREETYPE=no
44418  fi
44419  # ..and contain a vc2010 project file
44420  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
44421  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
44422    { $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
44423$as_echo "$as_me: WARNING: Can't find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
44424    BUILD_FREETYPE=no
44425  fi
44426  # Now check if configure found a version of 'msbuild.exe'
44427  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
44428    { $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
44429$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;}
44430    BUILD_FREETYPE=no
44431  fi
44432
44433  # Ready to go..
44434  if test "x$BUILD_FREETYPE" = xyes; then
44435
44436    # msbuild requires trailing slashes for output directories
44437    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
44438    freetype_lib_path_unix="$freetype_lib_path"
44439    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
44440
44441  unix_path="$vcxproj_path"
44442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44443    windows_path=`$CYGPATH -m "$unix_path"`
44444    vcxproj_path="$windows_path"
44445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44446    windows_path=`cmd //c echo $unix_path`
44447    vcxproj_path="$windows_path"
44448  fi
44449
44450
44451  unix_path="$freetype_lib_path"
44452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44453    windows_path=`$CYGPATH -m "$unix_path"`
44454    freetype_lib_path="$windows_path"
44455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44456    windows_path=`cmd //c echo $unix_path`
44457    freetype_lib_path="$windows_path"
44458  fi
44459
44460
44461  unix_path="$freetype_obj_path"
44462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44463    windows_path=`$CYGPATH -m "$unix_path"`
44464    freetype_obj_path="$windows_path"
44465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44466    windows_path=`cmd //c echo $unix_path`
44467    freetype_obj_path="$windows_path"
44468  fi
44469
44470    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
44471      freetype_platform=x64
44472    else
44473      freetype_platform=win32
44474    fi
44475
44476    # The original freetype project file is for VS 2010 (i.e. 'v100'),
44477    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
44478    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
44479    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
44480    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
44481$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
44482
44483    # First we try to build the freetype.dll
44484    $ECHO -e "@echo off\n"\
44485	     "$MSBUILD $vcxproj_path "\
44486		       "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44487		       "/p:Configuration=\"Release Multithreaded\" "\
44488		       "/p:Platform=$freetype_platform "\
44489		       "/p:ConfigurationType=DynamicLibrary "\
44490		       "/p:TargetName=freetype "\
44491		       "/p:OutDir=\"$freetype_lib_path\" "\
44492		       "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
44493    cmd /c freetype.bat
44494
44495    if test -s "$freetype_lib_path_unix/freetype.dll"; then
44496      # If that succeeds we also build freetype.lib
44497      $ECHO -e "@echo off\n"\
44498	       "$MSBUILD $vcxproj_path "\
44499			 "/p:PlatformToolset=$PLATFORM_TOOLSET "\
44500			 "/p:Configuration=\"Release Multithreaded\" "\
44501			 "/p:Platform=$freetype_platform "\
44502			 "/p:ConfigurationType=StaticLibrary "\
44503			 "/p:TargetName=freetype "\
44504			 "/p:OutDir=\"$freetype_lib_path\" "\
44505			 "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
44506      cmd /c freetype.bat
44507
44508      if test -s "$freetype_lib_path_unix/freetype.lib"; then
44509	# Once we build both, lib and dll, set freetype lib and include path appropriately
44510	POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
44511	POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
44512	{ $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
44513$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
44514      else
44515	BUILD_FREETYPE=no
44516      fi
44517    else
44518      BUILD_FREETYPE=no
44519    fi
44520  fi
44521
44522        if test "x$BUILD_FREETYPE" = xyes; then
44523          # Okay, we built it. Check that it works.
44524
44525  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44526  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44527  METHOD="--with-freetype-src"
44528
44529  # Let's start with an optimistic view of the world :-)
44530  FOUND_FREETYPE=yes
44531
44532  # First look for the canonical freetype main include file ft2build.h.
44533  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44534    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44535    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44536    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44537      # Fail.
44538      FOUND_FREETYPE=no
44539    fi
44540  fi
44541
44542  if test "x$FOUND_FREETYPE" = xyes; then
44543    # Include file found, let's continue the sanity check.
44544    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44545$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44546
44547    # Reset to default value
44548    FREETYPE_BASE_NAME=freetype
44549    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44550    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44551      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44552          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44553        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44554        # for the .6 version explicitly.
44555        FREETYPE_BASE_NAME=freetype.6
44556        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44557        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44558$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44559      else
44560        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44561$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44562        FOUND_FREETYPE=no
44563      fi
44564    else
44565      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44566        # On Windows, we will need both .lib and .dll file.
44567        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44568          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44569$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44570          FOUND_FREETYPE=no
44571        fi
44572      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44573          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44574        # Found lib in isa dir, use that instead.
44575        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44576        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44577$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44578      fi
44579    fi
44580  fi
44581
44582  if test "x$FOUND_FREETYPE" = xyes; then
44583
44584  # Only process if variable expands to non-empty
44585
44586  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44587    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44588
44589  # Input might be given as Windows format, start by converting to
44590  # unix format.
44591  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44592  new_path=`$CYGPATH -u "$path"`
44593
44594  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44595  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44596  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44597  # "foo.exe" is OK but "foo" is an error.
44598  #
44599  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44600  # It is also a way to make sure we got the proper file name for the real test later on.
44601  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44602  if test "x$test_shortpath" = x; then
44603    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44604$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44605    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44606  fi
44607
44608  # Call helper function which possibly converts this using DOS-style short mode.
44609  # If so, the updated path is stored in $new_path.
44610
44611  input_path="$new_path"
44612  # Check if we need to convert this using DOS-style short mode. If the path
44613  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44614  # take no chances and rewrite it.
44615  # Note: m4 eats our [], so we need to use [ and ] instead.
44616  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44617  if test "x$has_forbidden_chars" != x; then
44618    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44619    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44620    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44621    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44622      # Going to short mode and back again did indeed matter. Since short mode is
44623      # case insensitive, let's make it lowercase to improve readability.
44624      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44625      # Now convert it back to Unix-stile (cygpath)
44626      input_path=`$CYGPATH -u "$shortmode_path"`
44627      new_path="$input_path"
44628    fi
44629  fi
44630
44631  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44632  if test "x$test_cygdrive_prefix" = x; then
44633    # As a simple fix, exclude /usr/bin since it's not a real path.
44634    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44635      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44636      # a path prefixed by /cygdrive for fixpath to work.
44637      new_path="$CYGWIN_ROOT_PATH$input_path"
44638    fi
44639  fi
44640
44641
44642  if test "x$path" != "x$new_path"; then
44643    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44645$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44646  fi
44647
44648    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44649
44650  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44651  has_colon=`$ECHO $path | $GREP ^.:`
44652  new_path="$path"
44653  if test "x$has_colon" = x; then
44654    # Not in mixed or Windows style, start by that.
44655    new_path=`cmd //c echo $path`
44656  fi
44657
44658
44659  input_path="$new_path"
44660  # Check if we need to convert this using DOS-style short mode. If the path
44661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44662  # take no chances and rewrite it.
44663  # Note: m4 eats our [], so we need to use [ and ] instead.
44664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44665  if test "x$has_forbidden_chars" != x; then
44666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44667    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44668  fi
44669
44670
44671  windows_path="$new_path"
44672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44673    unix_path=`$CYGPATH -u "$windows_path"`
44674    new_path="$unix_path"
44675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44677    new_path="$unix_path"
44678  fi
44679
44680  if test "x$path" != "x$new_path"; then
44681    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44682    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44683$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44684  fi
44685
44686  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44687  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44688
44689    else
44690      # We're on a unix platform. Hooray! :)
44691      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44692      has_space=`$ECHO "$path" | $GREP " "`
44693      if test "x$has_space" != x; then
44694        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44695$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44696        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44697      fi
44698
44699      # Use eval to expand a potential ~
44700      eval path="$path"
44701      if test ! -f "$path" && test ! -d "$path"; then
44702        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44703      fi
44704
44705      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44706    fi
44707  fi
44708
44709
44710  # Only process if variable expands to non-empty
44711
44712  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44713    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44714
44715  # Input might be given as Windows format, start by converting to
44716  # unix format.
44717  path="$POTENTIAL_FREETYPE_LIB_PATH"
44718  new_path=`$CYGPATH -u "$path"`
44719
44720  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44721  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44722  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44723  # "foo.exe" is OK but "foo" is an error.
44724  #
44725  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44726  # It is also a way to make sure we got the proper file name for the real test later on.
44727  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44728  if test "x$test_shortpath" = x; then
44729    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44730$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44731    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44732  fi
44733
44734  # Call helper function which possibly converts this using DOS-style short mode.
44735  # If so, the updated path is stored in $new_path.
44736
44737  input_path="$new_path"
44738  # Check if we need to convert this using DOS-style short mode. If the path
44739  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44740  # take no chances and rewrite it.
44741  # Note: m4 eats our [], so we need to use [ and ] instead.
44742  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44743  if test "x$has_forbidden_chars" != x; then
44744    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44745    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44746    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44747    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44748      # Going to short mode and back again did indeed matter. Since short mode is
44749      # case insensitive, let's make it lowercase to improve readability.
44750      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44751      # Now convert it back to Unix-stile (cygpath)
44752      input_path=`$CYGPATH -u "$shortmode_path"`
44753      new_path="$input_path"
44754    fi
44755  fi
44756
44757  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44758  if test "x$test_cygdrive_prefix" = x; then
44759    # As a simple fix, exclude /usr/bin since it's not a real path.
44760    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44761      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44762      # a path prefixed by /cygdrive for fixpath to work.
44763      new_path="$CYGWIN_ROOT_PATH$input_path"
44764    fi
44765  fi
44766
44767
44768  if test "x$path" != "x$new_path"; then
44769    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44771$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44772  fi
44773
44774    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44775
44776  path="$POTENTIAL_FREETYPE_LIB_PATH"
44777  has_colon=`$ECHO $path | $GREP ^.:`
44778  new_path="$path"
44779  if test "x$has_colon" = x; then
44780    # Not in mixed or Windows style, start by that.
44781    new_path=`cmd //c echo $path`
44782  fi
44783
44784
44785  input_path="$new_path"
44786  # Check if we need to convert this using DOS-style short mode. If the path
44787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44788  # take no chances and rewrite it.
44789  # Note: m4 eats our [], so we need to use [ and ] instead.
44790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44791  if test "x$has_forbidden_chars" != x; then
44792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44793    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44794  fi
44795
44796
44797  windows_path="$new_path"
44798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44799    unix_path=`$CYGPATH -u "$windows_path"`
44800    new_path="$unix_path"
44801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44803    new_path="$unix_path"
44804  fi
44805
44806  if test "x$path" != "x$new_path"; then
44807    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44808    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44809$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44810  fi
44811
44812  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44813  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44814
44815    else
44816      # We're on a unix platform. Hooray! :)
44817      path="$POTENTIAL_FREETYPE_LIB_PATH"
44818      has_space=`$ECHO "$path" | $GREP " "`
44819      if test "x$has_space" != x; then
44820        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44822        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44823      fi
44824
44825      # Use eval to expand a potential ~
44826      eval path="$path"
44827      if test ! -f "$path" && test ! -d "$path"; then
44828        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44829      fi
44830
44831      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44832    fi
44833  fi
44834
44835
44836    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44837    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44838$as_echo_n "checking for freetype includes... " >&6; }
44839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44840$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44841    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44842    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44843$as_echo_n "checking for freetype libraries... " >&6; }
44844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44845$as_echo "$FREETYPE_LIB_PATH" >&6; }
44846  fi
44847
44848          if test "x$FOUND_FREETYPE" != xyes; then
44849            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
44850          fi
44851        else
44852          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
44853$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
44854          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
44855        fi
44856      else
44857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
44858$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
44859      fi
44860    fi
44861
44862    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
44863      # User has specified settings
44864
44865      if test "x$BUNDLE_FREETYPE" = x; then
44866        # If not specified, default is to bundle freetype
44867        BUNDLE_FREETYPE=yes
44868      fi
44869
44870      if test "x$with_freetype" != x; then
44871        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
44872        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
44873      fi
44874
44875      # Allow --with-freetype-lib and --with-freetype-include to override
44876      if test "x$with_freetype_include" != x; then
44877        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
44878      fi
44879      if test "x$with_freetype_lib" != x; then
44880        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
44881      fi
44882
44883      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
44884        # Okay, we got it. Check that it works.
44885
44886  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44887  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44888  METHOD="--with-freetype"
44889
44890  # Let's start with an optimistic view of the world :-)
44891  FOUND_FREETYPE=yes
44892
44893  # First look for the canonical freetype main include file ft2build.h.
44894  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44895    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
44896    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
44897    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44898      # Fail.
44899      FOUND_FREETYPE=no
44900    fi
44901  fi
44902
44903  if test "x$FOUND_FREETYPE" = xyes; then
44904    # Include file found, let's continue the sanity check.
44905    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44906$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44907
44908    # Reset to default value
44909    FREETYPE_BASE_NAME=freetype
44910    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44911    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44912      if test "x$OPENJDK_TARGET_OS" = xmacosx \
44913          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
44914        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
44915        # for the .6 version explicitly.
44916        FREETYPE_BASE_NAME=freetype.6
44917        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
44918        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
44919$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
44920      else
44921        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44922$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44923        FOUND_FREETYPE=no
44924      fi
44925    else
44926      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44927        # On Windows, we will need both .lib and .dll file.
44928        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
44929          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
44930$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
44931          FOUND_FREETYPE=no
44932        fi
44933      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44934          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44935        # Found lib in isa dir, use that instead.
44936        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44937        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
44938$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
44939      fi
44940    fi
44941  fi
44942
44943  if test "x$FOUND_FREETYPE" = xyes; then
44944
44945  # Only process if variable expands to non-empty
44946
44947  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
44948    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44949
44950  # Input might be given as Windows format, start by converting to
44951  # unix format.
44952  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44953  new_path=`$CYGPATH -u "$path"`
44954
44955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44958  # "foo.exe" is OK but "foo" is an error.
44959  #
44960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44961  # It is also a way to make sure we got the proper file name for the real test later on.
44962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44963  if test "x$test_shortpath" = x; then
44964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44965$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44966    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44967  fi
44968
44969  # Call helper function which possibly converts this using DOS-style short mode.
44970  # If so, the updated path is stored in $new_path.
44971
44972  input_path="$new_path"
44973  # Check if we need to convert this using DOS-style short mode. If the path
44974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44975  # take no chances and rewrite it.
44976  # Note: m4 eats our [], so we need to use [ and ] instead.
44977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44978  if test "x$has_forbidden_chars" != x; then
44979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44983      # Going to short mode and back again did indeed matter. Since short mode is
44984      # case insensitive, let's make it lowercase to improve readability.
44985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44986      # Now convert it back to Unix-stile (cygpath)
44987      input_path=`$CYGPATH -u "$shortmode_path"`
44988      new_path="$input_path"
44989    fi
44990  fi
44991
44992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44993  if test "x$test_cygdrive_prefix" = x; then
44994    # As a simple fix, exclude /usr/bin since it's not a real path.
44995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44997      # a path prefixed by /cygdrive for fixpath to work.
44998      new_path="$CYGWIN_ROOT_PATH$input_path"
44999    fi
45000  fi
45001
45002
45003  if test "x$path" != "x$new_path"; then
45004    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45006$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45007  fi
45008
45009    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45010
45011  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45012  has_colon=`$ECHO $path | $GREP ^.:`
45013  new_path="$path"
45014  if test "x$has_colon" = x; then
45015    # Not in mixed or Windows style, start by that.
45016    new_path=`cmd //c echo $path`
45017  fi
45018
45019
45020  input_path="$new_path"
45021  # Check if we need to convert this using DOS-style short mode. If the path
45022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45023  # take no chances and rewrite it.
45024  # Note: m4 eats our [], so we need to use [ and ] instead.
45025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45026  if test "x$has_forbidden_chars" != x; then
45027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45029  fi
45030
45031
45032  windows_path="$new_path"
45033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45034    unix_path=`$CYGPATH -u "$windows_path"`
45035    new_path="$unix_path"
45036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45038    new_path="$unix_path"
45039  fi
45040
45041  if test "x$path" != "x$new_path"; then
45042    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45044$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45045  fi
45046
45047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45049
45050    else
45051      # We're on a unix platform. Hooray! :)
45052      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45053      has_space=`$ECHO "$path" | $GREP " "`
45054      if test "x$has_space" != x; then
45055        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45056$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45057        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45058      fi
45059
45060      # Use eval to expand a potential ~
45061      eval path="$path"
45062      if test ! -f "$path" && test ! -d "$path"; then
45063        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45064      fi
45065
45066      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45067    fi
45068  fi
45069
45070
45071  # Only process if variable expands to non-empty
45072
45073  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45074    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45075
45076  # Input might be given as Windows format, start by converting to
45077  # unix format.
45078  path="$POTENTIAL_FREETYPE_LIB_PATH"
45079  new_path=`$CYGPATH -u "$path"`
45080
45081  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45082  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45083  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45084  # "foo.exe" is OK but "foo" is an error.
45085  #
45086  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45087  # It is also a way to make sure we got the proper file name for the real test later on.
45088  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45089  if test "x$test_shortpath" = x; then
45090    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45091$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45092    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45093  fi
45094
45095  # Call helper function which possibly converts this using DOS-style short mode.
45096  # If so, the updated path is stored in $new_path.
45097
45098  input_path="$new_path"
45099  # Check if we need to convert this using DOS-style short mode. If the path
45100  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45101  # take no chances and rewrite it.
45102  # Note: m4 eats our [], so we need to use [ and ] instead.
45103  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45104  if test "x$has_forbidden_chars" != x; then
45105    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45106    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45107    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45108    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45109      # Going to short mode and back again did indeed matter. Since short mode is
45110      # case insensitive, let's make it lowercase to improve readability.
45111      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45112      # Now convert it back to Unix-stile (cygpath)
45113      input_path=`$CYGPATH -u "$shortmode_path"`
45114      new_path="$input_path"
45115    fi
45116  fi
45117
45118  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45119  if test "x$test_cygdrive_prefix" = x; then
45120    # As a simple fix, exclude /usr/bin since it's not a real path.
45121    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45122      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45123      # a path prefixed by /cygdrive for fixpath to work.
45124      new_path="$CYGWIN_ROOT_PATH$input_path"
45125    fi
45126  fi
45127
45128
45129  if test "x$path" != "x$new_path"; then
45130    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45131    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45132$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45133  fi
45134
45135    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45136
45137  path="$POTENTIAL_FREETYPE_LIB_PATH"
45138  has_colon=`$ECHO $path | $GREP ^.:`
45139  new_path="$path"
45140  if test "x$has_colon" = x; then
45141    # Not in mixed or Windows style, start by that.
45142    new_path=`cmd //c echo $path`
45143  fi
45144
45145
45146  input_path="$new_path"
45147  # Check if we need to convert this using DOS-style short mode. If the path
45148  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45149  # take no chances and rewrite it.
45150  # Note: m4 eats our [], so we need to use [ and ] instead.
45151  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45152  if test "x$has_forbidden_chars" != x; then
45153    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45154    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45155  fi
45156
45157
45158  windows_path="$new_path"
45159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45160    unix_path=`$CYGPATH -u "$windows_path"`
45161    new_path="$unix_path"
45162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45164    new_path="$unix_path"
45165  fi
45166
45167  if test "x$path" != "x$new_path"; then
45168    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45169    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45170$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45171  fi
45172
45173  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45174  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45175
45176    else
45177      # We're on a unix platform. Hooray! :)
45178      path="$POTENTIAL_FREETYPE_LIB_PATH"
45179      has_space=`$ECHO "$path" | $GREP " "`
45180      if test "x$has_space" != x; then
45181        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45182$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45183        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45184      fi
45185
45186      # Use eval to expand a potential ~
45187      eval path="$path"
45188      if test ! -f "$path" && test ! -d "$path"; then
45189        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45190      fi
45191
45192      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45193    fi
45194  fi
45195
45196
45197    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45199$as_echo_n "checking for freetype includes... " >&6; }
45200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45201$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45202    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45204$as_echo_n "checking for freetype libraries... " >&6; }
45205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45206$as_echo "$FREETYPE_LIB_PATH" >&6; }
45207  fi
45208
45209        if test "x$FOUND_FREETYPE" != xyes; then
45210          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
45211        fi
45212      else
45213        # User specified only one of lib or include. This is an error.
45214        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
45215          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
45216$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
45217          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45218        else
45219          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
45220$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
45221          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
45222        fi
45223      fi
45224    else
45225      # User did not specify settings, but we need freetype. Try to locate it.
45226
45227      if test "x$BUNDLE_FREETYPE" = x; then
45228        # If not specified, default is to bundle freetype only on windows
45229        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45230          BUNDLE_FREETYPE=yes
45231        else
45232          BUNDLE_FREETYPE=no
45233        fi
45234      fi
45235
45236      if test "x$FOUND_FREETYPE" != xyes; then
45237        # Check builddeps
45238
45239
45240  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
45241    # Source the builddeps file again, to make sure it uses the latest variables!
45242    . $builddepsfile
45243    # Look for a target and build machine specific resource!
45244    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
45245    if test "x$resource" = x; then
45246      # Ok, lets instead look for a target specific resource
45247      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
45248    fi
45249    if test "x$resource" = x; then
45250      # Ok, lets instead look for a build specific resource
45251      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
45252    fi
45253    if test "x$resource" = x; then
45254      # Ok, lets instead look for a generic resource
45255      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
45256      resource=${builddep_freetype2}
45257    fi
45258    if test "x$resource" != x; then
45259      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
45260$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
45261      # If the resource in the builddeps.conf file is an existing directory,
45262      # for example /java/linux/cups
45263      if test -d ${resource}; then
45264        depdir=${resource}
45265      else
45266
45267  # freetype2 is for example mymodule
45268  # $resource is for example libs/general/libmymod_1_2_3.zip
45269  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
45270  # $with_builddeps_dir is for example /localhome/builddeps
45271  # depdir is the name of the variable into which we store the depdir, eg MYMOD
45272  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
45273  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
45274  filename=`basename $resource`
45275  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
45276  filebase=${filename%%.*}
45277  extension=${filename#*.}
45278  installdir=$with_builddeps_dir/$filebase
45279  if test ! -f $installdir/$filename.unpacked; then
45280    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
45281$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
45282    if test ! -d $installdir; then
45283      mkdir -p $installdir
45284    fi
45285    if test ! -d $installdir; then
45286      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
45287    fi
45288    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
45289    touch $tmpfile
45290    if test ! -f $tmpfile; then
45291      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
45292    fi
45293
45294  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
45295  # $tmpfile is the local file name for the downloaded file.
45296  VALID_TOOL=no
45297  if test "x$BDEPS_FTP" = xwget; then
45298    VALID_TOOL=yes
45299    wget -O $tmpfile $with_builddeps_server/$resource
45300  fi
45301  if test "x$BDEPS_FTP" = xlftp; then
45302    VALID_TOOL=yes
45303    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
45304  fi
45305  if test "x$BDEPS_FTP" = xftp; then
45306    VALID_TOOL=yes
45307    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
45308    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
45309    FTPUSERPWD=${FTPSERVER%%@*}
45310    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
45311      FTPUSER=${userpwd%%:*}
45312      FTPPWD=${userpwd#*@}
45313      FTPSERVER=${FTPSERVER#*@}
45314    else
45315      FTPUSER=ftp
45316      FTPPWD=ftp
45317    fi
45318    # the "pass" command does not work on some
45319    # ftp clients (read ftp.exe) but if it works,
45320    # passive mode is better!
45321    ( \
45322        echo "user $FTPUSER $FTPPWD"        ; \
45323        echo "pass"                         ; \
45324        echo "bin"                          ; \
45325        echo "get $FTPPATH $tmpfile"              ; \
45326    ) | ftp -in $FTPSERVER
45327  fi
45328  if test "x$VALID_TOOL" != xyes; then
45329    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
45330  fi
45331
45332    mv $tmpfile $installdir/$filename
45333    if test ! -s $installdir/$filename; then
45334      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
45335    fi
45336    case "$extension" in
45337      zip)  echo "Unzipping $installdir/$filename..."
45338        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
45339        ;;
45340      tar.gz) echo "Untaring $installdir/$filename..."
45341        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45342        ;;
45343      tgz) echo "Untaring $installdir/$filename..."
45344        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
45345        ;;
45346      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
45347        ;;
45348    esac
45349  fi
45350  if test -f $installdir/$filename.unpacked; then
45351    depdir=$installdir
45352  fi
45353
45354      fi
45355      # Source the builddeps file again, because in the previous command, the depdir
45356      # was updated to point at the current build dependency install directory.
45357      . $builddepsfile
45358      # Now extract variables from the builddeps.conf files.
45359      theroot=${builddep_freetype2_ROOT}
45360      thecflags=${builddep_freetype2_CFLAGS}
45361      thelibs=${builddep_freetype2_LIBS}
45362      if test "x$depdir" = x; then
45363        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
45364      fi
45365      FREETYPE=$depdir
45366      if test "x$theroot" != x; then
45367        FREETYPE="$theroot"
45368      fi
45369      if test "x$thecflags" != x; then
45370        FREETYPE_CFLAGS="$thecflags"
45371      fi
45372      if test "x$thelibs" != x; then
45373        FREETYPE_LIBS="$thelibs"
45374      fi
45375      FOUND_FREETYPE=yes
45376      else FOUND_FREETYPE=no
45377
45378    fi
45379    else FOUND_FREETYPE=no
45380
45381  fi
45382
45383        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45384        if test "x$FOUND_FREETYPE" = xyes; then
45385          if test "x$BUNDLE_FREETYPE" = xyes; then
45386            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
45387$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
45388            FOUND_FREETYPE=no
45389          else
45390            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45391$as_echo_n "checking for freetype... " >&6; }
45392            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
45393$as_echo "yes (using builddeps)" >&6; }
45394          fi
45395        fi
45396      fi
45397
45398      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
45399      if test "x$SYSROOT" = x; then
45400        if test "x$FOUND_FREETYPE" != xyes; then
45401          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
45402          if test "x$PKG_CONFIG" != x; then
45403
45404pkg_failed=no
45405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
45406$as_echo_n "checking for FREETYPE... " >&6; }
45407
45408if test -n "$FREETYPE_CFLAGS"; then
45409    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
45410 elif test -n "$PKG_CONFIG"; then
45411    if test -n "$PKG_CONFIG" && \
45412    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45413  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45414  ac_status=$?
45415  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45416  test $ac_status = 0; }; then
45417  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
45418else
45419  pkg_failed=yes
45420fi
45421 else
45422    pkg_failed=untried
45423fi
45424if test -n "$FREETYPE_LIBS"; then
45425    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
45426 elif test -n "$PKG_CONFIG"; then
45427    if test -n "$PKG_CONFIG" && \
45428    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
45429  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
45430  ac_status=$?
45431  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
45432  test $ac_status = 0; }; then
45433  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
45434else
45435  pkg_failed=yes
45436fi
45437 else
45438    pkg_failed=untried
45439fi
45440
45441
45442
45443if test $pkg_failed = yes; then
45444
45445if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
45446        _pkg_short_errors_supported=yes
45447else
45448        _pkg_short_errors_supported=no
45449fi
45450        if test $_pkg_short_errors_supported = yes; then
45451	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
45452        else
45453	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
45454        fi
45455	# Put the nasty error message in config.log where it belongs
45456	echo "$FREETYPE_PKG_ERRORS" >&5
45457
45458	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45459$as_echo "no" >&6; }
45460                FOUND_FREETYPE=no
45461elif test $pkg_failed = untried; then
45462	FOUND_FREETYPE=no
45463else
45464	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
45465	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
45466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
45467$as_echo "yes" >&6; }
45468	FOUND_FREETYPE=yes
45469fi
45470            if test "x$FOUND_FREETYPE" = xyes; then
45471              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
45472              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
45473              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
45474              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
45475                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
45476              fi
45477              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
45478              if test "x$BUNDLE_FREETYPE" = xyes; then
45479                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
45480$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
45481                FOUND_FREETYPE=no
45482              else
45483                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
45484$as_echo_n "checking for freetype... " >&6; }
45485                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
45486$as_echo "yes (using pkg-config)" >&6; }
45487              fi
45488            fi
45489          fi
45490        fi
45491      fi
45492
45493      if test "x$FOUND_FREETYPE" != xyes; then
45494        # Check in well-known locations
45495        if test "x$OPENJDK_TARGET_OS" = xwindows; then
45496          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
45497
45498  windows_path="$FREETYPE_BASE_DIR"
45499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45500    unix_path=`$CYGPATH -u "$windows_path"`
45501    FREETYPE_BASE_DIR="$unix_path"
45502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45504    FREETYPE_BASE_DIR="$unix_path"
45505  fi
45506
45507
45508  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45509  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45510  METHOD="well-known location"
45511
45512  # Let's start with an optimistic view of the world :-)
45513  FOUND_FREETYPE=yes
45514
45515  # First look for the canonical freetype main include file ft2build.h.
45516  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45517    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45518    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45519    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45520      # Fail.
45521      FOUND_FREETYPE=no
45522    fi
45523  fi
45524
45525  if test "x$FOUND_FREETYPE" = xyes; then
45526    # Include file found, let's continue the sanity check.
45527    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45528$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45529
45530    # Reset to default value
45531    FREETYPE_BASE_NAME=freetype
45532    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45533    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45534      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45535          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45536        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45537        # for the .6 version explicitly.
45538        FREETYPE_BASE_NAME=freetype.6
45539        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45540        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45541$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45542      else
45543        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45544$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45545        FOUND_FREETYPE=no
45546      fi
45547    else
45548      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45549        # On Windows, we will need both .lib and .dll file.
45550        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45551          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45552$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45553          FOUND_FREETYPE=no
45554        fi
45555      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45556          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45557        # Found lib in isa dir, use that instead.
45558        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45559        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45560$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45561      fi
45562    fi
45563  fi
45564
45565  if test "x$FOUND_FREETYPE" = xyes; then
45566
45567  # Only process if variable expands to non-empty
45568
45569  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45570    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45571
45572  # Input might be given as Windows format, start by converting to
45573  # unix format.
45574  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45575  new_path=`$CYGPATH -u "$path"`
45576
45577  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45578  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45579  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45580  # "foo.exe" is OK but "foo" is an error.
45581  #
45582  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45583  # It is also a way to make sure we got the proper file name for the real test later on.
45584  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45585  if test "x$test_shortpath" = x; then
45586    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45587$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45588    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45589  fi
45590
45591  # Call helper function which possibly converts this using DOS-style short mode.
45592  # If so, the updated path is stored in $new_path.
45593
45594  input_path="$new_path"
45595  # Check if we need to convert this using DOS-style short mode. If the path
45596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45597  # take no chances and rewrite it.
45598  # Note: m4 eats our [], so we need to use [ and ] instead.
45599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45600  if test "x$has_forbidden_chars" != x; then
45601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45605      # Going to short mode and back again did indeed matter. Since short mode is
45606      # case insensitive, let's make it lowercase to improve readability.
45607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45608      # Now convert it back to Unix-stile (cygpath)
45609      input_path=`$CYGPATH -u "$shortmode_path"`
45610      new_path="$input_path"
45611    fi
45612  fi
45613
45614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45615  if test "x$test_cygdrive_prefix" = x; then
45616    # As a simple fix, exclude /usr/bin since it's not a real path.
45617    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45619      # a path prefixed by /cygdrive for fixpath to work.
45620      new_path="$CYGWIN_ROOT_PATH$input_path"
45621    fi
45622  fi
45623
45624
45625  if test "x$path" != "x$new_path"; then
45626    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45627    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45628$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45629  fi
45630
45631    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45632
45633  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45634  has_colon=`$ECHO $path | $GREP ^.:`
45635  new_path="$path"
45636  if test "x$has_colon" = x; then
45637    # Not in mixed or Windows style, start by that.
45638    new_path=`cmd //c echo $path`
45639  fi
45640
45641
45642  input_path="$new_path"
45643  # Check if we need to convert this using DOS-style short mode. If the path
45644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45645  # take no chances and rewrite it.
45646  # Note: m4 eats our [], so we need to use [ and ] instead.
45647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45648  if test "x$has_forbidden_chars" != x; then
45649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45650    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45651  fi
45652
45653
45654  windows_path="$new_path"
45655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45656    unix_path=`$CYGPATH -u "$windows_path"`
45657    new_path="$unix_path"
45658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45660    new_path="$unix_path"
45661  fi
45662
45663  if test "x$path" != "x$new_path"; then
45664    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45665    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45666$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45667  fi
45668
45669  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45670  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45671
45672    else
45673      # We're on a unix platform. Hooray! :)
45674      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45675      has_space=`$ECHO "$path" | $GREP " "`
45676      if test "x$has_space" != x; then
45677        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45678$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45679        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45680      fi
45681
45682      # Use eval to expand a potential ~
45683      eval path="$path"
45684      if test ! -f "$path" && test ! -d "$path"; then
45685        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45686      fi
45687
45688      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45689    fi
45690  fi
45691
45692
45693  # Only process if variable expands to non-empty
45694
45695  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
45696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45697
45698  # Input might be given as Windows format, start by converting to
45699  # unix format.
45700  path="$POTENTIAL_FREETYPE_LIB_PATH"
45701  new_path=`$CYGPATH -u "$path"`
45702
45703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45706  # "foo.exe" is OK but "foo" is an error.
45707  #
45708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45709  # It is also a way to make sure we got the proper file name for the real test later on.
45710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45711  if test "x$test_shortpath" = x; then
45712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45714    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45715  fi
45716
45717  # Call helper function which possibly converts this using DOS-style short mode.
45718  # If so, the updated path is stored in $new_path.
45719
45720  input_path="$new_path"
45721  # Check if we need to convert this using DOS-style short mode. If the path
45722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45723  # take no chances and rewrite it.
45724  # Note: m4 eats our [], so we need to use [ and ] instead.
45725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45726  if test "x$has_forbidden_chars" != x; then
45727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45731      # Going to short mode and back again did indeed matter. Since short mode is
45732      # case insensitive, let's make it lowercase to improve readability.
45733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45734      # Now convert it back to Unix-stile (cygpath)
45735      input_path=`$CYGPATH -u "$shortmode_path"`
45736      new_path="$input_path"
45737    fi
45738  fi
45739
45740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45741  if test "x$test_cygdrive_prefix" = x; then
45742    # As a simple fix, exclude /usr/bin since it's not a real path.
45743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45745      # a path prefixed by /cygdrive for fixpath to work.
45746      new_path="$CYGWIN_ROOT_PATH$input_path"
45747    fi
45748  fi
45749
45750
45751  if test "x$path" != "x$new_path"; then
45752    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45755  fi
45756
45757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45758
45759  path="$POTENTIAL_FREETYPE_LIB_PATH"
45760  has_colon=`$ECHO $path | $GREP ^.:`
45761  new_path="$path"
45762  if test "x$has_colon" = x; then
45763    # Not in mixed or Windows style, start by that.
45764    new_path=`cmd //c echo $path`
45765  fi
45766
45767
45768  input_path="$new_path"
45769  # Check if we need to convert this using DOS-style short mode. If the path
45770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45771  # take no chances and rewrite it.
45772  # Note: m4 eats our [], so we need to use [ and ] instead.
45773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45774  if test "x$has_forbidden_chars" != x; then
45775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45777  fi
45778
45779
45780  windows_path="$new_path"
45781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45782    unix_path=`$CYGPATH -u "$windows_path"`
45783    new_path="$unix_path"
45784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45786    new_path="$unix_path"
45787  fi
45788
45789  if test "x$path" != "x$new_path"; then
45790    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45793  fi
45794
45795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45797
45798    else
45799      # We're on a unix platform. Hooray! :)
45800      path="$POTENTIAL_FREETYPE_LIB_PATH"
45801      has_space=`$ECHO "$path" | $GREP " "`
45802      if test "x$has_space" != x; then
45803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45804$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45805        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45806      fi
45807
45808      # Use eval to expand a potential ~
45809      eval path="$path"
45810      if test ! -f "$path" && test ! -d "$path"; then
45811        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45812      fi
45813
45814      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45815    fi
45816  fi
45817
45818
45819    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45821$as_echo_n "checking for freetype includes... " >&6; }
45822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45823$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45824    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45826$as_echo_n "checking for freetype libraries... " >&6; }
45827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45828$as_echo "$FREETYPE_LIB_PATH" >&6; }
45829  fi
45830
45831          if test "x$FOUND_FREETYPE" != xyes; then
45832            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
45833
45834  windows_path="$FREETYPE_BASE_DIR"
45835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45836    unix_path=`$CYGPATH -u "$windows_path"`
45837    FREETYPE_BASE_DIR="$unix_path"
45838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45840    FREETYPE_BASE_DIR="$unix_path"
45841  fi
45842
45843
45844  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45845  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45846  METHOD="well-known location"
45847
45848  # Let's start with an optimistic view of the world :-)
45849  FOUND_FREETYPE=yes
45850
45851  # First look for the canonical freetype main include file ft2build.h.
45852  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45853    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
45854    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
45855    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45856      # Fail.
45857      FOUND_FREETYPE=no
45858    fi
45859  fi
45860
45861  if test "x$FOUND_FREETYPE" = xyes; then
45862    # Include file found, let's continue the sanity check.
45863    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45864$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45865
45866    # Reset to default value
45867    FREETYPE_BASE_NAME=freetype
45868    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45869    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45870      if test "x$OPENJDK_TARGET_OS" = xmacosx \
45871          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
45872        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
45873        # for the .6 version explicitly.
45874        FREETYPE_BASE_NAME=freetype.6
45875        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
45876        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
45877$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
45878      else
45879        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45880$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45881        FOUND_FREETYPE=no
45882      fi
45883    else
45884      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45885        # On Windows, we will need both .lib and .dll file.
45886        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
45887          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
45888$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
45889          FOUND_FREETYPE=no
45890        fi
45891      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45892          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45893        # Found lib in isa dir, use that instead.
45894        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45895        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
45896$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
45897      fi
45898    fi
45899  fi
45900
45901  if test "x$FOUND_FREETYPE" = xyes; then
45902
45903  # Only process if variable expands to non-empty
45904
45905  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
45906    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45907
45908  # Input might be given as Windows format, start by converting to
45909  # unix format.
45910  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45911  new_path=`$CYGPATH -u "$path"`
45912
45913  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45914  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45915  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45916  # "foo.exe" is OK but "foo" is an error.
45917  #
45918  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45919  # It is also a way to make sure we got the proper file name for the real test later on.
45920  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45921  if test "x$test_shortpath" = x; then
45922    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45923$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45924    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45925  fi
45926
45927  # Call helper function which possibly converts this using DOS-style short mode.
45928  # If so, the updated path is stored in $new_path.
45929
45930  input_path="$new_path"
45931  # Check if we need to convert this using DOS-style short mode. If the path
45932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45933  # take no chances and rewrite it.
45934  # Note: m4 eats our [], so we need to use [ and ] instead.
45935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45936  if test "x$has_forbidden_chars" != x; then
45937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45938    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45939    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45940    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45941      # Going to short mode and back again did indeed matter. Since short mode is
45942      # case insensitive, let's make it lowercase to improve readability.
45943      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45944      # Now convert it back to Unix-stile (cygpath)
45945      input_path=`$CYGPATH -u "$shortmode_path"`
45946      new_path="$input_path"
45947    fi
45948  fi
45949
45950  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45951  if test "x$test_cygdrive_prefix" = x; then
45952    # As a simple fix, exclude /usr/bin since it's not a real path.
45953    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45954      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45955      # a path prefixed by /cygdrive for fixpath to work.
45956      new_path="$CYGWIN_ROOT_PATH$input_path"
45957    fi
45958  fi
45959
45960
45961  if test "x$path" != "x$new_path"; then
45962    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45963    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45964$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45965  fi
45966
45967    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45968
45969  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45970  has_colon=`$ECHO $path | $GREP ^.:`
45971  new_path="$path"
45972  if test "x$has_colon" = x; then
45973    # Not in mixed or Windows style, start by that.
45974    new_path=`cmd //c echo $path`
45975  fi
45976
45977
45978  input_path="$new_path"
45979  # Check if we need to convert this using DOS-style short mode. If the path
45980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45981  # take no chances and rewrite it.
45982  # Note: m4 eats our [], so we need to use [ and ] instead.
45983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45984  if test "x$has_forbidden_chars" != x; then
45985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45986    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45987  fi
45988
45989
45990  windows_path="$new_path"
45991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45992    unix_path=`$CYGPATH -u "$windows_path"`
45993    new_path="$unix_path"
45994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45996    new_path="$unix_path"
45997  fi
45998
45999  if test "x$path" != "x$new_path"; then
46000    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46001    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46002$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46003  fi
46004
46005  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46006  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46007
46008    else
46009      # We're on a unix platform. Hooray! :)
46010      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46011      has_space=`$ECHO "$path" | $GREP " "`
46012      if test "x$has_space" != x; then
46013        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46014$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46015        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46016      fi
46017
46018      # Use eval to expand a potential ~
46019      eval path="$path"
46020      if test ! -f "$path" && test ! -d "$path"; then
46021        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46022      fi
46023
46024      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46025    fi
46026  fi
46027
46028
46029  # Only process if variable expands to non-empty
46030
46031  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46032    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46033
46034  # Input might be given as Windows format, start by converting to
46035  # unix format.
46036  path="$POTENTIAL_FREETYPE_LIB_PATH"
46037  new_path=`$CYGPATH -u "$path"`
46038
46039  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46040  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46041  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46042  # "foo.exe" is OK but "foo" is an error.
46043  #
46044  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46045  # It is also a way to make sure we got the proper file name for the real test later on.
46046  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46047  if test "x$test_shortpath" = x; then
46048    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46049$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46050    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46051  fi
46052
46053  # Call helper function which possibly converts this using DOS-style short mode.
46054  # If so, the updated path is stored in $new_path.
46055
46056  input_path="$new_path"
46057  # Check if we need to convert this using DOS-style short mode. If the path
46058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46059  # take no chances and rewrite it.
46060  # Note: m4 eats our [], so we need to use [ and ] instead.
46061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46062  if test "x$has_forbidden_chars" != x; then
46063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46064    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46065    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46066    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46067      # Going to short mode and back again did indeed matter. Since short mode is
46068      # case insensitive, let's make it lowercase to improve readability.
46069      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46070      # Now convert it back to Unix-stile (cygpath)
46071      input_path=`$CYGPATH -u "$shortmode_path"`
46072      new_path="$input_path"
46073    fi
46074  fi
46075
46076  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46077  if test "x$test_cygdrive_prefix" = x; then
46078    # As a simple fix, exclude /usr/bin since it's not a real path.
46079    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46080      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46081      # a path prefixed by /cygdrive for fixpath to work.
46082      new_path="$CYGWIN_ROOT_PATH$input_path"
46083    fi
46084  fi
46085
46086
46087  if test "x$path" != "x$new_path"; then
46088    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46089    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46090$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46091  fi
46092
46093    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46094
46095  path="$POTENTIAL_FREETYPE_LIB_PATH"
46096  has_colon=`$ECHO $path | $GREP ^.:`
46097  new_path="$path"
46098  if test "x$has_colon" = x; then
46099    # Not in mixed or Windows style, start by that.
46100    new_path=`cmd //c echo $path`
46101  fi
46102
46103
46104  input_path="$new_path"
46105  # Check if we need to convert this using DOS-style short mode. If the path
46106  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46107  # take no chances and rewrite it.
46108  # Note: m4 eats our [], so we need to use [ and ] instead.
46109  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46110  if test "x$has_forbidden_chars" != x; then
46111    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46112    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46113  fi
46114
46115
46116  windows_path="$new_path"
46117  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46118    unix_path=`$CYGPATH -u "$windows_path"`
46119    new_path="$unix_path"
46120  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46121    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46122    new_path="$unix_path"
46123  fi
46124
46125  if test "x$path" != "x$new_path"; then
46126    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46127    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46128$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46129  fi
46130
46131  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46132  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46133
46134    else
46135      # We're on a unix platform. Hooray! :)
46136      path="$POTENTIAL_FREETYPE_LIB_PATH"
46137      has_space=`$ECHO "$path" | $GREP " "`
46138      if test "x$has_space" != x; then
46139        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46140$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46141        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46142      fi
46143
46144      # Use eval to expand a potential ~
46145      eval path="$path"
46146      if test ! -f "$path" && test ! -d "$path"; then
46147        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46148      fi
46149
46150      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46151    fi
46152  fi
46153
46154
46155    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46157$as_echo_n "checking for freetype includes... " >&6; }
46158    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46159$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46160    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46161    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46162$as_echo_n "checking for freetype libraries... " >&6; }
46163    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46164$as_echo "$FREETYPE_LIB_PATH" >&6; }
46165  fi
46166
46167          fi
46168        else
46169          FREETYPE_BASE_DIR="$SYSROOT/usr"
46170
46171  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46172  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46173  METHOD="well-known location"
46174
46175  # Let's start with an optimistic view of the world :-)
46176  FOUND_FREETYPE=yes
46177
46178  # First look for the canonical freetype main include file ft2build.h.
46179  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46180    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46181    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46182    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46183      # Fail.
46184      FOUND_FREETYPE=no
46185    fi
46186  fi
46187
46188  if test "x$FOUND_FREETYPE" = xyes; then
46189    # Include file found, let's continue the sanity check.
46190    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46191$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46192
46193    # Reset to default value
46194    FREETYPE_BASE_NAME=freetype
46195    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46196    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46197      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46198          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46199        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46200        # for the .6 version explicitly.
46201        FREETYPE_BASE_NAME=freetype.6
46202        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46203        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46204$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46205      else
46206        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46207$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46208        FOUND_FREETYPE=no
46209      fi
46210    else
46211      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46212        # On Windows, we will need both .lib and .dll file.
46213        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46214          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46215$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46216          FOUND_FREETYPE=no
46217        fi
46218      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46219          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46220        # Found lib in isa dir, use that instead.
46221        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46222        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46223$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46224      fi
46225    fi
46226  fi
46227
46228  if test "x$FOUND_FREETYPE" = xyes; then
46229
46230  # Only process if variable expands to non-empty
46231
46232  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46234
46235  # Input might be given as Windows format, start by converting to
46236  # unix format.
46237  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46238  new_path=`$CYGPATH -u "$path"`
46239
46240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46243  # "foo.exe" is OK but "foo" is an error.
46244  #
46245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46246  # It is also a way to make sure we got the proper file name for the real test later on.
46247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46248  if test "x$test_shortpath" = x; then
46249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46250$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46251    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46252  fi
46253
46254  # Call helper function which possibly converts this using DOS-style short mode.
46255  # If so, the updated path is stored in $new_path.
46256
46257  input_path="$new_path"
46258  # Check if we need to convert this using DOS-style short mode. If the path
46259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46260  # take no chances and rewrite it.
46261  # Note: m4 eats our [], so we need to use [ and ] instead.
46262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46263  if test "x$has_forbidden_chars" != x; then
46264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46268      # Going to short mode and back again did indeed matter. Since short mode is
46269      # case insensitive, let's make it lowercase to improve readability.
46270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46271      # Now convert it back to Unix-stile (cygpath)
46272      input_path=`$CYGPATH -u "$shortmode_path"`
46273      new_path="$input_path"
46274    fi
46275  fi
46276
46277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46278  if test "x$test_cygdrive_prefix" = x; then
46279    # As a simple fix, exclude /usr/bin since it's not a real path.
46280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46282      # a path prefixed by /cygdrive for fixpath to work.
46283      new_path="$CYGWIN_ROOT_PATH$input_path"
46284    fi
46285  fi
46286
46287
46288  if test "x$path" != "x$new_path"; then
46289    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46292  fi
46293
46294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46295
46296  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46297  has_colon=`$ECHO $path | $GREP ^.:`
46298  new_path="$path"
46299  if test "x$has_colon" = x; then
46300    # Not in mixed or Windows style, start by that.
46301    new_path=`cmd //c echo $path`
46302  fi
46303
46304
46305  input_path="$new_path"
46306  # Check if we need to convert this using DOS-style short mode. If the path
46307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46308  # take no chances and rewrite it.
46309  # Note: m4 eats our [], so we need to use [ and ] instead.
46310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46311  if test "x$has_forbidden_chars" != x; then
46312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46314  fi
46315
46316
46317  windows_path="$new_path"
46318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46319    unix_path=`$CYGPATH -u "$windows_path"`
46320    new_path="$unix_path"
46321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46323    new_path="$unix_path"
46324  fi
46325
46326  if test "x$path" != "x$new_path"; then
46327    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46330  fi
46331
46332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46334
46335    else
46336      # We're on a unix platform. Hooray! :)
46337      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46338      has_space=`$ECHO "$path" | $GREP " "`
46339      if test "x$has_space" != x; then
46340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46343      fi
46344
46345      # Use eval to expand a potential ~
46346      eval path="$path"
46347      if test ! -f "$path" && test ! -d "$path"; then
46348        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46349      fi
46350
46351      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46352    fi
46353  fi
46354
46355
46356  # Only process if variable expands to non-empty
46357
46358  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46359    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46360
46361  # Input might be given as Windows format, start by converting to
46362  # unix format.
46363  path="$POTENTIAL_FREETYPE_LIB_PATH"
46364  new_path=`$CYGPATH -u "$path"`
46365
46366  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46367  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46368  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46369  # "foo.exe" is OK but "foo" is an error.
46370  #
46371  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46372  # It is also a way to make sure we got the proper file name for the real test later on.
46373  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46374  if test "x$test_shortpath" = x; then
46375    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46376$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46377    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46378  fi
46379
46380  # Call helper function which possibly converts this using DOS-style short mode.
46381  # If so, the updated path is stored in $new_path.
46382
46383  input_path="$new_path"
46384  # Check if we need to convert this using DOS-style short mode. If the path
46385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46386  # take no chances and rewrite it.
46387  # Note: m4 eats our [], so we need to use [ and ] instead.
46388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46389  if test "x$has_forbidden_chars" != x; then
46390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46391    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46392    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46393    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46394      # Going to short mode and back again did indeed matter. Since short mode is
46395      # case insensitive, let's make it lowercase to improve readability.
46396      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46397      # Now convert it back to Unix-stile (cygpath)
46398      input_path=`$CYGPATH -u "$shortmode_path"`
46399      new_path="$input_path"
46400    fi
46401  fi
46402
46403  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46404  if test "x$test_cygdrive_prefix" = x; then
46405    # As a simple fix, exclude /usr/bin since it's not a real path.
46406    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46407      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46408      # a path prefixed by /cygdrive for fixpath to work.
46409      new_path="$CYGWIN_ROOT_PATH$input_path"
46410    fi
46411  fi
46412
46413
46414  if test "x$path" != "x$new_path"; then
46415    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46416    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46417$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46418  fi
46419
46420    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46421
46422  path="$POTENTIAL_FREETYPE_LIB_PATH"
46423  has_colon=`$ECHO $path | $GREP ^.:`
46424  new_path="$path"
46425  if test "x$has_colon" = x; then
46426    # Not in mixed or Windows style, start by that.
46427    new_path=`cmd //c echo $path`
46428  fi
46429
46430
46431  input_path="$new_path"
46432  # Check if we need to convert this using DOS-style short mode. If the path
46433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46434  # take no chances and rewrite it.
46435  # Note: m4 eats our [], so we need to use [ and ] instead.
46436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46437  if test "x$has_forbidden_chars" != x; then
46438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46440  fi
46441
46442
46443  windows_path="$new_path"
46444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46445    unix_path=`$CYGPATH -u "$windows_path"`
46446    new_path="$unix_path"
46447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46449    new_path="$unix_path"
46450  fi
46451
46452  if test "x$path" != "x$new_path"; then
46453    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46455$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46456  fi
46457
46458  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46459  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46460
46461    else
46462      # We're on a unix platform. Hooray! :)
46463      path="$POTENTIAL_FREETYPE_LIB_PATH"
46464      has_space=`$ECHO "$path" | $GREP " "`
46465      if test "x$has_space" != x; then
46466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46468        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46469      fi
46470
46471      # Use eval to expand a potential ~
46472      eval path="$path"
46473      if test ! -f "$path" && test ! -d "$path"; then
46474        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46475      fi
46476
46477      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46478    fi
46479  fi
46480
46481
46482    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46483    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46484$as_echo_n "checking for freetype includes... " >&6; }
46485    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46486$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46487    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46489$as_echo_n "checking for freetype libraries... " >&6; }
46490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46491$as_echo "$FREETYPE_LIB_PATH" >&6; }
46492  fi
46493
46494
46495          if test "x$FOUND_FREETYPE" != xyes; then
46496            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
46497
46498  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46499  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46500  METHOD="well-known location"
46501
46502  # Let's start with an optimistic view of the world :-)
46503  FOUND_FREETYPE=yes
46504
46505  # First look for the canonical freetype main include file ft2build.h.
46506  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46507    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46508    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46509    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46510      # Fail.
46511      FOUND_FREETYPE=no
46512    fi
46513  fi
46514
46515  if test "x$FOUND_FREETYPE" = xyes; then
46516    # Include file found, let's continue the sanity check.
46517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46518$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46519
46520    # Reset to default value
46521    FREETYPE_BASE_NAME=freetype
46522    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46523    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46524      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46525          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46526        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46527        # for the .6 version explicitly.
46528        FREETYPE_BASE_NAME=freetype.6
46529        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46530        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46531$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46532      else
46533        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46534$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46535        FOUND_FREETYPE=no
46536      fi
46537    else
46538      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46539        # On Windows, we will need both .lib and .dll file.
46540        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46541          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46542$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46543          FOUND_FREETYPE=no
46544        fi
46545      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46546          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46547        # Found lib in isa dir, use that instead.
46548        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46549        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46550$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46551      fi
46552    fi
46553  fi
46554
46555  if test "x$FOUND_FREETYPE" = xyes; then
46556
46557  # Only process if variable expands to non-empty
46558
46559  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46560    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46561
46562  # Input might be given as Windows format, start by converting to
46563  # unix format.
46564  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46565  new_path=`$CYGPATH -u "$path"`
46566
46567  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46568  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46569  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46570  # "foo.exe" is OK but "foo" is an error.
46571  #
46572  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46573  # It is also a way to make sure we got the proper file name for the real test later on.
46574  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46575  if test "x$test_shortpath" = x; then
46576    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46577$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46578    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46579  fi
46580
46581  # Call helper function which possibly converts this using DOS-style short mode.
46582  # If so, the updated path is stored in $new_path.
46583
46584  input_path="$new_path"
46585  # Check if we need to convert this using DOS-style short mode. If the path
46586  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46587  # take no chances and rewrite it.
46588  # Note: m4 eats our [], so we need to use [ and ] instead.
46589  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46590  if test "x$has_forbidden_chars" != x; then
46591    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46592    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46593    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46594    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46595      # Going to short mode and back again did indeed matter. Since short mode is
46596      # case insensitive, let's make it lowercase to improve readability.
46597      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46598      # Now convert it back to Unix-stile (cygpath)
46599      input_path=`$CYGPATH -u "$shortmode_path"`
46600      new_path="$input_path"
46601    fi
46602  fi
46603
46604  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46605  if test "x$test_cygdrive_prefix" = x; then
46606    # As a simple fix, exclude /usr/bin since it's not a real path.
46607    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46608      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46609      # a path prefixed by /cygdrive for fixpath to work.
46610      new_path="$CYGWIN_ROOT_PATH$input_path"
46611    fi
46612  fi
46613
46614
46615  if test "x$path" != "x$new_path"; then
46616    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46617    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46618$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46619  fi
46620
46621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46622
46623  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46624  has_colon=`$ECHO $path | $GREP ^.:`
46625  new_path="$path"
46626  if test "x$has_colon" = x; then
46627    # Not in mixed or Windows style, start by that.
46628    new_path=`cmd //c echo $path`
46629  fi
46630
46631
46632  input_path="$new_path"
46633  # Check if we need to convert this using DOS-style short mode. If the path
46634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46635  # take no chances and rewrite it.
46636  # Note: m4 eats our [], so we need to use [ and ] instead.
46637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46638  if test "x$has_forbidden_chars" != x; then
46639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46640    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46641  fi
46642
46643
46644  windows_path="$new_path"
46645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46646    unix_path=`$CYGPATH -u "$windows_path"`
46647    new_path="$unix_path"
46648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46650    new_path="$unix_path"
46651  fi
46652
46653  if test "x$path" != "x$new_path"; then
46654    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46655    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46656$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46657  fi
46658
46659  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46660  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46661
46662    else
46663      # We're on a unix platform. Hooray! :)
46664      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46665      has_space=`$ECHO "$path" | $GREP " "`
46666      if test "x$has_space" != x; then
46667        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46668$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46669        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46670      fi
46671
46672      # Use eval to expand a potential ~
46673      eval path="$path"
46674      if test ! -f "$path" && test ! -d "$path"; then
46675        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46676      fi
46677
46678      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46679    fi
46680  fi
46681
46682
46683  # Only process if variable expands to non-empty
46684
46685  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
46686    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46687
46688  # Input might be given as Windows format, start by converting to
46689  # unix format.
46690  path="$POTENTIAL_FREETYPE_LIB_PATH"
46691  new_path=`$CYGPATH -u "$path"`
46692
46693  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46694  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46695  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46696  # "foo.exe" is OK but "foo" is an error.
46697  #
46698  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46699  # It is also a way to make sure we got the proper file name for the real test later on.
46700  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46701  if test "x$test_shortpath" = x; then
46702    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46703$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46704    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46705  fi
46706
46707  # Call helper function which possibly converts this using DOS-style short mode.
46708  # If so, the updated path is stored in $new_path.
46709
46710  input_path="$new_path"
46711  # Check if we need to convert this using DOS-style short mode. If the path
46712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46713  # take no chances and rewrite it.
46714  # Note: m4 eats our [], so we need to use [ and ] instead.
46715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46716  if test "x$has_forbidden_chars" != x; then
46717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46718    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46719    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46720    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46721      # Going to short mode and back again did indeed matter. Since short mode is
46722      # case insensitive, let's make it lowercase to improve readability.
46723      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46724      # Now convert it back to Unix-stile (cygpath)
46725      input_path=`$CYGPATH -u "$shortmode_path"`
46726      new_path="$input_path"
46727    fi
46728  fi
46729
46730  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46731  if test "x$test_cygdrive_prefix" = x; then
46732    # As a simple fix, exclude /usr/bin since it's not a real path.
46733    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46734      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46735      # a path prefixed by /cygdrive for fixpath to work.
46736      new_path="$CYGWIN_ROOT_PATH$input_path"
46737    fi
46738  fi
46739
46740
46741  if test "x$path" != "x$new_path"; then
46742    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46745  fi
46746
46747    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46748
46749  path="$POTENTIAL_FREETYPE_LIB_PATH"
46750  has_colon=`$ECHO $path | $GREP ^.:`
46751  new_path="$path"
46752  if test "x$has_colon" = x; then
46753    # Not in mixed or Windows style, start by that.
46754    new_path=`cmd //c echo $path`
46755  fi
46756
46757
46758  input_path="$new_path"
46759  # Check if we need to convert this using DOS-style short mode. If the path
46760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46761  # take no chances and rewrite it.
46762  # Note: m4 eats our [], so we need to use [ and ] instead.
46763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46764  if test "x$has_forbidden_chars" != x; then
46765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46766    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46767  fi
46768
46769
46770  windows_path="$new_path"
46771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46772    unix_path=`$CYGPATH -u "$windows_path"`
46773    new_path="$unix_path"
46774  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46775    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46776    new_path="$unix_path"
46777  fi
46778
46779  if test "x$path" != "x$new_path"; then
46780    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46782$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46783  fi
46784
46785  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46786  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46787
46788    else
46789      # We're on a unix platform. Hooray! :)
46790      path="$POTENTIAL_FREETYPE_LIB_PATH"
46791      has_space=`$ECHO "$path" | $GREP " "`
46792      if test "x$has_space" != x; then
46793        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46794$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46795        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46796      fi
46797
46798      # Use eval to expand a potential ~
46799      eval path="$path"
46800      if test ! -f "$path" && test ! -d "$path"; then
46801        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46802      fi
46803
46804      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46805    fi
46806  fi
46807
46808
46809    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46810    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46811$as_echo_n "checking for freetype includes... " >&6; }
46812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46813$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46814    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46816$as_echo_n "checking for freetype libraries... " >&6; }
46817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46818$as_echo "$FREETYPE_LIB_PATH" >&6; }
46819  fi
46820
46821          fi
46822
46823          if test "x$FOUND_FREETYPE" != xyes; then
46824            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
46825
46826  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46827  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
46828  METHOD="well-known location"
46829
46830  # Let's start with an optimistic view of the world :-)
46831  FOUND_FREETYPE=yes
46832
46833  # First look for the canonical freetype main include file ft2build.h.
46834  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46835    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
46836    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
46837    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46838      # Fail.
46839      FOUND_FREETYPE=no
46840    fi
46841  fi
46842
46843  if test "x$FOUND_FREETYPE" = xyes; then
46844    # Include file found, let's continue the sanity check.
46845    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46846$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46847
46848    # Reset to default value
46849    FREETYPE_BASE_NAME=freetype
46850    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46851    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46852      if test "x$OPENJDK_TARGET_OS" = xmacosx \
46853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
46854        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
46855        # for the .6 version explicitly.
46856        FREETYPE_BASE_NAME=freetype.6
46857        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
46858        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
46859$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
46860      else
46861        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46862$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46863        FOUND_FREETYPE=no
46864      fi
46865    else
46866      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46867        # On Windows, we will need both .lib and .dll file.
46868        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
46869          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
46870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
46871          FOUND_FREETYPE=no
46872        fi
46873      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46874          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46875        # Found lib in isa dir, use that instead.
46876        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46877        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
46878$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
46879      fi
46880    fi
46881  fi
46882
46883  if test "x$FOUND_FREETYPE" = xyes; then
46884
46885  # Only process if variable expands to non-empty
46886
46887  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
46888    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46889
46890  # Input might be given as Windows format, start by converting to
46891  # unix format.
46892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46893  new_path=`$CYGPATH -u "$path"`
46894
46895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46898  # "foo.exe" is OK but "foo" is an error.
46899  #
46900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46901  # It is also a way to make sure we got the proper file name for the real test later on.
46902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46903  if test "x$test_shortpath" = x; then
46904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46907  fi
46908
46909  # Call helper function which possibly converts this using DOS-style short mode.
46910  # If so, the updated path is stored in $new_path.
46911
46912  input_path="$new_path"
46913  # Check if we need to convert this using DOS-style short mode. If the path
46914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46915  # take no chances and rewrite it.
46916  # Note: m4 eats our [], so we need to use [ and ] instead.
46917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46918  if test "x$has_forbidden_chars" != x; then
46919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46923      # Going to short mode and back again did indeed matter. Since short mode is
46924      # case insensitive, let's make it lowercase to improve readability.
46925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46926      # Now convert it back to Unix-stile (cygpath)
46927      input_path=`$CYGPATH -u "$shortmode_path"`
46928      new_path="$input_path"
46929    fi
46930  fi
46931
46932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46933  if test "x$test_cygdrive_prefix" = x; then
46934    # As a simple fix, exclude /usr/bin since it's not a real path.
46935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46937      # a path prefixed by /cygdrive for fixpath to work.
46938      new_path="$CYGWIN_ROOT_PATH$input_path"
46939    fi
46940  fi
46941
46942
46943  if test "x$path" != "x$new_path"; then
46944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46947  fi
46948
46949    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46950
46951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46952  has_colon=`$ECHO $path | $GREP ^.:`
46953  new_path="$path"
46954  if test "x$has_colon" = x; then
46955    # Not in mixed or Windows style, start by that.
46956    new_path=`cmd //c echo $path`
46957  fi
46958
46959
46960  input_path="$new_path"
46961  # Check if we need to convert this using DOS-style short mode. If the path
46962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46963  # take no chances and rewrite it.
46964  # Note: m4 eats our [], so we need to use [ and ] instead.
46965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46966  if test "x$has_forbidden_chars" != x; then
46967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46969  fi
46970
46971
46972  windows_path="$new_path"
46973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46974    unix_path=`$CYGPATH -u "$windows_path"`
46975    new_path="$unix_path"
46976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46978    new_path="$unix_path"
46979  fi
46980
46981  if test "x$path" != "x$new_path"; then
46982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46985  fi
46986
46987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46989
46990    else
46991      # We're on a unix platform. Hooray! :)
46992      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46993      has_space=`$ECHO "$path" | $GREP " "`
46994      if test "x$has_space" != x; then
46995        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46997        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46998      fi
46999
47000      # Use eval to expand a potential ~
47001      eval path="$path"
47002      if test ! -f "$path" && test ! -d "$path"; then
47003        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47004      fi
47005
47006      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47007    fi
47008  fi
47009
47010
47011  # Only process if variable expands to non-empty
47012
47013  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47015
47016  # Input might be given as Windows format, start by converting to
47017  # unix format.
47018  path="$POTENTIAL_FREETYPE_LIB_PATH"
47019  new_path=`$CYGPATH -u "$path"`
47020
47021  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47022  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47023  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47024  # "foo.exe" is OK but "foo" is an error.
47025  #
47026  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47027  # It is also a way to make sure we got the proper file name for the real test later on.
47028  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47029  if test "x$test_shortpath" = x; then
47030    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47031$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47032    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47033  fi
47034
47035  # Call helper function which possibly converts this using DOS-style short mode.
47036  # If so, the updated path is stored in $new_path.
47037
47038  input_path="$new_path"
47039  # Check if we need to convert this using DOS-style short mode. If the path
47040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47041  # take no chances and rewrite it.
47042  # Note: m4 eats our [], so we need to use [ and ] instead.
47043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47044  if test "x$has_forbidden_chars" != x; then
47045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47046    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47047    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47048    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47049      # Going to short mode and back again did indeed matter. Since short mode is
47050      # case insensitive, let's make it lowercase to improve readability.
47051      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47052      # Now convert it back to Unix-stile (cygpath)
47053      input_path=`$CYGPATH -u "$shortmode_path"`
47054      new_path="$input_path"
47055    fi
47056  fi
47057
47058  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47059  if test "x$test_cygdrive_prefix" = x; then
47060    # As a simple fix, exclude /usr/bin since it's not a real path.
47061    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47062      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47063      # a path prefixed by /cygdrive for fixpath to work.
47064      new_path="$CYGWIN_ROOT_PATH$input_path"
47065    fi
47066  fi
47067
47068
47069  if test "x$path" != "x$new_path"; then
47070    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47072$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47073  fi
47074
47075    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47076
47077  path="$POTENTIAL_FREETYPE_LIB_PATH"
47078  has_colon=`$ECHO $path | $GREP ^.:`
47079  new_path="$path"
47080  if test "x$has_colon" = x; then
47081    # Not in mixed or Windows style, start by that.
47082    new_path=`cmd //c echo $path`
47083  fi
47084
47085
47086  input_path="$new_path"
47087  # Check if we need to convert this using DOS-style short mode. If the path
47088  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47089  # take no chances and rewrite it.
47090  # Note: m4 eats our [], so we need to use [ and ] instead.
47091  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47092  if test "x$has_forbidden_chars" != x; then
47093    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47094    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47095  fi
47096
47097
47098  windows_path="$new_path"
47099  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47100    unix_path=`$CYGPATH -u "$windows_path"`
47101    new_path="$unix_path"
47102  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47103    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47104    new_path="$unix_path"
47105  fi
47106
47107  if test "x$path" != "x$new_path"; then
47108    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47111  fi
47112
47113  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47114  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47115
47116    else
47117      # We're on a unix platform. Hooray! :)
47118      path="$POTENTIAL_FREETYPE_LIB_PATH"
47119      has_space=`$ECHO "$path" | $GREP " "`
47120      if test "x$has_space" != x; then
47121        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47122$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47123        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47124      fi
47125
47126      # Use eval to expand a potential ~
47127      eval path="$path"
47128      if test ! -f "$path" && test ! -d "$path"; then
47129        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47130      fi
47131
47132      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47133    fi
47134  fi
47135
47136
47137    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47139$as_echo_n "checking for freetype includes... " >&6; }
47140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47141$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47142    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47144$as_echo_n "checking for freetype libraries... " >&6; }
47145    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47146$as_echo "$FREETYPE_LIB_PATH" >&6; }
47147  fi
47148
47149          fi
47150
47151          if test "x$FOUND_FREETYPE" != xyes; then
47152            FREETYPE_BASE_DIR="$SYSROOT/usr"
47153            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47154
47155  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47156  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
47157  METHOD="well-known location"
47158
47159  # Let's start with an optimistic view of the world :-)
47160  FOUND_FREETYPE=yes
47161
47162  # First look for the canonical freetype main include file ft2build.h.
47163  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47164    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47165    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47166    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47167      # Fail.
47168      FOUND_FREETYPE=no
47169    fi
47170  fi
47171
47172  if test "x$FOUND_FREETYPE" = xyes; then
47173    # Include file found, let's continue the sanity check.
47174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47175$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47176
47177    # Reset to default value
47178    FREETYPE_BASE_NAME=freetype
47179    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47180    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47181      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47183        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47184        # for the .6 version explicitly.
47185        FREETYPE_BASE_NAME=freetype.6
47186        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47187        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47188$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47189      else
47190        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47191$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47192        FOUND_FREETYPE=no
47193      fi
47194    else
47195      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47196        # On Windows, we will need both .lib and .dll file.
47197        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47198          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47199$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47200          FOUND_FREETYPE=no
47201        fi
47202      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47203          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47204        # Found lib in isa dir, use that instead.
47205        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47206        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47207$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47208      fi
47209    fi
47210  fi
47211
47212  if test "x$FOUND_FREETYPE" = xyes; then
47213
47214  # Only process if variable expands to non-empty
47215
47216  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47218
47219  # Input might be given as Windows format, start by converting to
47220  # unix format.
47221  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47222  new_path=`$CYGPATH -u "$path"`
47223
47224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47227  # "foo.exe" is OK but "foo" is an error.
47228  #
47229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47230  # It is also a way to make sure we got the proper file name for the real test later on.
47231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47232  if test "x$test_shortpath" = x; then
47233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47234$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47235    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47236  fi
47237
47238  # Call helper function which possibly converts this using DOS-style short mode.
47239  # If so, the updated path is stored in $new_path.
47240
47241  input_path="$new_path"
47242  # Check if we need to convert this using DOS-style short mode. If the path
47243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47244  # take no chances and rewrite it.
47245  # Note: m4 eats our [], so we need to use [ and ] instead.
47246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47247  if test "x$has_forbidden_chars" != x; then
47248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47252      # Going to short mode and back again did indeed matter. Since short mode is
47253      # case insensitive, let's make it lowercase to improve readability.
47254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47255      # Now convert it back to Unix-stile (cygpath)
47256      input_path=`$CYGPATH -u "$shortmode_path"`
47257      new_path="$input_path"
47258    fi
47259  fi
47260
47261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47262  if test "x$test_cygdrive_prefix" = x; then
47263    # As a simple fix, exclude /usr/bin since it's not a real path.
47264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47266      # a path prefixed by /cygdrive for fixpath to work.
47267      new_path="$CYGWIN_ROOT_PATH$input_path"
47268    fi
47269  fi
47270
47271
47272  if test "x$path" != "x$new_path"; then
47273    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47275$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47276  fi
47277
47278    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47279
47280  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47281  has_colon=`$ECHO $path | $GREP ^.:`
47282  new_path="$path"
47283  if test "x$has_colon" = x; then
47284    # Not in mixed or Windows style, start by that.
47285    new_path=`cmd //c echo $path`
47286  fi
47287
47288
47289  input_path="$new_path"
47290  # Check if we need to convert this using DOS-style short mode. If the path
47291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47292  # take no chances and rewrite it.
47293  # Note: m4 eats our [], so we need to use [ and ] instead.
47294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47295  if test "x$has_forbidden_chars" != x; then
47296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47298  fi
47299
47300
47301  windows_path="$new_path"
47302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47303    unix_path=`$CYGPATH -u "$windows_path"`
47304    new_path="$unix_path"
47305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47307    new_path="$unix_path"
47308  fi
47309
47310  if test "x$path" != "x$new_path"; then
47311    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47313$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47314  fi
47315
47316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47318
47319    else
47320      # We're on a unix platform. Hooray! :)
47321      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47322      has_space=`$ECHO "$path" | $GREP " "`
47323      if test "x$has_space" != x; then
47324        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47325$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47326        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47327      fi
47328
47329      # Use eval to expand a potential ~
47330      eval path="$path"
47331      if test ! -f "$path" && test ! -d "$path"; then
47332        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47333      fi
47334
47335      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47336    fi
47337  fi
47338
47339
47340  # Only process if variable expands to non-empty
47341
47342  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47343    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47344
47345  # Input might be given as Windows format, start by converting to
47346  # unix format.
47347  path="$POTENTIAL_FREETYPE_LIB_PATH"
47348  new_path=`$CYGPATH -u "$path"`
47349
47350  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47351  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47352  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47353  # "foo.exe" is OK but "foo" is an error.
47354  #
47355  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47356  # It is also a way to make sure we got the proper file name for the real test later on.
47357  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47358  if test "x$test_shortpath" = x; then
47359    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47360$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47361    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47362  fi
47363
47364  # Call helper function which possibly converts this using DOS-style short mode.
47365  # If so, the updated path is stored in $new_path.
47366
47367  input_path="$new_path"
47368  # Check if we need to convert this using DOS-style short mode. If the path
47369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47370  # take no chances and rewrite it.
47371  # Note: m4 eats our [], so we need to use [ and ] instead.
47372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47373  if test "x$has_forbidden_chars" != x; then
47374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47378      # Going to short mode and back again did indeed matter. Since short mode is
47379      # case insensitive, let's make it lowercase to improve readability.
47380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47381      # Now convert it back to Unix-stile (cygpath)
47382      input_path=`$CYGPATH -u "$shortmode_path"`
47383      new_path="$input_path"
47384    fi
47385  fi
47386
47387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47388  if test "x$test_cygdrive_prefix" = x; then
47389    # As a simple fix, exclude /usr/bin since it's not a real path.
47390    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47392      # a path prefixed by /cygdrive for fixpath to work.
47393      new_path="$CYGWIN_ROOT_PATH$input_path"
47394    fi
47395  fi
47396
47397
47398  if test "x$path" != "x$new_path"; then
47399    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47400    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47401$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47402  fi
47403
47404    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47405
47406  path="$POTENTIAL_FREETYPE_LIB_PATH"
47407  has_colon=`$ECHO $path | $GREP ^.:`
47408  new_path="$path"
47409  if test "x$has_colon" = x; then
47410    # Not in mixed or Windows style, start by that.
47411    new_path=`cmd //c echo $path`
47412  fi
47413
47414
47415  input_path="$new_path"
47416  # Check if we need to convert this using DOS-style short mode. If the path
47417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47418  # take no chances and rewrite it.
47419  # Note: m4 eats our [], so we need to use [ and ] instead.
47420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47421  if test "x$has_forbidden_chars" != x; then
47422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47423    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47424  fi
47425
47426
47427  windows_path="$new_path"
47428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47429    unix_path=`$CYGPATH -u "$windows_path"`
47430    new_path="$unix_path"
47431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47433    new_path="$unix_path"
47434  fi
47435
47436  if test "x$path" != "x$new_path"; then
47437    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47439$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47440  fi
47441
47442  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47443  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47444
47445    else
47446      # We're on a unix platform. Hooray! :)
47447      path="$POTENTIAL_FREETYPE_LIB_PATH"
47448      has_space=`$ECHO "$path" | $GREP " "`
47449      if test "x$has_space" != x; then
47450        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47452        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47453      fi
47454
47455      # Use eval to expand a potential ~
47456      eval path="$path"
47457      if test ! -f "$path" && test ! -d "$path"; then
47458        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47459      fi
47460
47461      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47462    fi
47463  fi
47464
47465
47466    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47468$as_echo_n "checking for freetype includes... " >&6; }
47469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47470$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47471    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47472    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47473$as_echo_n "checking for freetype libraries... " >&6; }
47474    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47475$as_echo "$FREETYPE_LIB_PATH" >&6; }
47476  fi
47477
47478            else
47479
47480  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47481  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
47482  METHOD="well-known location"
47483
47484  # Let's start with an optimistic view of the world :-)
47485  FOUND_FREETYPE=yes
47486
47487  # First look for the canonical freetype main include file ft2build.h.
47488  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47489    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47490    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47491    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47492      # Fail.
47493      FOUND_FREETYPE=no
47494    fi
47495  fi
47496
47497  if test "x$FOUND_FREETYPE" = xyes; then
47498    # Include file found, let's continue the sanity check.
47499    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47500$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47501
47502    # Reset to default value
47503    FREETYPE_BASE_NAME=freetype
47504    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47505    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47506      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47507          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47508        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47509        # for the .6 version explicitly.
47510        FREETYPE_BASE_NAME=freetype.6
47511        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47512        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47513$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47514      else
47515        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47516$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47517        FOUND_FREETYPE=no
47518      fi
47519    else
47520      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47521        # On Windows, we will need both .lib and .dll file.
47522        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47523          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47524$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47525          FOUND_FREETYPE=no
47526        fi
47527      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47528          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47529        # Found lib in isa dir, use that instead.
47530        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47531        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47532$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47533      fi
47534    fi
47535  fi
47536
47537  if test "x$FOUND_FREETYPE" = xyes; then
47538
47539  # Only process if variable expands to non-empty
47540
47541  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47543
47544  # Input might be given as Windows format, start by converting to
47545  # unix format.
47546  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47547  new_path=`$CYGPATH -u "$path"`
47548
47549  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47550  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47551  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47552  # "foo.exe" is OK but "foo" is an error.
47553  #
47554  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47555  # It is also a way to make sure we got the proper file name for the real test later on.
47556  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47557  if test "x$test_shortpath" = x; then
47558    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47559$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47560    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47561  fi
47562
47563  # Call helper function which possibly converts this using DOS-style short mode.
47564  # If so, the updated path is stored in $new_path.
47565
47566  input_path="$new_path"
47567  # Check if we need to convert this using DOS-style short mode. If the path
47568  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47569  # take no chances and rewrite it.
47570  # Note: m4 eats our [], so we need to use [ and ] instead.
47571  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47572  if test "x$has_forbidden_chars" != x; then
47573    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47574    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47575    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47576    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47577      # Going to short mode and back again did indeed matter. Since short mode is
47578      # case insensitive, let's make it lowercase to improve readability.
47579      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47580      # Now convert it back to Unix-stile (cygpath)
47581      input_path=`$CYGPATH -u "$shortmode_path"`
47582      new_path="$input_path"
47583    fi
47584  fi
47585
47586  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47587  if test "x$test_cygdrive_prefix" = x; then
47588    # As a simple fix, exclude /usr/bin since it's not a real path.
47589    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47590      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47591      # a path prefixed by /cygdrive for fixpath to work.
47592      new_path="$CYGWIN_ROOT_PATH$input_path"
47593    fi
47594  fi
47595
47596
47597  if test "x$path" != "x$new_path"; then
47598    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47600$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47601  fi
47602
47603    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47604
47605  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47606  has_colon=`$ECHO $path | $GREP ^.:`
47607  new_path="$path"
47608  if test "x$has_colon" = x; then
47609    # Not in mixed or Windows style, start by that.
47610    new_path=`cmd //c echo $path`
47611  fi
47612
47613
47614  input_path="$new_path"
47615  # Check if we need to convert this using DOS-style short mode. If the path
47616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47617  # take no chances and rewrite it.
47618  # Note: m4 eats our [], so we need to use [ and ] instead.
47619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47620  if test "x$has_forbidden_chars" != x; then
47621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47622    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47623  fi
47624
47625
47626  windows_path="$new_path"
47627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47628    unix_path=`$CYGPATH -u "$windows_path"`
47629    new_path="$unix_path"
47630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47632    new_path="$unix_path"
47633  fi
47634
47635  if test "x$path" != "x$new_path"; then
47636    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47639  fi
47640
47641  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47642  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47643
47644    else
47645      # We're on a unix platform. Hooray! :)
47646      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47647      has_space=`$ECHO "$path" | $GREP " "`
47648      if test "x$has_space" != x; then
47649        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47650$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47651        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47652      fi
47653
47654      # Use eval to expand a potential ~
47655      eval path="$path"
47656      if test ! -f "$path" && test ! -d "$path"; then
47657        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47658      fi
47659
47660      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47661    fi
47662  fi
47663
47664
47665  # Only process if variable expands to non-empty
47666
47667  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47668    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47669
47670  # Input might be given as Windows format, start by converting to
47671  # unix format.
47672  path="$POTENTIAL_FREETYPE_LIB_PATH"
47673  new_path=`$CYGPATH -u "$path"`
47674
47675  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47676  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47677  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47678  # "foo.exe" is OK but "foo" is an error.
47679  #
47680  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47681  # It is also a way to make sure we got the proper file name for the real test later on.
47682  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47683  if test "x$test_shortpath" = x; then
47684    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47685$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47686    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
47687  fi
47688
47689  # Call helper function which possibly converts this using DOS-style short mode.
47690  # If so, the updated path is stored in $new_path.
47691
47692  input_path="$new_path"
47693  # Check if we need to convert this using DOS-style short mode. If the path
47694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47695  # take no chances and rewrite it.
47696  # Note: m4 eats our [], so we need to use [ and ] instead.
47697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47698  if test "x$has_forbidden_chars" != x; then
47699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47700    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47701    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47702    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47703      # Going to short mode and back again did indeed matter. Since short mode is
47704      # case insensitive, let's make it lowercase to improve readability.
47705      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47706      # Now convert it back to Unix-stile (cygpath)
47707      input_path=`$CYGPATH -u "$shortmode_path"`
47708      new_path="$input_path"
47709    fi
47710  fi
47711
47712  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47713  if test "x$test_cygdrive_prefix" = x; then
47714    # As a simple fix, exclude /usr/bin since it's not a real path.
47715    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47716      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47717      # a path prefixed by /cygdrive for fixpath to work.
47718      new_path="$CYGWIN_ROOT_PATH$input_path"
47719    fi
47720  fi
47721
47722
47723  if test "x$path" != "x$new_path"; then
47724    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47726$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47727  fi
47728
47729    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47730
47731  path="$POTENTIAL_FREETYPE_LIB_PATH"
47732  has_colon=`$ECHO $path | $GREP ^.:`
47733  new_path="$path"
47734  if test "x$has_colon" = x; then
47735    # Not in mixed or Windows style, start by that.
47736    new_path=`cmd //c echo $path`
47737  fi
47738
47739
47740  input_path="$new_path"
47741  # Check if we need to convert this using DOS-style short mode. If the path
47742  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47743  # take no chances and rewrite it.
47744  # Note: m4 eats our [], so we need to use [ and ] instead.
47745  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47746  if test "x$has_forbidden_chars" != x; then
47747    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47748    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47749  fi
47750
47751
47752  windows_path="$new_path"
47753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47754    unix_path=`$CYGPATH -u "$windows_path"`
47755    new_path="$unix_path"
47756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47758    new_path="$unix_path"
47759  fi
47760
47761  if test "x$path" != "x$new_path"; then
47762    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
47763    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
47764$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47765  fi
47766
47767  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47768  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47769
47770    else
47771      # We're on a unix platform. Hooray! :)
47772      path="$POTENTIAL_FREETYPE_LIB_PATH"
47773      has_space=`$ECHO "$path" | $GREP " "`
47774      if test "x$has_space" != x; then
47775        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47776$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47777        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47778      fi
47779
47780      # Use eval to expand a potential ~
47781      eval path="$path"
47782      if test ! -f "$path" && test ! -d "$path"; then
47783        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47784      fi
47785
47786      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47787    fi
47788  fi
47789
47790
47791    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47792    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
47793$as_echo_n "checking for freetype includes... " >&6; }
47794    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
47795$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
47796    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
47797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
47798$as_echo_n "checking for freetype libraries... " >&6; }
47799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
47800$as_echo "$FREETYPE_LIB_PATH" >&6; }
47801  fi
47802
47803              if test "x$FOUND_FREETYPE" != xyes; then
47804
47805  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
47806  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
47807  METHOD="well-known location"
47808
47809  # Let's start with an optimistic view of the world :-)
47810  FOUND_FREETYPE=yes
47811
47812  # First look for the canonical freetype main include file ft2build.h.
47813  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47814    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
47815    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
47816    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
47817      # Fail.
47818      FOUND_FREETYPE=no
47819    fi
47820  fi
47821
47822  if test "x$FOUND_FREETYPE" = xyes; then
47823    # Include file found, let's continue the sanity check.
47824    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
47825$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
47826
47827    # Reset to default value
47828    FREETYPE_BASE_NAME=freetype
47829    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47830    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
47831      if test "x$OPENJDK_TARGET_OS" = xmacosx \
47832          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
47833        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
47834        # for the .6 version explicitly.
47835        FREETYPE_BASE_NAME=freetype.6
47836        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
47837        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
47838$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
47839      else
47840        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
47841$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
47842        FOUND_FREETYPE=no
47843      fi
47844    else
47845      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47846        # On Windows, we will need both .lib and .dll file.
47847        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
47848          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
47849$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
47850          FOUND_FREETYPE=no
47851        fi
47852      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
47853          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
47854        # Found lib in isa dir, use that instead.
47855        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
47856        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
47857$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
47858      fi
47859    fi
47860  fi
47861
47862  if test "x$FOUND_FREETYPE" = xyes; then
47863
47864  # Only process if variable expands to non-empty
47865
47866  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
47867    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47868
47869  # Input might be given as Windows format, start by converting to
47870  # unix format.
47871  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47872  new_path=`$CYGPATH -u "$path"`
47873
47874  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47875  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47876  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47877  # "foo.exe" is OK but "foo" is an error.
47878  #
47879  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47880  # It is also a way to make sure we got the proper file name for the real test later on.
47881  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47882  if test "x$test_shortpath" = x; then
47883    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47885    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
47886  fi
47887
47888  # Call helper function which possibly converts this using DOS-style short mode.
47889  # If so, the updated path is stored in $new_path.
47890
47891  input_path="$new_path"
47892  # Check if we need to convert this using DOS-style short mode. If the path
47893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47894  # take no chances and rewrite it.
47895  # Note: m4 eats our [], so we need to use [ and ] instead.
47896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47897  if test "x$has_forbidden_chars" != x; then
47898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47899    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47900    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47901    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47902      # Going to short mode and back again did indeed matter. Since short mode is
47903      # case insensitive, let's make it lowercase to improve readability.
47904      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47905      # Now convert it back to Unix-stile (cygpath)
47906      input_path=`$CYGPATH -u "$shortmode_path"`
47907      new_path="$input_path"
47908    fi
47909  fi
47910
47911  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47912  if test "x$test_cygdrive_prefix" = x; then
47913    # As a simple fix, exclude /usr/bin since it's not a real path.
47914    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47915      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47916      # a path prefixed by /cygdrive for fixpath to work.
47917      new_path="$CYGWIN_ROOT_PATH$input_path"
47918    fi
47919  fi
47920
47921
47922  if test "x$path" != "x$new_path"; then
47923    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47925$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47926  fi
47927
47928    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47929
47930  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47931  has_colon=`$ECHO $path | $GREP ^.:`
47932  new_path="$path"
47933  if test "x$has_colon" = x; then
47934    # Not in mixed or Windows style, start by that.
47935    new_path=`cmd //c echo $path`
47936  fi
47937
47938
47939  input_path="$new_path"
47940  # Check if we need to convert this using DOS-style short mode. If the path
47941  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47942  # take no chances and rewrite it.
47943  # Note: m4 eats our [], so we need to use [ and ] instead.
47944  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47945  if test "x$has_forbidden_chars" != x; then
47946    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47947    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47948  fi
47949
47950
47951  windows_path="$new_path"
47952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47953    unix_path=`$CYGPATH -u "$windows_path"`
47954    new_path="$unix_path"
47955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47957    new_path="$unix_path"
47958  fi
47959
47960  if test "x$path" != "x$new_path"; then
47961    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
47962    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47963$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47964  fi
47965
47966  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47967  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47968
47969    else
47970      # We're on a unix platform. Hooray! :)
47971      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
47972      has_space=`$ECHO "$path" | $GREP " "`
47973      if test "x$has_space" != x; then
47974        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47975$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47976        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47977      fi
47978
47979      # Use eval to expand a potential ~
47980      eval path="$path"
47981      if test ! -f "$path" && test ! -d "$path"; then
47982        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47983      fi
47984
47985      POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47986    fi
47987  fi
47988
47989
47990  # Only process if variable expands to non-empty
47991
47992  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
47993    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47994
47995  # Input might be given as Windows format, start by converting to
47996  # unix format.
47997  path="$POTENTIAL_FREETYPE_LIB_PATH"
47998  new_path=`$CYGPATH -u "$path"`
47999
48000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48003  # "foo.exe" is OK but "foo" is an error.
48004  #
48005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48006  # It is also a way to make sure we got the proper file name for the real test later on.
48007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48008  if test "x$test_shortpath" = x; then
48009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48010$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48011    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
48012  fi
48013
48014  # Call helper function which possibly converts this using DOS-style short mode.
48015  # If so, the updated path is stored in $new_path.
48016
48017  input_path="$new_path"
48018  # Check if we need to convert this using DOS-style short mode. If the path
48019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48020  # take no chances and rewrite it.
48021  # Note: m4 eats our [], so we need to use [ and ] instead.
48022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48023  if test "x$has_forbidden_chars" != x; then
48024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48028      # Going to short mode and back again did indeed matter. Since short mode is
48029      # case insensitive, let's make it lowercase to improve readability.
48030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48031      # Now convert it back to Unix-stile (cygpath)
48032      input_path=`$CYGPATH -u "$shortmode_path"`
48033      new_path="$input_path"
48034    fi
48035  fi
48036
48037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48038  if test "x$test_cygdrive_prefix" = x; then
48039    # As a simple fix, exclude /usr/bin since it's not a real path.
48040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48042      # a path prefixed by /cygdrive for fixpath to work.
48043      new_path="$CYGWIN_ROOT_PATH$input_path"
48044    fi
48045  fi
48046
48047
48048  if test "x$path" != "x$new_path"; then
48049    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48051$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48052  fi
48053
48054    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48055
48056  path="$POTENTIAL_FREETYPE_LIB_PATH"
48057  has_colon=`$ECHO $path | $GREP ^.:`
48058  new_path="$path"
48059  if test "x$has_colon" = x; then
48060    # Not in mixed or Windows style, start by that.
48061    new_path=`cmd //c echo $path`
48062  fi
48063
48064
48065  input_path="$new_path"
48066  # Check if we need to convert this using DOS-style short mode. If the path
48067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48068  # take no chances and rewrite it.
48069  # Note: m4 eats our [], so we need to use [ and ] instead.
48070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48071  if test "x$has_forbidden_chars" != x; then
48072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48074  fi
48075
48076
48077  windows_path="$new_path"
48078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48079    unix_path=`$CYGPATH -u "$windows_path"`
48080    new_path="$unix_path"
48081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48083    new_path="$unix_path"
48084  fi
48085
48086  if test "x$path" != "x$new_path"; then
48087    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
48088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
48089$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48090  fi
48091
48092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48094
48095    else
48096      # We're on a unix platform. Hooray! :)
48097      path="$POTENTIAL_FREETYPE_LIB_PATH"
48098      has_space=`$ECHO "$path" | $GREP " "`
48099      if test "x$has_space" != x; then
48100        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48101$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48102        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48103      fi
48104
48105      # Use eval to expand a potential ~
48106      eval path="$path"
48107      if test ! -f "$path" && test ! -d "$path"; then
48108        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48109      fi
48110
48111      POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48112    fi
48113  fi
48114
48115
48116    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
48117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
48118$as_echo_n "checking for freetype includes... " >&6; }
48119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
48120$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
48121    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
48122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
48123$as_echo_n "checking for freetype libraries... " >&6; }
48124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
48125$as_echo "$FREETYPE_LIB_PATH" >&6; }
48126  fi
48127
48128              fi
48129            fi
48130          fi
48131        fi
48132      fi # end check in well-known locations
48133
48134      if test "x$FOUND_FREETYPE" != xyes; then
48135
48136  # Print a helpful message on how to acquire the necessary build dependency.
48137  # freetype is the help tag: freetype, cups, pulse, alsa etc
48138  MISSING_DEPENDENCY=freetype
48139
48140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48141    cygwin_help $MISSING_DEPENDENCY
48142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48143    msys_help $MISSING_DEPENDENCY
48144  else
48145    PKGHANDLER_COMMAND=
48146
48147    case $PKGHANDLER in
48148      apt-get)
48149        apt_help     $MISSING_DEPENDENCY ;;
48150      yum)
48151        yum_help     $MISSING_DEPENDENCY ;;
48152      port)
48153        port_help    $MISSING_DEPENDENCY ;;
48154      pkgutil)
48155        pkgutil_help $MISSING_DEPENDENCY ;;
48156      pkgadd)
48157        pkgadd_help  $MISSING_DEPENDENCY ;;
48158    esac
48159
48160    if test "x$PKGHANDLER_COMMAND" != x; then
48161      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48162    fi
48163  fi
48164
48165        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
48166      fi
48167    fi # end user specified settings
48168
48169    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
48170    if test "x$FREETYPE_CFLAGS" = x; then
48171
48172  # Only process if variable expands to non-empty
48173
48174  if test "x$FREETYPE_INCLUDE_PATH" != x; then
48175    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48176
48177  # Input might be given as Windows format, start by converting to
48178  # unix format.
48179  path="$FREETYPE_INCLUDE_PATH"
48180  new_path=`$CYGPATH -u "$path"`
48181
48182  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48183  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48184  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48185  # "foo.exe" is OK but "foo" is an error.
48186  #
48187  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48188  # It is also a way to make sure we got the proper file name for the real test later on.
48189  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48190  if test "x$test_shortpath" = x; then
48191    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48192$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48193    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
48194  fi
48195
48196  # Call helper function which possibly converts this using DOS-style short mode.
48197  # If so, the updated path is stored in $new_path.
48198
48199  input_path="$new_path"
48200  # Check if we need to convert this using DOS-style short mode. If the path
48201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48202  # take no chances and rewrite it.
48203  # Note: m4 eats our [], so we need to use [ and ] instead.
48204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48205  if test "x$has_forbidden_chars" != x; then
48206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48207    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48208    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48209    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48210      # Going to short mode and back again did indeed matter. Since short mode is
48211      # case insensitive, let's make it lowercase to improve readability.
48212      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48213      # Now convert it back to Unix-stile (cygpath)
48214      input_path=`$CYGPATH -u "$shortmode_path"`
48215      new_path="$input_path"
48216    fi
48217  fi
48218
48219  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48220  if test "x$test_cygdrive_prefix" = x; then
48221    # As a simple fix, exclude /usr/bin since it's not a real path.
48222    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48223      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48224      # a path prefixed by /cygdrive for fixpath to work.
48225      new_path="$CYGWIN_ROOT_PATH$input_path"
48226    fi
48227  fi
48228
48229
48230  if test "x$path" != "x$new_path"; then
48231    FREETYPE_INCLUDE_PATH="$new_path"
48232    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48233$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48234  fi
48235
48236    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48237
48238  path="$FREETYPE_INCLUDE_PATH"
48239  has_colon=`$ECHO $path | $GREP ^.:`
48240  new_path="$path"
48241  if test "x$has_colon" = x; then
48242    # Not in mixed or Windows style, start by that.
48243    new_path=`cmd //c echo $path`
48244  fi
48245
48246
48247  input_path="$new_path"
48248  # Check if we need to convert this using DOS-style short mode. If the path
48249  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48250  # take no chances and rewrite it.
48251  # Note: m4 eats our [], so we need to use [ and ] instead.
48252  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48253  if test "x$has_forbidden_chars" != x; then
48254    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48255    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48256  fi
48257
48258
48259  windows_path="$new_path"
48260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48261    unix_path=`$CYGPATH -u "$windows_path"`
48262    new_path="$unix_path"
48263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48265    new_path="$unix_path"
48266  fi
48267
48268  if test "x$path" != "x$new_path"; then
48269    FREETYPE_INCLUDE_PATH="$new_path"
48270    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
48271$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
48272  fi
48273
48274  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48275  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48276
48277    else
48278      # We're on a unix platform. Hooray! :)
48279      path="$FREETYPE_INCLUDE_PATH"
48280      has_space=`$ECHO "$path" | $GREP " "`
48281      if test "x$has_space" != x; then
48282        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
48283$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
48284        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48285      fi
48286
48287      # Use eval to expand a potential ~
48288      eval path="$path"
48289      if test ! -f "$path" && test ! -d "$path"; then
48290        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48291      fi
48292
48293      FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
48294    fi
48295  fi
48296
48297      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
48298        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
48299      else
48300        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
48301      fi
48302    fi
48303
48304    if test "x$FREETYPE_LIBS" = x; then
48305
48306  # Only process if variable expands to non-empty
48307
48308  if test "x$FREETYPE_LIB_PATH" != x; then
48309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48310
48311  # Input might be given as Windows format, start by converting to
48312  # unix format.
48313  path="$FREETYPE_LIB_PATH"
48314  new_path=`$CYGPATH -u "$path"`
48315
48316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48319  # "foo.exe" is OK but "foo" is an error.
48320  #
48321  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48322  # It is also a way to make sure we got the proper file name for the real test later on.
48323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48324  if test "x$test_shortpath" = x; then
48325    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48326$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48327    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
48328  fi
48329
48330  # Call helper function which possibly converts this using DOS-style short mode.
48331  # If so, the updated path is stored in $new_path.
48332
48333  input_path="$new_path"
48334  # Check if we need to convert this using DOS-style short mode. If the path
48335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48336  # take no chances and rewrite it.
48337  # Note: m4 eats our [], so we need to use [ and ] instead.
48338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48339  if test "x$has_forbidden_chars" != x; then
48340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48341    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48342    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48343    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48344      # Going to short mode and back again did indeed matter. Since short mode is
48345      # case insensitive, let's make it lowercase to improve readability.
48346      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48347      # Now convert it back to Unix-stile (cygpath)
48348      input_path=`$CYGPATH -u "$shortmode_path"`
48349      new_path="$input_path"
48350    fi
48351  fi
48352
48353  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48354  if test "x$test_cygdrive_prefix" = x; then
48355    # As a simple fix, exclude /usr/bin since it's not a real path.
48356    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48357      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48358      # a path prefixed by /cygdrive for fixpath to work.
48359      new_path="$CYGWIN_ROOT_PATH$input_path"
48360    fi
48361  fi
48362
48363
48364  if test "x$path" != "x$new_path"; then
48365    FREETYPE_LIB_PATH="$new_path"
48366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48367$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48368  fi
48369
48370    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48371
48372  path="$FREETYPE_LIB_PATH"
48373  has_colon=`$ECHO $path | $GREP ^.:`
48374  new_path="$path"
48375  if test "x$has_colon" = x; then
48376    # Not in mixed or Windows style, start by that.
48377    new_path=`cmd //c echo $path`
48378  fi
48379
48380
48381  input_path="$new_path"
48382  # Check if we need to convert this using DOS-style short mode. If the path
48383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48384  # take no chances and rewrite it.
48385  # Note: m4 eats our [], so we need to use [ and ] instead.
48386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48387  if test "x$has_forbidden_chars" != x; then
48388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48390  fi
48391
48392
48393  windows_path="$new_path"
48394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48395    unix_path=`$CYGPATH -u "$windows_path"`
48396    new_path="$unix_path"
48397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48399    new_path="$unix_path"
48400  fi
48401
48402  if test "x$path" != "x$new_path"; then
48403    FREETYPE_LIB_PATH="$new_path"
48404    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
48405$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
48406  fi
48407
48408  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48409  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48410
48411    else
48412      # We're on a unix platform. Hooray! :)
48413      path="$FREETYPE_LIB_PATH"
48414      has_space=`$ECHO "$path" | $GREP " "`
48415      if test "x$has_space" != x; then
48416        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
48417$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
48418        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48419      fi
48420
48421      # Use eval to expand a potential ~
48422      eval path="$path"
48423      if test ! -f "$path" && test ! -d "$path"; then
48424        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
48425      fi
48426
48427      FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
48428    fi
48429  fi
48430
48431      if test "x$OPENJDK_TARGET_OS" = xwindows; then
48432        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
48433      else
48434        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
48435      fi
48436    fi
48437
48438    # Try to compile it
48439    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
48440$as_echo_n "checking if we can compile and link with freetype... " >&6; }
48441    ac_ext=cpp
48442ac_cpp='$CXXCPP $CPPFLAGS'
48443ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48444ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48445ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48446
48447    PREV_CXXCFLAGS="$CXXFLAGS"
48448    PREV_LIBS="$LIBS"
48449    PREV_CXX="$CXX"
48450    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
48451    LIBS="$LIBS $FREETYPE_LIBS"
48452    CXX="$FIXPATH $CXX"
48453    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48454/* end confdefs.h.  */
48455
48456          #include<ft2build.h>
48457          #include FT_FREETYPE_H
48458          int main () {
48459            FT_Init_FreeType(NULL);
48460            return 0;
48461          }
48462
48463_ACEOF
48464if ac_fn_cxx_try_link "$LINENO"; then :
48465
48466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48467$as_echo "yes" >&6; }
48468
48469else
48470
48471          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48472$as_echo "no" >&6; }
48473          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
48474$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
48475          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
48476$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
48477
48478
48479  # Print a helpful message on how to acquire the necessary build dependency.
48480  # freetype is the help tag: freetype, cups, pulse, alsa etc
48481  MISSING_DEPENDENCY=freetype
48482
48483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48484    cygwin_help $MISSING_DEPENDENCY
48485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48486    msys_help $MISSING_DEPENDENCY
48487  else
48488    PKGHANDLER_COMMAND=
48489
48490    case $PKGHANDLER in
48491      apt-get)
48492        apt_help     $MISSING_DEPENDENCY ;;
48493      yum)
48494        yum_help     $MISSING_DEPENDENCY ;;
48495      port)
48496        port_help    $MISSING_DEPENDENCY ;;
48497      pkgutil)
48498        pkgutil_help $MISSING_DEPENDENCY ;;
48499      pkgadd)
48500        pkgadd_help  $MISSING_DEPENDENCY ;;
48501    esac
48502
48503    if test "x$PKGHANDLER_COMMAND" != x; then
48504      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48505    fi
48506  fi
48507
48508
48509          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
48510
48511
48512fi
48513rm -f core conftest.err conftest.$ac_objext \
48514    conftest$ac_exeext conftest.$ac_ext
48515    CXXCFLAGS="$PREV_CXXFLAGS"
48516    LIBS="$PREV_LIBS"
48517    CXX="$PREV_CXX"
48518    ac_ext=cpp
48519ac_cpp='$CXXCPP $CPPFLAGS'
48520ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48521ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48522ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48523
48524
48525    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
48526$as_echo_n "checking if we should bundle freetype... " >&6; }
48527    if test "x$BUNDLE_FREETYPE" = xyes; then
48528      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
48529    fi
48530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
48531$as_echo "$BUNDLE_FREETYPE" >&6; }
48532
48533  fi # end freetype needed
48534
48535
48536
48537
48538
48539
48540
48541  ###############################################################################
48542  #
48543  # Check for alsa headers and libraries. Used on Linux/GNU systems.
48544  #
48545
48546# Check whether --with-alsa was given.
48547if test "${with_alsa+set}" = set; then :
48548  withval=$with_alsa;
48549fi
48550
48551
48552# Check whether --with-alsa-include was given.
48553if test "${with_alsa_include+set}" = set; then :
48554  withval=$with_alsa_include;
48555fi
48556
48557
48558# Check whether --with-alsa-lib was given.
48559if test "${with_alsa_lib+set}" = set; then :
48560  withval=$with_alsa_lib;
48561fi
48562
48563
48564  if test "x$ALSA_NOT_NEEDED" = xyes; then
48565    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
48566      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
48567$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
48568    fi
48569    ALSA_CFLAGS=
48570    ALSA_LIBS=
48571  else
48572    ALSA_FOUND=no
48573
48574    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
48575      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
48576    fi
48577
48578    if test "x${with_alsa}" != x; then
48579      ALSA_LIBS="-L${with_alsa}/lib -lasound"
48580      ALSA_CFLAGS="-I${with_alsa}/include"
48581      ALSA_FOUND=yes
48582    fi
48583    if test "x${with_alsa_include}" != x; then
48584      ALSA_CFLAGS="-I${with_alsa_include}"
48585      ALSA_FOUND=yes
48586    fi
48587    if test "x${with_alsa_lib}" != x; then
48588      ALSA_LIBS="-L${with_alsa_lib} -lasound"
48589      ALSA_FOUND=yes
48590    fi
48591    if test "x$ALSA_FOUND" = xno; then
48592
48593
48594  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
48595    # Source the builddeps file again, to make sure it uses the latest variables!
48596    . $builddepsfile
48597    # Look for a target and build machine specific resource!
48598    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
48599    if test "x$resource" = x; then
48600      # Ok, lets instead look for a target specific resource
48601      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
48602    fi
48603    if test "x$resource" = x; then
48604      # Ok, lets instead look for a build specific resource
48605      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
48606    fi
48607    if test "x$resource" = x; then
48608      # Ok, lets instead look for a generic resource
48609      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
48610      resource=${builddep_alsa}
48611    fi
48612    if test "x$resource" != x; then
48613      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
48614$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
48615      # If the resource in the builddeps.conf file is an existing directory,
48616      # for example /java/linux/cups
48617      if test -d ${resource}; then
48618        depdir=${resource}
48619      else
48620
48621  # alsa is for example mymodule
48622  # $resource is for example libs/general/libmymod_1_2_3.zip
48623  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
48624  # $with_builddeps_dir is for example /localhome/builddeps
48625  # depdir is the name of the variable into which we store the depdir, eg MYMOD
48626  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
48627  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
48628  filename=`basename $resource`
48629  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
48630  filebase=${filename%%.*}
48631  extension=${filename#*.}
48632  installdir=$with_builddeps_dir/$filebase
48633  if test ! -f $installdir/$filename.unpacked; then
48634    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
48635$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
48636    if test ! -d $installdir; then
48637      mkdir -p $installdir
48638    fi
48639    if test ! -d $installdir; then
48640      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
48641    fi
48642    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
48643    touch $tmpfile
48644    if test ! -f $tmpfile; then
48645      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
48646    fi
48647
48648  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
48649  # $tmpfile is the local file name for the downloaded file.
48650  VALID_TOOL=no
48651  if test "x$BDEPS_FTP" = xwget; then
48652    VALID_TOOL=yes
48653    wget -O $tmpfile $with_builddeps_server/$resource
48654  fi
48655  if test "x$BDEPS_FTP" = xlftp; then
48656    VALID_TOOL=yes
48657    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
48658  fi
48659  if test "x$BDEPS_FTP" = xftp; then
48660    VALID_TOOL=yes
48661    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
48662    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
48663    FTPUSERPWD=${FTPSERVER%%@*}
48664    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
48665      FTPUSER=${userpwd%%:*}
48666      FTPPWD=${userpwd#*@}
48667      FTPSERVER=${FTPSERVER#*@}
48668    else
48669      FTPUSER=ftp
48670      FTPPWD=ftp
48671    fi
48672    # the "pass" command does not work on some
48673    # ftp clients (read ftp.exe) but if it works,
48674    # passive mode is better!
48675    ( \
48676        echo "user $FTPUSER $FTPPWD"        ; \
48677        echo "pass"                         ; \
48678        echo "bin"                          ; \
48679        echo "get $FTPPATH $tmpfile"              ; \
48680    ) | ftp -in $FTPSERVER
48681  fi
48682  if test "x$VALID_TOOL" != xyes; then
48683    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
48684  fi
48685
48686    mv $tmpfile $installdir/$filename
48687    if test ! -s $installdir/$filename; then
48688      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
48689    fi
48690    case "$extension" in
48691      zip)  echo "Unzipping $installdir/$filename..."
48692        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
48693        ;;
48694      tar.gz) echo "Untaring $installdir/$filename..."
48695        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48696        ;;
48697      tgz) echo "Untaring $installdir/$filename..."
48698        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
48699        ;;
48700      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
48701        ;;
48702    esac
48703  fi
48704  if test -f $installdir/$filename.unpacked; then
48705    depdir=$installdir
48706  fi
48707
48708      fi
48709      # Source the builddeps file again, because in the previous command, the depdir
48710      # was updated to point at the current build dependency install directory.
48711      . $builddepsfile
48712      # Now extract variables from the builddeps.conf files.
48713      theroot=${builddep_alsa_ROOT}
48714      thecflags=${builddep_alsa_CFLAGS}
48715      thelibs=${builddep_alsa_LIBS}
48716      if test "x$depdir" = x; then
48717        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
48718      fi
48719      ALSA=$depdir
48720      if test "x$theroot" != x; then
48721        ALSA="$theroot"
48722      fi
48723      if test "x$thecflags" != x; then
48724        ALSA_CFLAGS="$thecflags"
48725      fi
48726      if test "x$thelibs" != x; then
48727        ALSA_LIBS="$thelibs"
48728      fi
48729      ALSA_FOUND=yes
48730      else ALSA_FOUND=no
48731
48732    fi
48733    else ALSA_FOUND=no
48734
48735  fi
48736
48737    fi
48738    # Do not try pkg-config if we have a sysroot set.
48739    if test "x$SYSROOT" = x; then
48740      if test "x$ALSA_FOUND" = xno; then
48741
48742pkg_failed=no
48743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
48744$as_echo_n "checking for ALSA... " >&6; }
48745
48746if test -n "$ALSA_CFLAGS"; then
48747    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
48748 elif test -n "$PKG_CONFIG"; then
48749    if test -n "$PKG_CONFIG" && \
48750    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48751  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48752  ac_status=$?
48753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48754  test $ac_status = 0; }; then
48755  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
48756else
48757  pkg_failed=yes
48758fi
48759 else
48760    pkg_failed=untried
48761fi
48762if test -n "$ALSA_LIBS"; then
48763    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
48764 elif test -n "$PKG_CONFIG"; then
48765    if test -n "$PKG_CONFIG" && \
48766    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
48767  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
48768  ac_status=$?
48769  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48770  test $ac_status = 0; }; then
48771  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
48772else
48773  pkg_failed=yes
48774fi
48775 else
48776    pkg_failed=untried
48777fi
48778
48779
48780
48781if test $pkg_failed = yes; then
48782
48783if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48784        _pkg_short_errors_supported=yes
48785else
48786        _pkg_short_errors_supported=no
48787fi
48788        if test $_pkg_short_errors_supported = yes; then
48789	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
48790        else
48791	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
48792        fi
48793	# Put the nasty error message in config.log where it belongs
48794	echo "$ALSA_PKG_ERRORS" >&5
48795
48796	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48797$as_echo "no" >&6; }
48798                ALSA_FOUND=no
48799elif test $pkg_failed = untried; then
48800	ALSA_FOUND=no
48801else
48802	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
48803	ALSA_LIBS=$pkg_cv_ALSA_LIBS
48804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48805$as_echo "yes" >&6; }
48806	ALSA_FOUND=yes
48807fi
48808      fi
48809    fi
48810    if test "x$ALSA_FOUND" = xno; then
48811      for ac_header in alsa/asoundlib.h
48812do :
48813  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
48814if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
48815  cat >>confdefs.h <<_ACEOF
48816#define HAVE_ALSA_ASOUNDLIB_H 1
48817_ACEOF
48818
48819            ALSA_FOUND=yes
48820            ALSA_CFLAGS=-Iignoreme
48821            ALSA_LIBS=-lasound
48822            DEFAULT_ALSA=yes
48823
48824else
48825  ALSA_FOUND=no
48826fi
48827
48828done
48829
48830    fi
48831    if test "x$ALSA_FOUND" = xno; then
48832
48833  # Print a helpful message on how to acquire the necessary build dependency.
48834  # alsa is the help tag: freetype, cups, pulse, alsa etc
48835  MISSING_DEPENDENCY=alsa
48836
48837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48838    cygwin_help $MISSING_DEPENDENCY
48839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48840    msys_help $MISSING_DEPENDENCY
48841  else
48842    PKGHANDLER_COMMAND=
48843
48844    case $PKGHANDLER in
48845      apt-get)
48846        apt_help     $MISSING_DEPENDENCY ;;
48847      yum)
48848        yum_help     $MISSING_DEPENDENCY ;;
48849      port)
48850        port_help    $MISSING_DEPENDENCY ;;
48851      pkgutil)
48852        pkgutil_help $MISSING_DEPENDENCY ;;
48853      pkgadd)
48854        pkgadd_help  $MISSING_DEPENDENCY ;;
48855    esac
48856
48857    if test "x$PKGHANDLER_COMMAND" != x; then
48858      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48859    fi
48860  fi
48861
48862      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
48863    fi
48864  fi
48865
48866
48867
48868
48869
48870
48871  ###############################################################################
48872  #
48873  # Check for the jpeg library
48874  #
48875
48876
48877# Check whether --with-libjpeg was given.
48878if test "${with_libjpeg+set}" = set; then :
48879  withval=$with_libjpeg;
48880fi
48881
48882
48883  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
48884$as_echo_n "checking for which libjpeg to use... " >&6; }
48885
48886  # default is bundled
48887  DEFAULT_LIBJPEG=bundled
48888
48889  #
48890  # if user didn't specify, use DEFAULT_LIBJPEG
48891  #
48892  if test "x${with_libjpeg}" = "x"; then
48893    with_libjpeg=${DEFAULT_LIBJPEG}
48894  fi
48895
48896  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
48897$as_echo "${with_libjpeg}" >&6; }
48898
48899  if test "x${with_libjpeg}" = "xbundled"; then
48900    USE_EXTERNAL_LIBJPEG=false
48901  elif test "x${with_libjpeg}" = "xsystem"; then
48902    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
48903if test "x$ac_cv_header_jpeglib_h" = xyes; then :
48904
48905else
48906   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
48907fi
48908
48909
48910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
48911$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
48912if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
48913  $as_echo_n "(cached) " >&6
48914else
48915  ac_check_lib_save_LIBS=$LIBS
48916LIBS="-ljpeg  $LIBS"
48917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48918/* end confdefs.h.  */
48919
48920/* Override any GCC internal prototype to avoid an error.
48921   Use char because int might match the return type of a GCC
48922   builtin and then its argument prototype would still apply.  */
48923#ifdef __cplusplus
48924extern "C"
48925#endif
48926char jpeg_CreateDecompress ();
48927int
48928main ()
48929{
48930return jpeg_CreateDecompress ();
48931  ;
48932  return 0;
48933}
48934_ACEOF
48935if ac_fn_cxx_try_link "$LINENO"; then :
48936  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
48937else
48938  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
48939fi
48940rm -f core conftest.err conftest.$ac_objext \
48941    conftest$ac_exeext conftest.$ac_ext
48942LIBS=$ac_check_lib_save_LIBS
48943fi
48944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
48945$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
48946if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
48947  cat >>confdefs.h <<_ACEOF
48948#define HAVE_LIBJPEG 1
48949_ACEOF
48950
48951  LIBS="-ljpeg $LIBS"
48952
48953else
48954   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
48955fi
48956
48957
48958    USE_EXTERNAL_LIBJPEG=true
48959  else
48960    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
48961  fi
48962
48963
48964
48965  ###############################################################################
48966  #
48967  # Check for the gif library
48968  #
48969
48970
48971# Check whether --with-giflib was given.
48972if test "${with_giflib+set}" = set; then :
48973  withval=$with_giflib;
48974fi
48975
48976
48977
48978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
48979$as_echo_n "checking for which giflib to use... " >&6; }
48980
48981  # default is bundled
48982  DEFAULT_GIFLIB=bundled
48983
48984  #
48985  # if user didn't specify, use DEFAULT_GIFLIB
48986  #
48987  if test "x${with_giflib}" = "x"; then
48988    with_giflib=${DEFAULT_GIFLIB}
48989  fi
48990
48991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
48992$as_echo "${with_giflib}" >&6; }
48993
48994  if test "x${with_giflib}" = "xbundled"; then
48995    USE_EXTERNAL_LIBGIF=false
48996  elif test "x${with_giflib}" = "xsystem"; then
48997    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
48998if test "x$ac_cv_header_gif_lib_h" = xyes; then :
48999
49000else
49001   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
49002fi
49003
49004
49005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
49006$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
49007if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
49008  $as_echo_n "(cached) " >&6
49009else
49010  ac_check_lib_save_LIBS=$LIBS
49011LIBS="-lgif  $LIBS"
49012cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49013/* end confdefs.h.  */
49014
49015/* Override any GCC internal prototype to avoid an error.
49016   Use char because int might match the return type of a GCC
49017   builtin and then its argument prototype would still apply.  */
49018#ifdef __cplusplus
49019extern "C"
49020#endif
49021char DGifGetCode ();
49022int
49023main ()
49024{
49025return DGifGetCode ();
49026  ;
49027  return 0;
49028}
49029_ACEOF
49030if ac_fn_cxx_try_link "$LINENO"; then :
49031  ac_cv_lib_gif_DGifGetCode=yes
49032else
49033  ac_cv_lib_gif_DGifGetCode=no
49034fi
49035rm -f core conftest.err conftest.$ac_objext \
49036    conftest$ac_exeext conftest.$ac_ext
49037LIBS=$ac_check_lib_save_LIBS
49038fi
49039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
49040$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
49041if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
49042  cat >>confdefs.h <<_ACEOF
49043#define HAVE_LIBGIF 1
49044_ACEOF
49045
49046  LIBS="-lgif $LIBS"
49047
49048else
49049   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
49050fi
49051
49052
49053    USE_EXTERNAL_LIBGIF=true
49054  else
49055    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
49056  fi
49057
49058
49059  ###############################################################################
49060  #
49061  # Check for the lcms2 library
49062  #
49063
49064
49065# Check whether --with-lcms was given.
49066if test "${with_lcms+set}" = set; then :
49067  withval=$with_lcms;
49068fi
49069
49070
49071  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
49072$as_echo_n "checking for which lcms to use... " >&6; }
49073
49074  DEFAULT_LCMS=bundled
49075
49076  #
49077  # If user didn't specify, use DEFAULT_LCMS
49078  #
49079  if test "x${with_lcms}" = "x"; then
49080      with_lcms=${DEFAULT_LCMS}
49081  fi
49082
49083  if test "x${with_lcms}" = "xbundled"; then
49084    USE_EXTERNAL_LCMS=false
49085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49086$as_echo "bundled" >&6; }
49087  elif test "x${with_lcms}" = "xsystem"; then
49088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49089$as_echo "system" >&6; }
49090
49091pkg_failed=no
49092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
49093$as_echo_n "checking for LCMS... " >&6; }
49094
49095if test -n "$LCMS_CFLAGS"; then
49096    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
49097 elif test -n "$PKG_CONFIG"; then
49098    if test -n "$PKG_CONFIG" && \
49099    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49100  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49101  ac_status=$?
49102  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49103  test $ac_status = 0; }; then
49104  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
49105else
49106  pkg_failed=yes
49107fi
49108 else
49109    pkg_failed=untried
49110fi
49111if test -n "$LCMS_LIBS"; then
49112    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
49113 elif test -n "$PKG_CONFIG"; then
49114    if test -n "$PKG_CONFIG" && \
49115    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
49116  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
49117  ac_status=$?
49118  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49119  test $ac_status = 0; }; then
49120  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
49121else
49122  pkg_failed=yes
49123fi
49124 else
49125    pkg_failed=untried
49126fi
49127
49128
49129
49130if test $pkg_failed = yes; then
49131
49132if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49133        _pkg_short_errors_supported=yes
49134else
49135        _pkg_short_errors_supported=no
49136fi
49137        if test $_pkg_short_errors_supported = yes; then
49138	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
49139        else
49140	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
49141        fi
49142	# Put the nasty error message in config.log where it belongs
49143	echo "$LCMS_PKG_ERRORS" >&5
49144
49145	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49146$as_echo "no" >&6; }
49147                LCMS_FOUND=no
49148elif test $pkg_failed = untried; then
49149	LCMS_FOUND=no
49150else
49151	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
49152	LCMS_LIBS=$pkg_cv_LCMS_LIBS
49153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49154$as_echo "yes" >&6; }
49155	LCMS_FOUND=yes
49156fi
49157    if test "x${LCMS_FOUND}" = "xyes"; then
49158      USE_EXTERNAL_LCMS=true
49159    else
49160      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
49161    fi
49162  else
49163    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
49164  fi
49165
49166
49167
49168  ###############################################################################
49169  #
49170  # Check for the png library
49171  #
49172
49173
49174# Check whether --with-libpng was given.
49175if test "${with_libpng+set}" = set; then :
49176  withval=$with_libpng;
49177fi
49178
49179
49180
49181  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
49182$as_echo_n "checking for which libpng to use... " >&6; }
49183
49184  # default is bundled
49185  DEFAULT_LIBPNG=bundled
49186
49187  #
49188  # if user didn't specify, use DEFAULT_LIBPNG
49189  #
49190  if test "x${with_libpng}" = "x"; then
49191      with_libpng=${DEFAULT_LIBPNG}
49192  fi
49193
49194  if test "x${with_libpng}" = "xbundled"; then
49195      USE_EXTERNAL_LIBPNG=false
49196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49197$as_echo "bundled" >&6; }
49198  elif test "x${with_libpng}" = "xsystem"; then
49199
49200pkg_failed=no
49201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
49202$as_echo_n "checking for PNG... " >&6; }
49203
49204if test -n "$PNG_CFLAGS"; then
49205    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
49206 elif test -n "$PKG_CONFIG"; then
49207    if test -n "$PKG_CONFIG" && \
49208    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49209  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49210  ac_status=$?
49211  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49212  test $ac_status = 0; }; then
49213  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
49214else
49215  pkg_failed=yes
49216fi
49217 else
49218    pkg_failed=untried
49219fi
49220if test -n "$PNG_LIBS"; then
49221    pkg_cv_PNG_LIBS="$PNG_LIBS"
49222 elif test -n "$PKG_CONFIG"; then
49223    if test -n "$PKG_CONFIG" && \
49224    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
49225  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
49226  ac_status=$?
49227  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49228  test $ac_status = 0; }; then
49229  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
49230else
49231  pkg_failed=yes
49232fi
49233 else
49234    pkg_failed=untried
49235fi
49236
49237
49238
49239if test $pkg_failed = yes; then
49240
49241if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49242        _pkg_short_errors_supported=yes
49243else
49244        _pkg_short_errors_supported=no
49245fi
49246        if test $_pkg_short_errors_supported = yes; then
49247	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
49248        else
49249	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
49250        fi
49251	# Put the nasty error message in config.log where it belongs
49252	echo "$PNG_PKG_ERRORS" >&5
49253
49254	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49255$as_echo "no" >&6; }
49256                 LIBPNG_FOUND=no
49257elif test $pkg_failed = untried; then
49258	 LIBPNG_FOUND=no
49259else
49260	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
49261	PNG_LIBS=$pkg_cv_PNG_LIBS
49262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49263$as_echo "yes" >&6; }
49264	 LIBPNG_FOUND=yes
49265fi
49266      if test "x${LIBPNG_FOUND}" = "xyes"; then
49267          USE_EXTERNAL_LIBPNG=true
49268          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49269$as_echo "system" >&6; }
49270      else
49271          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49272$as_echo "system not found" >&6; }
49273          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
49274      fi
49275  else
49276      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
49277  fi
49278
49279
49280  ###############################################################################
49281  #
49282  # Check for the zlib library
49283  #
49284
49285
49286# Check whether --with-zlib was given.
49287if test "${with_zlib+set}" = set; then :
49288  withval=$with_zlib;
49289fi
49290
49291
49292  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
49293$as_echo_n "checking for compress in -lz... " >&6; }
49294if ${ac_cv_lib_z_compress+:} false; then :
49295  $as_echo_n "(cached) " >&6
49296else
49297  ac_check_lib_save_LIBS=$LIBS
49298LIBS="-lz  $LIBS"
49299cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49300/* end confdefs.h.  */
49301
49302/* Override any GCC internal prototype to avoid an error.
49303   Use char because int might match the return type of a GCC
49304   builtin and then its argument prototype would still apply.  */
49305#ifdef __cplusplus
49306extern "C"
49307#endif
49308char compress ();
49309int
49310main ()
49311{
49312return compress ();
49313  ;
49314  return 0;
49315}
49316_ACEOF
49317if ac_fn_cxx_try_link "$LINENO"; then :
49318  ac_cv_lib_z_compress=yes
49319else
49320  ac_cv_lib_z_compress=no
49321fi
49322rm -f core conftest.err conftest.$ac_objext \
49323    conftest$ac_exeext conftest.$ac_ext
49324LIBS=$ac_check_lib_save_LIBS
49325fi
49326{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
49327$as_echo "$ac_cv_lib_z_compress" >&6; }
49328if test "x$ac_cv_lib_z_compress" = xyes; then :
49329   ZLIB_FOUND=yes
49330else
49331   ZLIB_FOUND=no
49332fi
49333
49334
49335  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
49336$as_echo_n "checking for which zlib to use... " >&6; }
49337
49338  DEFAULT_ZLIB=bundled
49339  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49340    #
49341    # On macosx default is system...on others default is
49342    #
49343    DEFAULT_ZLIB=system
49344  fi
49345
49346  if test "x${ZLIB_FOUND}" != "xyes"; then
49347    #
49348    # If we don't find any system...set default to bundled
49349    #
49350    DEFAULT_ZLIB=bundled
49351  fi
49352
49353  #
49354  # If user didn't specify, use DEFAULT_ZLIB
49355  #
49356  if test "x${with_zlib}" = "x"; then
49357    with_zlib=${DEFAULT_ZLIB}
49358  fi
49359
49360  if test "x${with_zlib}" = "xbundled"; then
49361    USE_EXTERNAL_LIBZ=false
49362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
49363$as_echo "bundled" >&6; }
49364  elif test "x${with_zlib}" = "xsystem"; then
49365    if test "x${ZLIB_FOUND}" = "xyes"; then
49366      USE_EXTERNAL_LIBZ=true
49367      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
49368$as_echo "system" >&6; }
49369    else
49370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
49371$as_echo "system not found" >&6; }
49372      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
49373    fi
49374  else
49375    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
49376  fi
49377
49378
49379
49380  ###############################################################################
49381  LIBZIP_CAN_USE_MMAP=true
49382
49383
49384
49385  ###############################################################################
49386  #
49387  # Check if altzone exists in time.h
49388  #
49389
49390  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49391/* end confdefs.h.  */
49392#include <time.h>
49393int
49394main ()
49395{
49396return (int)altzone;
49397  ;
49398  return 0;
49399}
49400_ACEOF
49401if ac_fn_cxx_try_link "$LINENO"; then :
49402  has_altzone=yes
49403else
49404  has_altzone=no
49405fi
49406rm -f core conftest.err conftest.$ac_objext \
49407    conftest$ac_exeext conftest.$ac_ext
49408  if test "x$has_altzone" = xyes; then
49409
49410$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
49411
49412  fi
49413
49414  ###############################################################################
49415  #
49416  # Check the maths library
49417  #
49418
49419  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
49420$as_echo_n "checking for cos in -lm... " >&6; }
49421if ${ac_cv_lib_m_cos+:} false; then :
49422  $as_echo_n "(cached) " >&6
49423else
49424  ac_check_lib_save_LIBS=$LIBS
49425LIBS="-lm  $LIBS"
49426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49427/* end confdefs.h.  */
49428
49429/* Override any GCC internal prototype to avoid an error.
49430   Use char because int might match the return type of a GCC
49431   builtin and then its argument prototype would still apply.  */
49432#ifdef __cplusplus
49433extern "C"
49434#endif
49435char cos ();
49436int
49437main ()
49438{
49439return cos ();
49440  ;
49441  return 0;
49442}
49443_ACEOF
49444if ac_fn_cxx_try_link "$LINENO"; then :
49445  ac_cv_lib_m_cos=yes
49446else
49447  ac_cv_lib_m_cos=no
49448fi
49449rm -f core conftest.err conftest.$ac_objext \
49450    conftest$ac_exeext conftest.$ac_ext
49451LIBS=$ac_check_lib_save_LIBS
49452fi
49453{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
49454$as_echo "$ac_cv_lib_m_cos" >&6; }
49455if test "x$ac_cv_lib_m_cos" = xyes; then :
49456  cat >>confdefs.h <<_ACEOF
49457#define HAVE_LIBM 1
49458_ACEOF
49459
49460  LIBS="-lm $LIBS"
49461
49462else
49463
49464        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
49465$as_echo "$as_me: Maths library was not found" >&6;}
49466
49467
49468fi
49469
49470
49471
49472  ###############################################################################
49473  #
49474  # Check for libdl.so
49475
49476  save_LIBS="$LIBS"
49477  LIBS=""
49478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
49479$as_echo_n "checking for dlopen in -ldl... " >&6; }
49480if ${ac_cv_lib_dl_dlopen+:} false; then :
49481  $as_echo_n "(cached) " >&6
49482else
49483  ac_check_lib_save_LIBS=$LIBS
49484LIBS="-ldl  $LIBS"
49485cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49486/* end confdefs.h.  */
49487
49488/* Override any GCC internal prototype to avoid an error.
49489   Use char because int might match the return type of a GCC
49490   builtin and then its argument prototype would still apply.  */
49491#ifdef __cplusplus
49492extern "C"
49493#endif
49494char dlopen ();
49495int
49496main ()
49497{
49498return dlopen ();
49499  ;
49500  return 0;
49501}
49502_ACEOF
49503if ac_fn_cxx_try_link "$LINENO"; then :
49504  ac_cv_lib_dl_dlopen=yes
49505else
49506  ac_cv_lib_dl_dlopen=no
49507fi
49508rm -f core conftest.err conftest.$ac_objext \
49509    conftest$ac_exeext conftest.$ac_ext
49510LIBS=$ac_check_lib_save_LIBS
49511fi
49512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
49513$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
49514if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
49515  cat >>confdefs.h <<_ACEOF
49516#define HAVE_LIBDL 1
49517_ACEOF
49518
49519  LIBS="-ldl $LIBS"
49520
49521fi
49522
49523  LIBDL="$LIBS"
49524
49525  LIBS="$save_LIBS"
49526
49527
49528  ###############################################################################
49529  #
49530  # statically link libstdc++ before C++ ABI is stablized on Linux unless
49531  # dynamic build is configured on command line.
49532  #
49533
49534# Check whether --with-stdc++lib was given.
49535if test "${with_stdc__lib+set}" = set; then :
49536  withval=$with_stdc__lib;
49537        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
49538                && test "x$with_stdc__lib" != xdefault; then
49539          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
49540        fi
49541
49542else
49543  with_stdc__lib=default
49544
49545fi
49546
49547
49548  if test "x$OPENJDK_TARGET_OS" = xlinux; then
49549    # Test if -lstdc++ works.
49550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
49551$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
49552    ac_ext=cpp
49553ac_cpp='$CXXCPP $CPPFLAGS'
49554ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49555ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49556ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49557
49558    OLD_CXXFLAGS="$CXXFLAGS"
49559    CXXFLAGS="$CXXFLAGS -lstdc++"
49560    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49561/* end confdefs.h.  */
49562
49563int
49564main ()
49565{
49566return 0;
49567  ;
49568  return 0;
49569}
49570_ACEOF
49571if ac_fn_cxx_try_link "$LINENO"; then :
49572  has_dynamic_libstdcxx=yes
49573else
49574  has_dynamic_libstdcxx=no
49575fi
49576rm -f core conftest.err conftest.$ac_objext \
49577    conftest$ac_exeext conftest.$ac_ext
49578    CXXFLAGS="$OLD_CXXFLAGS"
49579    ac_ext=cpp
49580ac_cpp='$CXXCPP $CPPFLAGS'
49581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49584
49585    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
49586$as_echo "$has_dynamic_libstdcxx" >&6; }
49587
49588    # Test if stdc++ can be linked statically.
49589    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
49590$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
49591    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
49592    ac_ext=cpp
49593ac_cpp='$CXXCPP $CPPFLAGS'
49594ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49595ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49596ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49597
49598    OLD_LIBS="$LIBS"
49599    OLD_CXX="$CXX"
49600    LIBS="$STATIC_STDCXX_FLAGS"
49601    CXX="$CC"
49602    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49603/* end confdefs.h.  */
49604
49605int
49606main ()
49607{
49608return 0;
49609  ;
49610  return 0;
49611}
49612_ACEOF
49613if ac_fn_cxx_try_link "$LINENO"; then :
49614  has_static_libstdcxx=yes
49615else
49616  has_static_libstdcxx=no
49617fi
49618rm -f core conftest.err conftest.$ac_objext \
49619    conftest$ac_exeext conftest.$ac_ext
49620    LIBS="$OLD_LIBS"
49621    CXX="$OLD_CXX"
49622    ac_ext=cpp
49623ac_cpp='$CXXCPP $CPPFLAGS'
49624ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49625ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49626ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49627
49628    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
49629$as_echo "$has_static_libstdcxx" >&6; }
49630
49631    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
49632      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
49633    fi
49634
49635    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
49636      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
49637    fi
49638
49639    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
49640      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
49641    fi
49642
49643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
49644$as_echo_n "checking how to link with libstdc++... " >&6; }
49645    # If dynamic was requested, it's available since it would fail above otherwise.
49646    # If dynamic wasn't requested, go with static unless it isn't available.
49647    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49648      LIBCXX="$LIBCXX -lstdc++"
49649      LDCXX="$CXX"
49650      STATIC_CXX_SETTING="STATIC_CXX=false"
49651      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
49652$as_echo "dynamic" >&6; }
49653    else
49654      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
49655      LDCXX="$CC"
49656      STATIC_CXX_SETTING="STATIC_CXX=true"
49657      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
49658$as_echo "static" >&6; }
49659    fi
49660  fi
49661
49662
49663  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49664    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
49665
49666pkg_failed=no
49667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
49668$as_echo_n "checking for LIBFFI... " >&6; }
49669
49670if test -n "$LIBFFI_CFLAGS"; then
49671    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
49672 elif test -n "$PKG_CONFIG"; then
49673    if test -n "$PKG_CONFIG" && \
49674    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49675  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49676  ac_status=$?
49677  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49678  test $ac_status = 0; }; then
49679  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
49680else
49681  pkg_failed=yes
49682fi
49683 else
49684    pkg_failed=untried
49685fi
49686if test -n "$LIBFFI_LIBS"; then
49687    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
49688 elif test -n "$PKG_CONFIG"; then
49689    if test -n "$PKG_CONFIG" && \
49690    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
49691  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
49692  ac_status=$?
49693  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
49694  test $ac_status = 0; }; then
49695  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
49696else
49697  pkg_failed=yes
49698fi
49699 else
49700    pkg_failed=untried
49701fi
49702
49703
49704
49705if test $pkg_failed = yes; then
49706
49707if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
49708        _pkg_short_errors_supported=yes
49709else
49710        _pkg_short_errors_supported=no
49711fi
49712        if test $_pkg_short_errors_supported = yes; then
49713	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
49714        else
49715	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
49716        fi
49717	# Put the nasty error message in config.log where it belongs
49718	echo "$LIBFFI_PKG_ERRORS" >&5
49719
49720	as_fn_error $? "Package requirements (libffi) were not met:
49721
49722$LIBFFI_PKG_ERRORS
49723
49724Consider adjusting the PKG_CONFIG_PATH environment variable if you
49725installed software in a non-standard prefix.
49726
49727Alternatively, you may set the environment variables LIBFFI_CFLAGS
49728and LIBFFI_LIBS to avoid the need to call pkg-config.
49729See the pkg-config man page for more details.
49730" "$LINENO" 5
49731elif test $pkg_failed = untried; then
49732	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49733$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49734as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
49735is in your PATH or set the PKG_CONFIG environment variable to the full
49736path to pkg-config.
49737
49738Alternatively, you may set the environment variables LIBFFI_CFLAGS
49739and LIBFFI_LIBS to avoid the need to call pkg-config.
49740See the pkg-config man page for more details.
49741
49742To get pkg-config, see <http://pkg-config.freedesktop.org/>.
49743See \`config.log' for more details" "$LINENO" 5; }
49744else
49745	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
49746	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
49747        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49748$as_echo "yes" >&6; }
49749	:
49750fi
49751
49752  fi
49753
49754  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
49755    # Extract the first word of "llvm-config", so it can be a program name with args.
49756set dummy llvm-config; ac_word=$2
49757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49758$as_echo_n "checking for $ac_word... " >&6; }
49759if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
49760  $as_echo_n "(cached) " >&6
49761else
49762  if test -n "$LLVM_CONFIG"; then
49763  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
49764else
49765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49766for as_dir in $PATH
49767do
49768  IFS=$as_save_IFS
49769  test -z "$as_dir" && as_dir=.
49770    for ac_exec_ext in '' $ac_executable_extensions; do
49771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49772    ac_cv_prog_LLVM_CONFIG="llvm-config"
49773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49774    break 2
49775  fi
49776done
49777  done
49778IFS=$as_save_IFS
49779
49780fi
49781fi
49782LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
49783if test -n "$LLVM_CONFIG"; then
49784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
49785$as_echo "$LLVM_CONFIG" >&6; }
49786else
49787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49788$as_echo "no" >&6; }
49789fi
49790
49791
49792
49793    if test "x$LLVM_CONFIG" != xllvm-config; then
49794      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
49795    fi
49796
49797    llvm_components="jit mcjit engine nativecodegen native"
49798    unset LLVM_CFLAGS
49799    for flag in $("$LLVM_CONFIG" --cxxflags); do
49800      if echo "${flag}" | grep -q '^-[ID]'; then
49801        if test "${flag}" != "-D_DEBUG" ; then
49802          if test "${LLVM_CFLAGS}" != "" ; then
49803            LLVM_CFLAGS="${LLVM_CFLAGS} "
49804          fi
49805          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
49806        fi
49807      fi
49808    done
49809    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
49810    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
49811
49812    unset LLVM_LDFLAGS
49813    for flag in $("${LLVM_CONFIG}" --ldflags); do
49814      if echo "${flag}" | grep -q '^-L'; then
49815        if test "${LLVM_LDFLAGS}" != ""; then
49816          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
49817        fi
49818        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
49819      fi
49820    done
49821
49822    unset LLVM_LIBS
49823    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
49824      if echo "${flag}" | grep -q '^-l'; then
49825        if test "${LLVM_LIBS}" != ""; then
49826          LLVM_LIBS="${LLVM_LIBS} "
49827        fi
49828        LLVM_LIBS="${LLVM_LIBS}${flag}"
49829      fi
49830    done
49831
49832
49833
49834
49835  fi
49836
49837  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
49838  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
49839    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
49840  fi
49841
49842  # TODO better (platform agnostic) test
49843  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
49844    LIBCXX="-lstdc++"
49845  fi
49846
49847
49848
49849
49850  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49851
49852
49853# Check whether --with-msvcr-dll was given.
49854if test "${with_msvcr_dll+set}" = set; then :
49855  withval=$with_msvcr_dll;
49856fi
49857
49858
49859  if test "x$with_msvcr_dll" != x; then
49860    # If given explicitely by user, do not probe. If not present, fail directly.
49861
49862  DLL_NAME="$DLL_NAME"
49863  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
49864  METHOD="--with-msvcr-dll"
49865  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49866    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49867$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49868
49869    # Need to check if the found msvcr is correct architecture
49870    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49871$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49872    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49873    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49874      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49875      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49876      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49877        CORRECT_MSVCR_ARCH="PE32 executable"
49878      else
49879        CORRECT_MSVCR_ARCH="PE32+ executable"
49880      fi
49881    else
49882      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49883        CORRECT_MSVCR_ARCH=386
49884      else
49885        CORRECT_MSVCR_ARCH=x86-64
49886      fi
49887    fi
49888    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49889      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49890$as_echo "ok" >&6; }
49891      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49892      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49893$as_echo_n "checking for $DLL_NAME... " >&6; }
49894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49895$as_echo "$MSVC_DLL" >&6; }
49896    else
49897      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49898$as_echo "incorrect, ignoring" >&6; }
49899      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49900$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49901    fi
49902  fi
49903
49904    if test "x$MSVC_DLL" = x; then
49905      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
49906    fi
49907  else
49908
49909  VAR_NAME="MSVCR_DLL"
49910  DLL_NAME="${MSVCR_NAME}"
49911  MSVC_DLL=
49912
49913  if test "x$MSVC_DLL" = x; then
49914    # Probe: Using well-known location from Visual Studio 10.0
49915    if test "x$VCINSTALLDIR" != x; then
49916      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
49917
49918  windows_path="$CYGWIN_VC_INSTALL_DIR"
49919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49920    unix_path=`$CYGPATH -u "$windows_path"`
49921    CYGWIN_VC_INSTALL_DIR="$unix_path"
49922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49924    CYGWIN_VC_INSTALL_DIR="$unix_path"
49925  fi
49926
49927      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
49928        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49929      else
49930        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
49931      fi
49932      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
49933
49934  DLL_NAME="$DLL_NAME"
49935  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49936  METHOD="well-known location in VCINSTALLDIR"
49937  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49939$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49940
49941    # Need to check if the found msvcr is correct architecture
49942    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49943$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49944    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49946      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49947      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49948      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49949        CORRECT_MSVCR_ARCH="PE32 executable"
49950      else
49951        CORRECT_MSVCR_ARCH="PE32+ executable"
49952      fi
49953    else
49954      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49955        CORRECT_MSVCR_ARCH=386
49956      else
49957        CORRECT_MSVCR_ARCH=x86-64
49958      fi
49959    fi
49960    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
49961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
49962$as_echo "ok" >&6; }
49963      MSVC_DLL="$POSSIBLE_MSVC_DLL"
49964      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
49965$as_echo_n "checking for $DLL_NAME... " >&6; }
49966      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
49967$as_echo "$MSVC_DLL" >&6; }
49968    else
49969      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
49970$as_echo "incorrect, ignoring" >&6; }
49971      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
49972$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
49973    fi
49974  fi
49975
49976    fi
49977  fi
49978
49979  if test "x$MSVC_DLL" = x; then
49980    # Probe: Check in the Boot JDK directory.
49981    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
49982
49983  DLL_NAME="$DLL_NAME"
49984  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
49985  METHOD="well-known location in Boot JDK"
49986  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
49987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
49988$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
49989
49990    # Need to check if the found msvcr is correct architecture
49991    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
49992$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
49993    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
49994    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49995      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
49996      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
49997      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
49998        CORRECT_MSVCR_ARCH="PE32 executable"
49999      else
50000        CORRECT_MSVCR_ARCH="PE32+ executable"
50001      fi
50002    else
50003      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50004        CORRECT_MSVCR_ARCH=386
50005      else
50006        CORRECT_MSVCR_ARCH=x86-64
50007      fi
50008    fi
50009    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50011$as_echo "ok" >&6; }
50012      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50014$as_echo_n "checking for $DLL_NAME... " >&6; }
50015      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50016$as_echo "$MSVC_DLL" >&6; }
50017    else
50018      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50019$as_echo "incorrect, ignoring" >&6; }
50020      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50021$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50022    fi
50023  fi
50024
50025  fi
50026
50027  if test "x$MSVC_DLL" = x; then
50028    # Probe: Look in the Windows system32 directory
50029    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50030
50031  windows_path="$CYGWIN_SYSTEMROOT"
50032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50033    unix_path=`$CYGPATH -u "$windows_path"`
50034    CYGWIN_SYSTEMROOT="$unix_path"
50035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50037    CYGWIN_SYSTEMROOT="$unix_path"
50038  fi
50039
50040    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50041
50042  DLL_NAME="$DLL_NAME"
50043  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50044  METHOD="well-known location in SYSTEMROOT"
50045  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50046    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50047$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50048
50049    # Need to check if the found msvcr is correct architecture
50050    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50051$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50052    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50053    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50054      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50055      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50056      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50057        CORRECT_MSVCR_ARCH="PE32 executable"
50058      else
50059        CORRECT_MSVCR_ARCH="PE32+ executable"
50060      fi
50061    else
50062      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50063        CORRECT_MSVCR_ARCH=386
50064      else
50065        CORRECT_MSVCR_ARCH=x86-64
50066      fi
50067    fi
50068    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50069      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50070$as_echo "ok" >&6; }
50071      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50072      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50073$as_echo_n "checking for $DLL_NAME... " >&6; }
50074      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50075$as_echo "$MSVC_DLL" >&6; }
50076    else
50077      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50078$as_echo "incorrect, ignoring" >&6; }
50079      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50080$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50081    fi
50082  fi
50083
50084  fi
50085
50086  if test "x$MSVC_DLL" = x; then
50087    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50088    if test "x$VS100COMNTOOLS" != x; then
50089      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50090
50091  windows_path="$CYGWIN_VS_TOOLS_DIR"
50092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50093    unix_path=`$CYGPATH -u "$windows_path"`
50094    CYGWIN_VS_TOOLS_DIR="$unix_path"
50095  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50096    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50097    CYGWIN_VS_TOOLS_DIR="$unix_path"
50098  fi
50099
50100      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50101        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50102	    | $GREP -i /x64/ | $HEAD --lines 1`
50103      else
50104        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50105	    | $GREP -i /x86/ | $HEAD --lines 1`
50106      fi
50107
50108  DLL_NAME="$DLL_NAME"
50109  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50110  METHOD="search of VS100COMNTOOLS"
50111  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50112    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50113$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50114
50115    # Need to check if the found msvcr is correct architecture
50116    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50117$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50118    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50119    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50120      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50121      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50122      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50123        CORRECT_MSVCR_ARCH="PE32 executable"
50124      else
50125        CORRECT_MSVCR_ARCH="PE32+ executable"
50126      fi
50127    else
50128      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50129        CORRECT_MSVCR_ARCH=386
50130      else
50131        CORRECT_MSVCR_ARCH=x86-64
50132      fi
50133    fi
50134    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50135      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50136$as_echo "ok" >&6; }
50137      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50138      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50139$as_echo_n "checking for $DLL_NAME... " >&6; }
50140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50141$as_echo "$MSVC_DLL" >&6; }
50142    else
50143      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50144$as_echo "incorrect, ignoring" >&6; }
50145      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50146$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50147    fi
50148  fi
50149
50150    fi
50151  fi
50152
50153  if test "x$MSVC_DLL" = x; then
50154    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50155    # (This was the original behaviour; kept since it might turn something up)
50156    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50157      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50158        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50159	    | $GREP x64 | $HEAD --lines 1`
50160      else
50161        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50162	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50163        if test "x$POSSIBLE_MSVC_DLL" = x; then
50164          # We're grasping at straws now...
50165          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50166	      | $HEAD --lines 1`
50167        fi
50168      fi
50169
50170
50171  DLL_NAME="$DLL_NAME"
50172  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50173  METHOD="search of VCINSTALLDIR"
50174  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50176$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50177
50178    # Need to check if the found msvcr is correct architecture
50179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50180$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50181    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50183      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50184      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50185      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50186        CORRECT_MSVCR_ARCH="PE32 executable"
50187      else
50188        CORRECT_MSVCR_ARCH="PE32+ executable"
50189      fi
50190    else
50191      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50192        CORRECT_MSVCR_ARCH=386
50193      else
50194        CORRECT_MSVCR_ARCH=x86-64
50195      fi
50196    fi
50197    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50198      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50199$as_echo "ok" >&6; }
50200      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50201      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50202$as_echo_n "checking for $DLL_NAME... " >&6; }
50203      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50204$as_echo "$MSVC_DLL" >&6; }
50205    else
50206      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50207$as_echo "incorrect, ignoring" >&6; }
50208      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50209$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50210    fi
50211  fi
50212
50213    fi
50214  fi
50215
50216  if test "x$MSVC_DLL" = x; then
50217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50218$as_echo_n "checking for $DLL_NAME... " >&6; }
50219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50220$as_echo "no" >&6; }
50221    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50222  fi
50223
50224  MSVCR_DLL=$MSVC_DLL
50225
50226  # Only process if variable expands to non-empty
50227
50228  if test "x$MSVCR_DLL" != x; then
50229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50230
50231  # Input might be given as Windows format, start by converting to
50232  # unix format.
50233  path="$MSVCR_DLL"
50234  new_path=`$CYGPATH -u "$path"`
50235
50236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50239  # "foo.exe" is OK but "foo" is an error.
50240  #
50241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50242  # It is also a way to make sure we got the proper file name for the real test later on.
50243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50244  if test "x$test_shortpath" = x; then
50245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50246$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50247    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
50248  fi
50249
50250  # Call helper function which possibly converts this using DOS-style short mode.
50251  # If so, the updated path is stored in $new_path.
50252
50253  input_path="$new_path"
50254  # Check if we need to convert this using DOS-style short mode. If the path
50255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50256  # take no chances and rewrite it.
50257  # Note: m4 eats our [], so we need to use [ and ] instead.
50258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50259  if test "x$has_forbidden_chars" != x; then
50260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50264      # Going to short mode and back again did indeed matter. Since short mode is
50265      # case insensitive, let's make it lowercase to improve readability.
50266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50267      # Now convert it back to Unix-stile (cygpath)
50268      input_path=`$CYGPATH -u "$shortmode_path"`
50269      new_path="$input_path"
50270    fi
50271  fi
50272
50273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50274  if test "x$test_cygdrive_prefix" = x; then
50275    # As a simple fix, exclude /usr/bin since it's not a real path.
50276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50278      # a path prefixed by /cygdrive for fixpath to work.
50279      new_path="$CYGWIN_ROOT_PATH$input_path"
50280    fi
50281  fi
50282
50283
50284  if test "x$path" != "x$new_path"; then
50285    MSVCR_DLL="$new_path"
50286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50287$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50288  fi
50289
50290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50291
50292  path="$MSVCR_DLL"
50293  has_colon=`$ECHO $path | $GREP ^.:`
50294  new_path="$path"
50295  if test "x$has_colon" = x; then
50296    # Not in mixed or Windows style, start by that.
50297    new_path=`cmd //c echo $path`
50298  fi
50299
50300
50301  input_path="$new_path"
50302  # Check if we need to convert this using DOS-style short mode. If the path
50303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50304  # take no chances and rewrite it.
50305  # Note: m4 eats our [], so we need to use [ and ] instead.
50306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50307  if test "x$has_forbidden_chars" != x; then
50308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50310  fi
50311
50312
50313  windows_path="$new_path"
50314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50315    unix_path=`$CYGPATH -u "$windows_path"`
50316    new_path="$unix_path"
50317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50319    new_path="$unix_path"
50320  fi
50321
50322  if test "x$path" != "x$new_path"; then
50323    MSVCR_DLL="$new_path"
50324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
50325$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
50326  fi
50327
50328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50330
50331    else
50332      # We're on a unix platform. Hooray! :)
50333      path="$MSVCR_DLL"
50334      has_space=`$ECHO "$path" | $GREP " "`
50335      if test "x$has_space" != x; then
50336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
50337$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
50338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50339      fi
50340
50341      # Use eval to expand a potential ~
50342      eval path="$path"
50343      if test ! -f "$path" && test ! -d "$path"; then
50344        as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50345      fi
50346
50347      MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
50348    fi
50349  fi
50350
50351  MSVCR_DLL=$MSVCR_DLL
50352
50353
50354  fi
50355
50356
50357# Check whether --with-msvcp-dll was given.
50358if test "${with_msvcp_dll+set}" = set; then :
50359  withval=$with_msvcp_dll;
50360fi
50361
50362
50363  if test "x$MSVCP_NAME" != "x"; then
50364    if test "x$with_msvcp_dll" != x; then
50365      # If given explicitely by user, do not probe. If not present, fail directly.
50366
50367  DLL_NAME="$DLL_NAME"
50368  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
50369  METHOD="--with-msvcp-dll"
50370  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50371    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50372$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50373
50374    # Need to check if the found msvcr is correct architecture
50375    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50376$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50377    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50379      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50380      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50381      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50382        CORRECT_MSVCR_ARCH="PE32 executable"
50383      else
50384        CORRECT_MSVCR_ARCH="PE32+ executable"
50385      fi
50386    else
50387      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50388        CORRECT_MSVCR_ARCH=386
50389      else
50390        CORRECT_MSVCR_ARCH=x86-64
50391      fi
50392    fi
50393    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50394      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50395$as_echo "ok" >&6; }
50396      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50397      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50398$as_echo_n "checking for $DLL_NAME... " >&6; }
50399      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50400$as_echo "$MSVC_DLL" >&6; }
50401    else
50402      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50403$as_echo "incorrect, ignoring" >&6; }
50404      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50405$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50406    fi
50407  fi
50408
50409      if test "x$MSVC_DLL" = x; then
50410        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
50411      fi
50412    else
50413
50414  VAR_NAME="MSVCP_DLL"
50415  DLL_NAME="${MSVCP_NAME}"
50416  MSVC_DLL=
50417
50418  if test "x$MSVC_DLL" = x; then
50419    # Probe: Using well-known location from Visual Studio 10.0
50420    if test "x$VCINSTALLDIR" != x; then
50421      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
50422
50423  windows_path="$CYGWIN_VC_INSTALL_DIR"
50424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50425    unix_path=`$CYGPATH -u "$windows_path"`
50426    CYGWIN_VC_INSTALL_DIR="$unix_path"
50427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50429    CYGWIN_VC_INSTALL_DIR="$unix_path"
50430  fi
50431
50432      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50433        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50434      else
50435        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
50436      fi
50437      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
50438
50439  DLL_NAME="$DLL_NAME"
50440  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50441  METHOD="well-known location in VCINSTALLDIR"
50442  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50443    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50444$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50445
50446    # Need to check if the found msvcr is correct architecture
50447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50448$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50449    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50451      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50452      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50453      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50454        CORRECT_MSVCR_ARCH="PE32 executable"
50455      else
50456        CORRECT_MSVCR_ARCH="PE32+ executable"
50457      fi
50458    else
50459      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50460        CORRECT_MSVCR_ARCH=386
50461      else
50462        CORRECT_MSVCR_ARCH=x86-64
50463      fi
50464    fi
50465    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50466      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50467$as_echo "ok" >&6; }
50468      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50469      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50470$as_echo_n "checking for $DLL_NAME... " >&6; }
50471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50472$as_echo "$MSVC_DLL" >&6; }
50473    else
50474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50475$as_echo "incorrect, ignoring" >&6; }
50476      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50477$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50478    fi
50479  fi
50480
50481    fi
50482  fi
50483
50484  if test "x$MSVC_DLL" = x; then
50485    # Probe: Check in the Boot JDK directory.
50486    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
50487
50488  DLL_NAME="$DLL_NAME"
50489  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50490  METHOD="well-known location in Boot JDK"
50491  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50493$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50494
50495    # Need to check if the found msvcr is correct architecture
50496    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50497$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50498    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50499    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50500      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50501      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50502      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50503        CORRECT_MSVCR_ARCH="PE32 executable"
50504      else
50505        CORRECT_MSVCR_ARCH="PE32+ executable"
50506      fi
50507    else
50508      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50509        CORRECT_MSVCR_ARCH=386
50510      else
50511        CORRECT_MSVCR_ARCH=x86-64
50512      fi
50513    fi
50514    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50516$as_echo "ok" >&6; }
50517      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50518      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50519$as_echo_n "checking for $DLL_NAME... " >&6; }
50520      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50521$as_echo "$MSVC_DLL" >&6; }
50522    else
50523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50524$as_echo "incorrect, ignoring" >&6; }
50525      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50526$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50527    fi
50528  fi
50529
50530  fi
50531
50532  if test "x$MSVC_DLL" = x; then
50533    # Probe: Look in the Windows system32 directory
50534    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
50535
50536  windows_path="$CYGWIN_SYSTEMROOT"
50537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50538    unix_path=`$CYGPATH -u "$windows_path"`
50539    CYGWIN_SYSTEMROOT="$unix_path"
50540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50542    CYGWIN_SYSTEMROOT="$unix_path"
50543  fi
50544
50545    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
50546
50547  DLL_NAME="$DLL_NAME"
50548  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50549  METHOD="well-known location in SYSTEMROOT"
50550  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50551    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50552$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50553
50554    # Need to check if the found msvcr is correct architecture
50555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50556$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50557    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50559      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50560      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50561      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50562        CORRECT_MSVCR_ARCH="PE32 executable"
50563      else
50564        CORRECT_MSVCR_ARCH="PE32+ executable"
50565      fi
50566    else
50567      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50568        CORRECT_MSVCR_ARCH=386
50569      else
50570        CORRECT_MSVCR_ARCH=x86-64
50571      fi
50572    fi
50573    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50574      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50575$as_echo "ok" >&6; }
50576      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50578$as_echo_n "checking for $DLL_NAME... " >&6; }
50579      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50580$as_echo "$MSVC_DLL" >&6; }
50581    else
50582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50583$as_echo "incorrect, ignoring" >&6; }
50584      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50585$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50586    fi
50587  fi
50588
50589  fi
50590
50591  if test "x$MSVC_DLL" = x; then
50592    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
50593    if test "x$VS100COMNTOOLS" != x; then
50594      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
50595
50596  windows_path="$CYGWIN_VS_TOOLS_DIR"
50597  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50598    unix_path=`$CYGPATH -u "$windows_path"`
50599    CYGWIN_VS_TOOLS_DIR="$unix_path"
50600  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50601    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50602    CYGWIN_VS_TOOLS_DIR="$unix_path"
50603  fi
50604
50605      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50606        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50607	    | $GREP -i /x64/ | $HEAD --lines 1`
50608      else
50609        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
50610	    | $GREP -i /x86/ | $HEAD --lines 1`
50611      fi
50612
50613  DLL_NAME="$DLL_NAME"
50614  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50615  METHOD="search of VS100COMNTOOLS"
50616  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50618$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50619
50620    # Need to check if the found msvcr is correct architecture
50621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50622$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50623    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50624    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50625      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50626      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50627      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50628        CORRECT_MSVCR_ARCH="PE32 executable"
50629      else
50630        CORRECT_MSVCR_ARCH="PE32+ executable"
50631      fi
50632    else
50633      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50634        CORRECT_MSVCR_ARCH=386
50635      else
50636        CORRECT_MSVCR_ARCH=x86-64
50637      fi
50638    fi
50639    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50641$as_echo "ok" >&6; }
50642      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50643      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50644$as_echo_n "checking for $DLL_NAME... " >&6; }
50645      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50646$as_echo "$MSVC_DLL" >&6; }
50647    else
50648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50649$as_echo "incorrect, ignoring" >&6; }
50650      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50651$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50652    fi
50653  fi
50654
50655    fi
50656  fi
50657
50658  if test "x$MSVC_DLL" = x; then
50659    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
50660    # (This was the original behaviour; kept since it might turn something up)
50661    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
50662      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50663        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50664	    | $GREP x64 | $HEAD --lines 1`
50665      else
50666        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50667	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
50668        if test "x$POSSIBLE_MSVC_DLL" = x; then
50669          # We're grasping at straws now...
50670          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
50671	      | $HEAD --lines 1`
50672        fi
50673      fi
50674
50675
50676  DLL_NAME="$DLL_NAME"
50677  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
50678  METHOD="search of VCINSTALLDIR"
50679  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
50680    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
50681$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
50682
50683    # Need to check if the found msvcr is correct architecture
50684    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
50685$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
50686    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
50687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50688      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
50689      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
50690      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50691        CORRECT_MSVCR_ARCH="PE32 executable"
50692      else
50693        CORRECT_MSVCR_ARCH="PE32+ executable"
50694      fi
50695    else
50696      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
50697        CORRECT_MSVCR_ARCH=386
50698      else
50699        CORRECT_MSVCR_ARCH=x86-64
50700      fi
50701    fi
50702    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
50703      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
50704$as_echo "ok" >&6; }
50705      MSVC_DLL="$POSSIBLE_MSVC_DLL"
50706      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50707$as_echo_n "checking for $DLL_NAME... " >&6; }
50708      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
50709$as_echo "$MSVC_DLL" >&6; }
50710    else
50711      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
50712$as_echo "incorrect, ignoring" >&6; }
50713      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
50714$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
50715    fi
50716  fi
50717
50718    fi
50719  fi
50720
50721  if test "x$MSVC_DLL" = x; then
50722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
50723$as_echo_n "checking for $DLL_NAME... " >&6; }
50724    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50725$as_echo "no" >&6; }
50726    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
50727  fi
50728
50729  MSVCP_DLL=$MSVC_DLL
50730
50731  # Only process if variable expands to non-empty
50732
50733  if test "x$MSVCP_DLL" != x; then
50734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50735
50736  # Input might be given as Windows format, start by converting to
50737  # unix format.
50738  path="$MSVCP_DLL"
50739  new_path=`$CYGPATH -u "$path"`
50740
50741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
50742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
50743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
50744  # "foo.exe" is OK but "foo" is an error.
50745  #
50746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
50747  # It is also a way to make sure we got the proper file name for the real test later on.
50748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
50749  if test "x$test_shortpath" = x; then
50750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50751$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50752    as_fn_error $? "Cannot locate the the path of MSVCP_DLL" "$LINENO" 5
50753  fi
50754
50755  # Call helper function which possibly converts this using DOS-style short mode.
50756  # If so, the updated path is stored in $new_path.
50757
50758  input_path="$new_path"
50759  # Check if we need to convert this using DOS-style short mode. If the path
50760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50761  # take no chances and rewrite it.
50762  # Note: m4 eats our [], so we need to use [ and ] instead.
50763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
50764  if test "x$has_forbidden_chars" != x; then
50765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
50767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
50768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
50769      # Going to short mode and back again did indeed matter. Since short mode is
50770      # case insensitive, let's make it lowercase to improve readability.
50771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50772      # Now convert it back to Unix-stile (cygpath)
50773      input_path=`$CYGPATH -u "$shortmode_path"`
50774      new_path="$input_path"
50775    fi
50776  fi
50777
50778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
50779  if test "x$test_cygdrive_prefix" = x; then
50780    # As a simple fix, exclude /usr/bin since it's not a real path.
50781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
50782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
50783      # a path prefixed by /cygdrive for fixpath to work.
50784      new_path="$CYGWIN_ROOT_PATH$input_path"
50785    fi
50786  fi
50787
50788
50789  if test "x$path" != "x$new_path"; then
50790    MSVCP_DLL="$new_path"
50791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50792$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50793  fi
50794
50795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50796
50797  path="$MSVCP_DLL"
50798  has_colon=`$ECHO $path | $GREP ^.:`
50799  new_path="$path"
50800  if test "x$has_colon" = x; then
50801    # Not in mixed or Windows style, start by that.
50802    new_path=`cmd //c echo $path`
50803  fi
50804
50805
50806  input_path="$new_path"
50807  # Check if we need to convert this using DOS-style short mode. If the path
50808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
50809  # take no chances and rewrite it.
50810  # Note: m4 eats our [], so we need to use [ and ] instead.
50811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
50812  if test "x$has_forbidden_chars" != x; then
50813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
50814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
50815  fi
50816
50817
50818  windows_path="$new_path"
50819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
50820    unix_path=`$CYGPATH -u "$windows_path"`
50821    new_path="$unix_path"
50822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
50823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
50824    new_path="$unix_path"
50825  fi
50826
50827  if test "x$path" != "x$new_path"; then
50828    MSVCP_DLL="$new_path"
50829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCP_DLL to \"$new_path\"" >&5
50830$as_echo "$as_me: Rewriting MSVCP_DLL to \"$new_path\"" >&6;}
50831  fi
50832
50833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
50834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
50835
50836    else
50837      # We're on a unix platform. Hooray! :)
50838      path="$MSVCP_DLL"
50839      has_space=`$ECHO "$path" | $GREP " "`
50840      if test "x$has_space" != x; then
50841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&5
50842$as_echo "$as_me: The path of MSVCP_DLL, which resolves as \"$path\", is invalid." >&6;}
50843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
50844      fi
50845
50846      # Use eval to expand a potential ~
50847      eval path="$path"
50848      if test ! -f "$path" && test ! -d "$path"; then
50849        as_fn_error $? "The path of MSVCP_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
50850      fi
50851
50852      MSVCP_DLL="`cd "$path"; $THEPWDCMD -L`"
50853    fi
50854  fi
50855
50856  MSVCP_DLL=$MSVCP_DLL
50857
50858
50859    fi
50860  fi
50861
50862
50863
50864# Check whether --with-dxsdk was given.
50865if test "${with_dxsdk+set}" = set; then :
50866  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
50867$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
50868fi
50869
50870
50871
50872
50873# Check whether --with-dxsdk-lib was given.
50874if test "${with_dxsdk_lib+set}" = set; then :
50875  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
50876$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
50877fi
50878
50879
50880
50881
50882# Check whether --with-dxsdk-include was given.
50883if test "${with_dxsdk_include+set}" = set; then :
50884  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
50885$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
50886fi
50887
50888
50889  fi
50890
50891
50892###############################################################################
50893#
50894# We need to do some final tweaking, when everything else is done.
50895#
50896###############################################################################
50897
50898
50899  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
50900
50901
50902  # The name of the Service Agent jar.
50903  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
50904  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
50905    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
50906  fi
50907
50908
50909
50910    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
50911$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
50912
50913    if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
50914      ENABLE_INTREE_EC=yes
50915      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
50916$as_echo "yes" >&6; }
50917    else
50918      ENABLE_INTREE_EC=no
50919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
50920$as_echo "no" >&6; }
50921    fi
50922
50923
50924
50925
50926###############################################################################
50927#
50928# Configure parts of the build that only affect the build performance,
50929# not the result.
50930#
50931###############################################################################
50932
50933
50934  # How many cores do we have on this build system?
50935
50936# Check whether --with-num-cores was given.
50937if test "${with_num_cores+set}" = set; then :
50938  withval=$with_num_cores;
50939fi
50940
50941  if test "x$with_num_cores" = x; then
50942    # The number of cores were not specified, try to probe them.
50943
50944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
50945$as_echo_n "checking for number of cores... " >&6; }
50946  NUM_CORES=1
50947  FOUND_CORES=no
50948
50949  if test -f /proc/cpuinfo; then
50950    # Looks like a Linux (or cygwin) system
50951    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
50952    FOUND_CORES=yes
50953  elif test -x /usr/sbin/psrinfo; then
50954    # Looks like a Solaris system
50955    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
50956    FOUND_CORES=yes
50957  elif test -x /usr/sbin/system_profiler; then
50958    # Looks like a MacOSX system
50959    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
50960    FOUND_CORES=yes
50961  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
50962    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
50963    FOUND_CORES=yes
50964  elif test -n "$NUMBER_OF_PROCESSORS"; then
50965    # On windows, look in the env
50966    NUM_CORES=$NUMBER_OF_PROCESSORS
50967    FOUND_CORES=yes
50968  fi
50969
50970  if test "x$FOUND_CORES" = xyes; then
50971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
50972$as_echo "$NUM_CORES" >&6; }
50973  else
50974    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
50975$as_echo "could not detect number of cores, defaulting to 1" >&6; }
50976    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
50977$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
50978  fi
50979
50980  else
50981    NUM_CORES=$with_num_cores
50982  fi
50983
50984
50985
50986  # How much memory do we have on this build system?
50987
50988# Check whether --with-memory-size was given.
50989if test "${with_memory_size+set}" = set; then :
50990  withval=$with_memory_size;
50991fi
50992
50993  if test "x$with_memory_size" = x; then
50994    # The memory size was not specified, try to probe it.
50995
50996  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
50997$as_echo_n "checking for memory size... " >&6; }
50998  # Default to 1024 MB
50999  MEMORY_SIZE=1024
51000  FOUND_MEM=no
51001
51002  if test -f /proc/meminfo; then
51003    # Looks like a Linux (or cygwin) system
51004    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
51005    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
51006    FOUND_MEM=yes
51007  elif test -x /usr/sbin/prtconf; then
51008    # Looks like a Solaris or AIX system
51009    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
51010    FOUND_MEM=yes
51011  elif test -x /usr/sbin/system_profiler; then
51012    # Looks like a MacOSX system
51013    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
51014    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
51015    FOUND_MEM=yes
51016  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51017    # Windows, but without cygwin
51018    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
51019    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
51020    FOUND_MEM=yes
51021  fi
51022
51023  if test "x$FOUND_MEM" = xyes; then
51024    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
51025$as_echo "$MEMORY_SIZE MB" >&6; }
51026  else
51027    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
51028$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
51029    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
51030$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
51031  fi
51032
51033  else
51034    MEMORY_SIZE=$with_memory_size
51035  fi
51036
51037
51038
51039  # Provide a decent default number of parallel jobs for make depending on
51040  # number of cores, amount of memory and machine architecture.
51041
51042# Check whether --with-jobs was given.
51043if test "${with_jobs+set}" = set; then :
51044  withval=$with_jobs;
51045fi
51046
51047  if test "x$with_jobs" = x; then
51048    # Number of jobs was not specified, calculate.
51049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
51050$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
51051    # Approximate memory in GB.
51052    memory_gb=`expr $MEMORY_SIZE / 1024`
51053    # Pick the lowest of memory in gb and number of cores.
51054    if test "$memory_gb" -lt "$NUM_CORES"; then
51055      JOBS="$memory_gb"
51056    else
51057      JOBS="$NUM_CORES"
51058      # On bigger machines, leave some room for other processes to run
51059      if test "$JOBS" -gt "4"; then
51060        JOBS=`expr $JOBS '*' 90 / 100`
51061      fi
51062    fi
51063    # Cap number of jobs to 16
51064    if test "$JOBS" -gt "16"; then
51065      JOBS=16
51066    fi
51067    if test "$JOBS" -eq "0"; then
51068      JOBS=1
51069    fi
51070    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
51071$as_echo "$JOBS" >&6; }
51072  else
51073    JOBS=$with_jobs
51074  fi
51075
51076
51077
51078# Setup arguments for the boot jdk (after cores and memory have been setup)
51079
51080  ##############################################################################
51081  #
51082  # Specify jvm options for anything that is run with the Boot JDK.
51083  # Not all JVM:s accept the same arguments on the command line.
51084  #
51085
51086# Check whether --with-boot-jdk-jvmargs was given.
51087if test "${with_boot_jdk_jvmargs+set}" = set; then :
51088  withval=$with_boot_jdk_jvmargs;
51089fi
51090
51091
51092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
51093$as_echo_n "checking flags for boot jdk java command ... " >&6; }
51094
51095  # Disable special log output when a debug build is used as Boot JDK...
51096
51097  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
51098  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
51099  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
51100  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51101  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51102  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51103    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
51104    JVM_ARG_OK=true
51105  else
51106    $ECHO "Arg failed:" >&5
51107    $ECHO "$OUTPUT" >&5
51108    JVM_ARG_OK=false
51109  fi
51110
51111
51112  # Apply user provided options.
51113
51114  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
51115  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
51116  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
51117  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51118  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51119  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51120    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
51121    JVM_ARG_OK=true
51122  else
51123    $ECHO "Arg failed:" >&5
51124    $ECHO "$OUTPUT" >&5
51125    JVM_ARG_OK=false
51126  fi
51127
51128
51129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
51130$as_echo "$boot_jdk_jvmargs" >&6; }
51131
51132  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
51133  JAVA_FLAGS=$boot_jdk_jvmargs
51134
51135
51136
51137  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
51138$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
51139
51140  # Starting amount of heap memory.
51141
51142  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
51143  $ECHO "Command: $JAVA -Xms64M -version" >&5
51144  OUTPUT=`$JAVA -Xms64M -version 2>&1`
51145  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51146  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51147  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51148    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
51149    JVM_ARG_OK=true
51150  else
51151    $ECHO "Arg failed:" >&5
51152    $ECHO "$OUTPUT" >&5
51153    JVM_ARG_OK=false
51154  fi
51155
51156
51157  # Maximum amount of heap memory.
51158  # Maximum stack size.
51159  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
51160  if test "x$BUILD_NUM_BITS" = x32; then
51161    if test "$JVM_MAX_HEAP" -gt "1100"; then
51162      JVM_MAX_HEAP=1100
51163    elif test "$JVM_MAX_HEAP" -lt "512"; then
51164      JVM_MAX_HEAP=512
51165    fi
51166    STACK_SIZE=768
51167  else
51168    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
51169    # pointers are used. Apparently, we need to increase the heap and stack
51170    # space for the jvm. More specifically, when running javac to build huge
51171    # jdk batch
51172    if test "$JVM_MAX_HEAP" -gt "1600"; then
51173      JVM_MAX_HEAP=1600
51174    elif test "$JVM_MAX_HEAP" -lt "512"; then
51175      JVM_MAX_HEAP=512
51176    fi
51177    STACK_SIZE=1536
51178  fi
51179
51180  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
51181  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
51182  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
51183  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51184  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51185  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51186    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
51187    JVM_ARG_OK=true
51188  else
51189    $ECHO "Arg failed:" >&5
51190    $ECHO "$OUTPUT" >&5
51191    JVM_ARG_OK=false
51192  fi
51193
51194
51195  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
51196  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
51197  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
51198  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51199  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51200  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51201    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
51202    JVM_ARG_OK=true
51203  else
51204    $ECHO "Arg failed:" >&5
51205    $ECHO "$OUTPUT" >&5
51206    JVM_ARG_OK=false
51207  fi
51208
51209
51210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
51211$as_echo "$boot_jdk_jvmargs_big" >&6; }
51212
51213  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
51214
51215
51216
51217  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
51218$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
51219
51220  # Use serial gc for small short lived tools if possible
51221
51222  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
51223  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
51224  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
51225  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51226  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51227  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51228    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
51229    JVM_ARG_OK=true
51230  else
51231    $ECHO "Arg failed:" >&5
51232    $ECHO "$OUTPUT" >&5
51233    JVM_ARG_OK=false
51234  fi
51235
51236
51237  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
51238  $ECHO "Command: $JAVA -Xms32M -version" >&5
51239  OUTPUT=`$JAVA -Xms32M -version 2>&1`
51240  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51241  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51242  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51243    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
51244    JVM_ARG_OK=true
51245  else
51246    $ECHO "Arg failed:" >&5
51247    $ECHO "$OUTPUT" >&5
51248    JVM_ARG_OK=false
51249  fi
51250
51251
51252  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
51253  $ECHO "Command: $JAVA -Xmx512M -version" >&5
51254  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
51255  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51256  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51257  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51258    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
51259    JVM_ARG_OK=true
51260  else
51261    $ECHO "Arg failed:" >&5
51262    $ECHO "$OUTPUT" >&5
51263    JVM_ARG_OK=false
51264  fi
51265
51266
51267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
51268$as_echo "$boot_jdk_jvmargs_small" >&6; }
51269
51270  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
51271
51272
51273  JAVA_TOOL_FLAGS_SMALL=""
51274  for f in $JAVA_FLAGS_SMALL; do
51275    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
51276  done
51277
51278
51279
51280# Setup smart javac (after cores and memory have been setup)
51281
51282
51283# Check whether --with-sjavac-server-java was given.
51284if test "${with_sjavac_server_java+set}" = set; then :
51285  withval=$with_sjavac_server_java;
51286fi
51287
51288
51289  if test "x$with_sjavac_server_java" != x; then
51290    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
51291    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
51292    if test "x$FOUND_VERSION" = x; then
51293      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
51294    fi
51295  else
51296    SJAVAC_SERVER_JAVA="$JAVA"
51297  fi
51298
51299
51300  if test "$MEMORY_SIZE" -gt "3000"; then
51301
51302  $ECHO "Check if jvm arg is ok: -d64" >&5
51303  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
51304  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
51305  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51306  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51307  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51308    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
51309    JVM_ARG_OK=true
51310  else
51311    $ECHO "Arg failed:" >&5
51312    $ECHO "$OUTPUT" >&5
51313    JVM_ARG_OK=false
51314  fi
51315
51316    if test "$JVM_ARG_OK" = true; then
51317      JVM_64BIT=true
51318      JVM_ARG_OK=false
51319    fi
51320  fi
51321
51322  MX_VALUE=`expr $MEMORY_SIZE / 2`
51323  if test "$JVM_64BIT" = true; then
51324    # Set ms lower than mx since more than one instance of the server might
51325    # get launched at the same time before they figure out which instance won.
51326    MS_VALUE=512
51327    if test "$MX_VALUE" -gt "2048"; then
51328      MX_VALUE=2048
51329    fi
51330  else
51331    MS_VALUE=256
51332    if test "$MX_VALUE" -gt "1500"; then
51333      MX_VALUE=1500
51334    fi
51335  fi
51336  if test "$MX_VALUE" -lt "512"; then
51337    MX_VALUE=512
51338  fi
51339
51340  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
51341  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
51342  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
51343  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
51344  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
51345  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
51346    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
51347    JVM_ARG_OK=true
51348  else
51349    $ECHO "Arg failed:" >&5
51350    $ECHO "$OUTPUT" >&5
51351    JVM_ARG_OK=false
51352  fi
51353
51354
51355
51356  # Check whether --enable-sjavac was given.
51357if test "${enable_sjavac+set}" = set; then :
51358  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
51359else
51360  ENABLE_SJAVAC='no'
51361fi
51362
51363  if test "x$JVM_ARG_OK" = "xfalse"; then
51364    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
51365$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
51366    ENABLE_SJAVAC=no;
51367  fi
51368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
51369$as_echo_n "checking whether to use sjavac... " >&6; }
51370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
51371$as_echo "$ENABLE_SJAVAC" >&6; }
51372
51373
51374  if test "x$ENABLE_SJAVAC" = xyes; then
51375    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
51376  else
51377    SJAVAC_SERVER_DIR=
51378  fi
51379
51380
51381
51382# Can the C/C++ compiler use precompiled headers?
51383
51384
51385  ###############################################################################
51386  #
51387  # Can the C/C++ compiler use precompiled headers?
51388  #
51389  # Check whether --enable-precompiled-headers was given.
51390if test "${enable_precompiled_headers+set}" = set; then :
51391  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
51392else
51393  ENABLE_PRECOMPH=yes
51394fi
51395
51396
51397  USE_PRECOMPILED_HEADER=1
51398  if test "x$ENABLE_PRECOMPH" = xno; then
51399    USE_PRECOMPILED_HEADER=0
51400  fi
51401
51402  if test "x$ENABLE_PRECOMPH" = xyes; then
51403    # Check that the compiler actually supports precomp headers.
51404    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51405      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
51406$as_echo_n "checking that precompiled headers work... " >&6; }
51407      echo "int alfa();" > conftest.h
51408      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
51409      if test ! -f conftest.hpp.gch; then
51410        USE_PRECOMPILED_HEADER=0
51411        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51412$as_echo "no" >&6; }
51413      else
51414        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51415$as_echo "yes" >&6; }
51416      fi
51417      rm -f conftest.h conftest.hpp.gch
51418    fi
51419  fi
51420
51421
51422
51423
51424# Setup use of ccache, if available
51425
51426  # Check whether --enable-ccache was given.
51427if test "${enable_ccache+set}" = set; then :
51428  enableval=$enable_ccache;
51429fi
51430
51431
51432  CCACHE=
51433  CCACHE_STATUS=
51434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
51435$as_echo_n "checking is ccache enabled... " >&6; }
51436  if test "x$enable_ccache" = xyes; then
51437    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
51438      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51439$as_echo "yes" >&6; }
51440      OLD_PATH="$PATH"
51441      if test "x$TOOLCHAIN_PATH" != x; then
51442        PATH=$TOOLCHAIN_PATH:$PATH
51443      fi
51444
51445
51446
51447  # Publish this variable in the help.
51448
51449
51450  if test "x$CCACHE" = x; then
51451    # The variable is not set by user, try to locate tool using the code snippet
51452    for ac_prog in ccache
51453do
51454  # Extract the first word of "$ac_prog", so it can be a program name with args.
51455set dummy $ac_prog; ac_word=$2
51456{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51457$as_echo_n "checking for $ac_word... " >&6; }
51458if ${ac_cv_path_CCACHE+:} false; then :
51459  $as_echo_n "(cached) " >&6
51460else
51461  case $CCACHE in
51462  [\\/]* | ?:[\\/]*)
51463  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51464  ;;
51465  *)
51466  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51467for as_dir in $PATH
51468do
51469  IFS=$as_save_IFS
51470  test -z "$as_dir" && as_dir=.
51471    for ac_exec_ext in '' $ac_executable_extensions; do
51472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51473    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51475    break 2
51476  fi
51477done
51478  done
51479IFS=$as_save_IFS
51480
51481  ;;
51482esac
51483fi
51484CCACHE=$ac_cv_path_CCACHE
51485if test -n "$CCACHE"; then
51486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51487$as_echo "$CCACHE" >&6; }
51488else
51489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51490$as_echo "no" >&6; }
51491fi
51492
51493
51494  test -n "$CCACHE" && break
51495done
51496
51497  else
51498    # The variable is set, but is it from the command line or the environment?
51499
51500    # Try to remove the string !CCACHE! from our list.
51501    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
51502    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
51503      # If it failed, the variable was not from the command line. Ignore it,
51504      # but warn the user (except for BASH, which is always set by the calling BASH).
51505      if test "xCCACHE" != xBASH; then
51506        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
51507$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
51508      fi
51509      # Try to locate tool using the code snippet
51510      for ac_prog in ccache
51511do
51512  # Extract the first word of "$ac_prog", so it can be a program name with args.
51513set dummy $ac_prog; ac_word=$2
51514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51515$as_echo_n "checking for $ac_word... " >&6; }
51516if ${ac_cv_path_CCACHE+:} false; then :
51517  $as_echo_n "(cached) " >&6
51518else
51519  case $CCACHE in
51520  [\\/]* | ?:[\\/]*)
51521  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51522  ;;
51523  *)
51524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51525for as_dir in $PATH
51526do
51527  IFS=$as_save_IFS
51528  test -z "$as_dir" && as_dir=.
51529    for ac_exec_ext in '' $ac_executable_extensions; do
51530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51531    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51533    break 2
51534  fi
51535done
51536  done
51537IFS=$as_save_IFS
51538
51539  ;;
51540esac
51541fi
51542CCACHE=$ac_cv_path_CCACHE
51543if test -n "$CCACHE"; then
51544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51545$as_echo "$CCACHE" >&6; }
51546else
51547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51548$as_echo "no" >&6; }
51549fi
51550
51551
51552  test -n "$CCACHE" && break
51553done
51554
51555    else
51556      # If it succeeded, then it was overridden by the user. We will use it
51557      # for the tool.
51558
51559      # First remove it from the list of overridden variables, so we can test
51560      # for unknown variables in the end.
51561      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
51562
51563      # Check if the provided tool contains a complete path.
51564      tool_specified="$CCACHE"
51565      tool_basename="${tool_specified##*/}"
51566      if test "x$tool_basename" = "x$tool_specified"; then
51567        # A command without a complete path is provided, search $PATH.
51568        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
51569$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
51570        # Extract the first word of "$tool_basename", so it can be a program name with args.
51571set dummy $tool_basename; ac_word=$2
51572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
51573$as_echo_n "checking for $ac_word... " >&6; }
51574if ${ac_cv_path_CCACHE+:} false; then :
51575  $as_echo_n "(cached) " >&6
51576else
51577  case $CCACHE in
51578  [\\/]* | ?:[\\/]*)
51579  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
51580  ;;
51581  *)
51582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
51583for as_dir in $PATH
51584do
51585  IFS=$as_save_IFS
51586  test -z "$as_dir" && as_dir=.
51587    for ac_exec_ext in '' $ac_executable_extensions; do
51588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
51589    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
51590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
51591    break 2
51592  fi
51593done
51594  done
51595IFS=$as_save_IFS
51596
51597  ;;
51598esac
51599fi
51600CCACHE=$ac_cv_path_CCACHE
51601if test -n "$CCACHE"; then
51602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
51603$as_echo "$CCACHE" >&6; }
51604else
51605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51606$as_echo "no" >&6; }
51607fi
51608
51609
51610        if test "x$CCACHE" = x; then
51611          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
51612        fi
51613      else
51614        # Otherwise we believe it is a complete path. Use it as it is.
51615        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
51616$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
51617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
51618$as_echo_n "checking for CCACHE... " >&6; }
51619        if test ! -x "$tool_specified"; then
51620          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
51621$as_echo "not found" >&6; }
51622          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
51623        fi
51624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
51625$as_echo "$tool_specified" >&6; }
51626      fi
51627    fi
51628  fi
51629
51630
51631
51632  if test "x$CCACHE" = x; then
51633    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
51634  fi
51635
51636
51637      PATH="$OLD_PATH"
51638      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
51639      CCACHE_STATUS="Active ($CCACHE_VERSION)"
51640    else
51641      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51642$as_echo "no" >&6; }
51643      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
51644$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
51645    fi
51646  elif test "x$enable_ccache" = xno; then
51647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
51648$as_echo "no, explicitly disabled" >&6; }
51649    CCACHE_STATUS="Disabled"
51650  elif test "x$enable_ccache" = x; then
51651    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51652$as_echo "no" >&6; }
51653  else
51654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
51655$as_echo "unknown" >&6; }
51656    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
51657  fi
51658
51659
51660
51661# Check whether --with-ccache-dir was given.
51662if test "${with_ccache_dir+set}" = set; then :
51663  withval=$with_ccache_dir;
51664fi
51665
51666
51667  if test "x$with_ccache_dir" != x; then
51668    # When using a non home ccache directory, assume the use is to share ccache files
51669    # with other users. Thus change the umask.
51670    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
51671    if test "x$CCACHE" = x; then
51672      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
51673$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
51674    fi
51675  fi
51676
51677  if test "x$CCACHE" != x; then
51678
51679  if test "x$CCACHE" != x; then
51680    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
51681      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
51682          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
51683      if test "x$HAS_BAD_CCACHE" != "x"; then
51684        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
51685      fi
51686      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
51687$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
51688      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
51689      PUSHED_FLAGS="$CXXFLAGS"
51690      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
51691      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51692/* end confdefs.h.  */
51693
51694int
51695main ()
51696{
51697
51698  ;
51699  return 0;
51700}
51701_ACEOF
51702if ac_fn_cxx_try_compile "$LINENO"; then :
51703  CC_KNOWS_CCACHE_TRICK=yes
51704else
51705  CC_KNOWS_CCACHE_TRICK=no
51706fi
51707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51708      CXXFLAGS="$PUSHED_FLAGS"
51709      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
51710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
51711$as_echo "yes" >&6; }
51712        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
51713
51714        CCACHE_SLOPPINESS=pch_defines,time_macros
51715      else
51716        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51717$as_echo "no" >&6; }
51718        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
51719      fi
51720    fi
51721
51722    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
51723        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
51724
51725    if test "x$SET_CCACHE_DIR" != x; then
51726      mkdir -p $CCACHE_DIR > /dev/null 2>&1
51727      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
51728    fi
51729  fi
51730
51731  fi
51732
51733
51734###############################################################################
51735#
51736# And now the finish...
51737#
51738###############################################################################
51739
51740# Check for some common pitfalls
51741
51742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
51743    file_to_test="$SRC_ROOT/LICENSE"
51744    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
51745      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
51746    fi
51747  fi
51748
51749
51750  # Did user specify any unknown variables?
51751
51752  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
51753    # Replace the separating ! with spaces before presenting for end user.
51754    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
51755    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
51756$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
51757  fi
51758
51759
51760  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
51761$as_echo_n "checking if build directory is on local disk... " >&6; }
51762
51763  # df -l lists only local disks; if the given directory is not found then
51764  # a non-zero exit code is given
51765  if test "x$DF" = x; then
51766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
51767      # msys does not have df; use Windows "net use" instead.
51768      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
51769      if test "x$IS_NETWORK_DISK" = x; then
51770        OUTPUT_DIR_IS_LOCAL="yes"
51771      else
51772        OUTPUT_DIR_IS_LOCAL="no"
51773      fi
51774    else
51775      # No df here, say it's local
51776      OUTPUT_DIR_IS_LOCAL="yes"
51777    fi
51778  else
51779    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
51780      OUTPUT_DIR_IS_LOCAL="yes"
51781    else
51782      OUTPUT_DIR_IS_LOCAL="no"
51783    fi
51784  fi
51785
51786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
51787$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
51788
51789
51790
51791  # Check if the user has any old-style ALT_ variables set.
51792  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
51793
51794  # Before generating output files, test if they exist. If they do, this is a reconfigure.
51795  # Since we can't properly handle the dependencies for this, warn the user about the situation
51796  if test -e $OUTPUT_ROOT/spec.gmk; then
51797    IS_RECONFIGURE=yes
51798  else
51799    IS_RECONFIGURE=no
51800  fi
51801
51802
51803# At the end, call the custom hook. (Dummy macro if no custom sources available)
51804
51805
51806# We're messing a bit with internal autoconf variables to put the config.status
51807# in the output directory instead of the current directory.
51808CONFIG_STATUS="$OUTPUT_ROOT/config.status"
51809
51810# Create the actual output files. Now the main work of configure is done.
51811cat >confcache <<\_ACEOF
51812# This file is a shell script that caches the results of configure
51813# tests run on this system so they can be shared between configure
51814# scripts and configure runs, see configure's option --config-cache.
51815# It is not useful on other systems.  If it contains results you don't
51816# want to keep, you may remove or edit it.
51817#
51818# config.status only pays attention to the cache file if you give it
51819# the --recheck option to rerun configure.
51820#
51821# `ac_cv_env_foo' variables (set or unset) will be overridden when
51822# loading this file, other *unset* `ac_cv_foo' will be assigned the
51823# following values.
51824
51825_ACEOF
51826
51827# The following way of writing the cache mishandles newlines in values,
51828# but we know of no workaround that is simple, portable, and efficient.
51829# So, we kill variables containing newlines.
51830# Ultrix sh set writes to stderr and can't be redirected directly,
51831# and sets the high bit in the cache file unless we assign to the vars.
51832(
51833  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
51834    eval ac_val=\$$ac_var
51835    case $ac_val in #(
51836    *${as_nl}*)
51837      case $ac_var in #(
51838      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
51839$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
51840      esac
51841      case $ac_var in #(
51842      _ | IFS | as_nl) ;; #(
51843      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
51844      *) { eval $ac_var=; unset $ac_var;} ;;
51845      esac ;;
51846    esac
51847  done
51848
51849  (set) 2>&1 |
51850    case $as_nl`(ac_space=' '; set) 2>&1` in #(
51851    *${as_nl}ac_space=\ *)
51852      # `set' does not quote correctly, so add quotes: double-quote
51853      # substitution turns \\\\ into \\, and sed turns \\ into \.
51854      sed -n \
51855	"s/'/'\\\\''/g;
51856	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
51857      ;; #(
51858    *)
51859      # `set' quotes correctly as required by POSIX, so do not add quotes.
51860      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
51861      ;;
51862    esac |
51863    sort
51864) |
51865  sed '
51866     /^ac_cv_env_/b end
51867     t clear
51868     :clear
51869     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
51870     t end
51871     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
51872     :end' >>confcache
51873if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
51874  if test -w "$cache_file"; then
51875    if test "x$cache_file" != "x/dev/null"; then
51876      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
51877$as_echo "$as_me: updating cache $cache_file" >&6;}
51878      if test ! -f "$cache_file" || test -h "$cache_file"; then
51879	cat confcache >"$cache_file"
51880      else
51881        case $cache_file in #(
51882        */* | ?:*)
51883	  mv -f confcache "$cache_file"$$ &&
51884	  mv -f "$cache_file"$$ "$cache_file" ;; #(
51885        *)
51886	  mv -f confcache "$cache_file" ;;
51887	esac
51888      fi
51889    fi
51890  else
51891    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
51892$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
51893  fi
51894fi
51895rm -f confcache
51896
51897test "x$prefix" = xNONE && prefix=$ac_default_prefix
51898# Let make expand exec_prefix.
51899test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
51900
51901# Transform confdefs.h into DEFS.
51902# Protect against shell expansion while executing Makefile rules.
51903# Protect against Makefile macro expansion.
51904#
51905# If the first sed substitution is executed (which looks for macros that
51906# take arguments), then branch to the quote section.  Otherwise,
51907# look for a macro that doesn't take arguments.
51908ac_script='
51909:mline
51910/\\$/{
51911 N
51912 s,\\\n,,
51913 b mline
51914}
51915t clear
51916:clear
51917s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
51918t quote
51919s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
51920t quote
51921b any
51922:quote
51923s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
51924s/\[/\\&/g
51925s/\]/\\&/g
51926s/\$/$$/g
51927H
51928:any
51929${
51930	g
51931	s/^\n//
51932	s/\n/ /g
51933	p
51934}
51935'
51936DEFS=`sed -n "$ac_script" confdefs.h`
51937
51938
51939ac_libobjs=
51940ac_ltlibobjs=
51941U=
51942for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
51943  # 1. Remove the extension, and $U if already installed.
51944  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
51945  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
51946  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
51947  #    will be set to the directory where LIBOBJS objects are built.
51948  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
51949  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
51950done
51951LIBOBJS=$ac_libobjs
51952
51953LTLIBOBJS=$ac_ltlibobjs
51954
51955
51956
51957: "${CONFIG_STATUS=./config.status}"
51958ac_write_fail=0
51959ac_clean_files_save=$ac_clean_files
51960ac_clean_files="$ac_clean_files $CONFIG_STATUS"
51961{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
51962$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
51963as_write_fail=0
51964cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
51965#! $SHELL
51966# Generated by $as_me.
51967# Run this file to recreate the current configuration.
51968# Compiler output produced by configure, useful for debugging
51969# configure, is in config.log if it exists.
51970
51971debug=false
51972ac_cs_recheck=false
51973ac_cs_silent=false
51974
51975SHELL=\${CONFIG_SHELL-$SHELL}
51976export SHELL
51977_ASEOF
51978cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
51979## -------------------- ##
51980## M4sh Initialization. ##
51981## -------------------- ##
51982
51983# Be more Bourne compatible
51984DUALCASE=1; export DUALCASE # for MKS sh
51985if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
51986  emulate sh
51987  NULLCMD=:
51988  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
51989  # is contrary to our usage.  Disable this feature.
51990  alias -g '${1+"$@"}'='"$@"'
51991  setopt NO_GLOB_SUBST
51992else
51993  case `(set -o) 2>/dev/null` in #(
51994  *posix*) :
51995    set -o posix ;; #(
51996  *) :
51997     ;;
51998esac
51999fi
52000
52001
52002as_nl='
52003'
52004export as_nl
52005# Printing a long string crashes Solaris 7 /usr/bin/printf.
52006as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
52007as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
52008as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
52009# Prefer a ksh shell builtin over an external printf program on Solaris,
52010# but without wasting forks for bash or zsh.
52011if test -z "$BASH_VERSION$ZSH_VERSION" \
52012    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
52013  as_echo='print -r --'
52014  as_echo_n='print -rn --'
52015elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
52016  as_echo='printf %s\n'
52017  as_echo_n='printf %s'
52018else
52019  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52020    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
52021    as_echo_n='/usr/ucb/echo -n'
52022  else
52023    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
52024    as_echo_n_body='eval
52025      arg=$1;
52026      case $arg in #(
52027      *"$as_nl"*)
52028	expr "X$arg" : "X\\(.*\\)$as_nl";
52029	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
52030      esac;
52031      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
52032    '
52033    export as_echo_n_body
52034    as_echo_n='sh -c $as_echo_n_body as_echo'
52035  fi
52036  export as_echo_body
52037  as_echo='sh -c $as_echo_body as_echo'
52038fi
52039
52040# The user is always right.
52041if test "${PATH_SEPARATOR+set}" != set; then
52042  PATH_SEPARATOR=:
52043  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
52044    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
52045      PATH_SEPARATOR=';'
52046  }
52047fi
52048
52049
52050# IFS
52051# We need space, tab and new line, in precisely that order.  Quoting is
52052# there to prevent editors from complaining about space-tab.
52053# (If _AS_PATH_WALK were called with IFS unset, it would disable word
52054# splitting by setting IFS to empty value.)
52055IFS=" ""	$as_nl"
52056
52057# Find who we are.  Look in the path if we contain no directory separator.
52058as_myself=
52059case $0 in #((
52060  *[\\/]* ) as_myself=$0 ;;
52061  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
52062for as_dir in $PATH
52063do
52064  IFS=$as_save_IFS
52065  test -z "$as_dir" && as_dir=.
52066    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
52067  done
52068IFS=$as_save_IFS
52069
52070     ;;
52071esac
52072# We did not find ourselves, most probably we were run as `sh COMMAND'
52073# in which case we are not to be found in the path.
52074if test "x$as_myself" = x; then
52075  as_myself=$0
52076fi
52077if test ! -f "$as_myself"; then
52078  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
52079  exit 1
52080fi
52081
52082# Unset variables that we do not need and which cause bugs (e.g. in
52083# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
52084# suppresses any "Segmentation fault" message there.  '((' could
52085# trigger a bug in pdksh 5.2.14.
52086for as_var in BASH_ENV ENV MAIL MAILPATH
52087do eval test x\${$as_var+set} = xset \
52088  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
52089done
52090PS1='$ '
52091PS2='> '
52092PS4='+ '
52093
52094# NLS nuisances.
52095LC_ALL=C
52096export LC_ALL
52097LANGUAGE=C
52098export LANGUAGE
52099
52100# CDPATH.
52101(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
52102
52103
52104# as_fn_error STATUS ERROR [LINENO LOG_FD]
52105# ----------------------------------------
52106# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
52107# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
52108# script with STATUS, using 1 if that was 0.
52109as_fn_error ()
52110{
52111  as_status=$1; test $as_status -eq 0 && as_status=1
52112  if test "$4"; then
52113    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
52114    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
52115  fi
52116  $as_echo "$as_me: error: $2" >&2
52117  as_fn_exit $as_status
52118} # as_fn_error
52119
52120
52121# as_fn_set_status STATUS
52122# -----------------------
52123# Set $? to STATUS, without forking.
52124as_fn_set_status ()
52125{
52126  return $1
52127} # as_fn_set_status
52128
52129# as_fn_exit STATUS
52130# -----------------
52131# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
52132as_fn_exit ()
52133{
52134  set +e
52135  as_fn_set_status $1
52136  exit $1
52137} # as_fn_exit
52138
52139# as_fn_unset VAR
52140# ---------------
52141# Portably unset VAR.
52142as_fn_unset ()
52143{
52144  { eval $1=; unset $1;}
52145}
52146as_unset=as_fn_unset
52147# as_fn_append VAR VALUE
52148# ----------------------
52149# Append the text in VALUE to the end of the definition contained in VAR. Take
52150# advantage of any shell optimizations that allow amortized linear growth over
52151# repeated appends, instead of the typical quadratic growth present in naive
52152# implementations.
52153if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
52154  eval 'as_fn_append ()
52155  {
52156    eval $1+=\$2
52157  }'
52158else
52159  as_fn_append ()
52160  {
52161    eval $1=\$$1\$2
52162  }
52163fi # as_fn_append
52164
52165# as_fn_arith ARG...
52166# ------------------
52167# Perform arithmetic evaluation on the ARGs, and store the result in the
52168# global $as_val. Take advantage of shells that can avoid forks. The arguments
52169# must be portable across $(()) and expr.
52170if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
52171  eval 'as_fn_arith ()
52172  {
52173    as_val=$(( $* ))
52174  }'
52175else
52176  as_fn_arith ()
52177  {
52178    as_val=`expr "$@" || test $? -eq 1`
52179  }
52180fi # as_fn_arith
52181
52182
52183if expr a : '\(a\)' >/dev/null 2>&1 &&
52184   test "X`expr 00001 : '.*\(...\)'`" = X001; then
52185  as_expr=expr
52186else
52187  as_expr=false
52188fi
52189
52190if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
52191  as_basename=basename
52192else
52193  as_basename=false
52194fi
52195
52196if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
52197  as_dirname=dirname
52198else
52199  as_dirname=false
52200fi
52201
52202as_me=`$as_basename -- "$0" ||
52203$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
52204	 X"$0" : 'X\(//\)$' \| \
52205	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
52206$as_echo X/"$0" |
52207    sed '/^.*\/\([^/][^/]*\)\/*$/{
52208	    s//\1/
52209	    q
52210	  }
52211	  /^X\/\(\/\/\)$/{
52212	    s//\1/
52213	    q
52214	  }
52215	  /^X\/\(\/\).*/{
52216	    s//\1/
52217	    q
52218	  }
52219	  s/.*/./; q'`
52220
52221# Avoid depending upon Character Ranges.
52222as_cr_letters='abcdefghijklmnopqrstuvwxyz'
52223as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
52224as_cr_Letters=$as_cr_letters$as_cr_LETTERS
52225as_cr_digits='0123456789'
52226as_cr_alnum=$as_cr_Letters$as_cr_digits
52227
52228ECHO_C= ECHO_N= ECHO_T=
52229case `echo -n x` in #(((((
52230-n*)
52231  case `echo 'xy\c'` in
52232  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
52233  xy)  ECHO_C='\c';;
52234  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
52235       ECHO_T='	';;
52236  esac;;
52237*)
52238  ECHO_N='-n';;
52239esac
52240
52241rm -f conf$$ conf$$.exe conf$$.file
52242if test -d conf$$.dir; then
52243  rm -f conf$$.dir/conf$$.file
52244else
52245  rm -f conf$$.dir
52246  mkdir conf$$.dir 2>/dev/null
52247fi
52248if (echo >conf$$.file) 2>/dev/null; then
52249  if ln -s conf$$.file conf$$ 2>/dev/null; then
52250    as_ln_s='ln -s'
52251    # ... but there are two gotchas:
52252    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
52253    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
52254    # In both cases, we have to default to `cp -pR'.
52255    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
52256      as_ln_s='cp -pR'
52257  elif ln conf$$.file conf$$ 2>/dev/null; then
52258    as_ln_s=ln
52259  else
52260    as_ln_s='cp -pR'
52261  fi
52262else
52263  as_ln_s='cp -pR'
52264fi
52265rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
52266rmdir conf$$.dir 2>/dev/null
52267
52268
52269# as_fn_mkdir_p
52270# -------------
52271# Create "$as_dir" as a directory, including parents if necessary.
52272as_fn_mkdir_p ()
52273{
52274
52275  case $as_dir in #(
52276  -*) as_dir=./$as_dir;;
52277  esac
52278  test -d "$as_dir" || eval $as_mkdir_p || {
52279    as_dirs=
52280    while :; do
52281      case $as_dir in #(
52282      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
52283      *) as_qdir=$as_dir;;
52284      esac
52285      as_dirs="'$as_qdir' $as_dirs"
52286      as_dir=`$as_dirname -- "$as_dir" ||
52287$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52288	 X"$as_dir" : 'X\(//\)[^/]' \| \
52289	 X"$as_dir" : 'X\(//\)$' \| \
52290	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
52291$as_echo X"$as_dir" |
52292    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52293	    s//\1/
52294	    q
52295	  }
52296	  /^X\(\/\/\)[^/].*/{
52297	    s//\1/
52298	    q
52299	  }
52300	  /^X\(\/\/\)$/{
52301	    s//\1/
52302	    q
52303	  }
52304	  /^X\(\/\).*/{
52305	    s//\1/
52306	    q
52307	  }
52308	  s/.*/./; q'`
52309      test -d "$as_dir" && break
52310    done
52311    test -z "$as_dirs" || eval "mkdir $as_dirs"
52312  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
52313
52314
52315} # as_fn_mkdir_p
52316if mkdir -p . 2>/dev/null; then
52317  as_mkdir_p='mkdir -p "$as_dir"'
52318else
52319  test -d ./-p && rmdir ./-p
52320  as_mkdir_p=false
52321fi
52322
52323
52324# as_fn_executable_p FILE
52325# -----------------------
52326# Test if FILE is an executable regular file.
52327as_fn_executable_p ()
52328{
52329  test -f "$1" && test -x "$1"
52330} # as_fn_executable_p
52331as_test_x='test -x'
52332as_executable_p=as_fn_executable_p
52333
52334# Sed expression to map a string onto a valid CPP name.
52335as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
52336
52337# Sed expression to map a string onto a valid variable name.
52338as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
52339
52340
52341exec 6>&1
52342## ----------------------------------- ##
52343## Main body of $CONFIG_STATUS script. ##
52344## ----------------------------------- ##
52345_ASEOF
52346test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
52347
52348cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52349# Save the log message, to keep $0 and so on meaningful, and to
52350# report actual input values of CONFIG_FILES etc. instead of their
52351# values after options handling.
52352ac_log="
52353This file was extended by OpenJDK $as_me jdk9, which was
52354generated by GNU Autoconf 2.69.  Invocation command line was
52355
52356  CONFIG_FILES    = $CONFIG_FILES
52357  CONFIG_HEADERS  = $CONFIG_HEADERS
52358  CONFIG_LINKS    = $CONFIG_LINKS
52359  CONFIG_COMMANDS = $CONFIG_COMMANDS
52360  $ $0 $@
52361
52362on `(hostname || uname -n) 2>/dev/null | sed 1q`
52363"
52364
52365_ACEOF
52366
52367case $ac_config_files in *"
52368"*) set x $ac_config_files; shift; ac_config_files=$*;;
52369esac
52370
52371
52372
52373cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52374# Files that config.status was made for.
52375config_files="$ac_config_files"
52376
52377_ACEOF
52378
52379cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52380ac_cs_usage="\
52381\`$as_me' instantiates files and other configuration actions
52382from templates according to the current configuration.  Unless the files
52383and actions are specified as TAGs, all are instantiated by default.
52384
52385Usage: $0 [OPTION]... [TAG]...
52386
52387  -h, --help       print this help, then exit
52388  -V, --version    print version number and configuration settings, then exit
52389      --config     print configuration, then exit
52390  -q, --quiet, --silent
52391                   do not print progress messages
52392  -d, --debug      don't remove temporary files
52393      --recheck    update $as_me by reconfiguring in the same conditions
52394      --file=FILE[:TEMPLATE]
52395                   instantiate the configuration file FILE
52396
52397Configuration files:
52398$config_files
52399
52400Report bugs to <build-dev@openjdk.java.net>.
52401OpenJDK home page: <http://openjdk.java.net>."
52402
52403_ACEOF
52404cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52405ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
52406ac_cs_version="\\
52407OpenJDK config.status jdk9
52408configured by $0, generated by GNU Autoconf 2.69,
52409  with options \\"\$ac_cs_config\\"
52410
52411Copyright (C) 2012 Free Software Foundation, Inc.
52412This config.status script is free software; the Free Software Foundation
52413gives unlimited permission to copy, distribute and modify it."
52414
52415ac_pwd='$ac_pwd'
52416srcdir='$srcdir'
52417AWK='$AWK'
52418test -n "\$AWK" || AWK=awk
52419_ACEOF
52420
52421cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52422# The default lists apply if the user does not specify any file.
52423ac_need_defaults=:
52424while test $# != 0
52425do
52426  case $1 in
52427  --*=?*)
52428    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52429    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
52430    ac_shift=:
52431    ;;
52432  --*=)
52433    ac_option=`expr "X$1" : 'X\([^=]*\)='`
52434    ac_optarg=
52435    ac_shift=:
52436    ;;
52437  *)
52438    ac_option=$1
52439    ac_optarg=$2
52440    ac_shift=shift
52441    ;;
52442  esac
52443
52444  case $ac_option in
52445  # Handling of the options.
52446  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
52447    ac_cs_recheck=: ;;
52448  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
52449    $as_echo "$ac_cs_version"; exit ;;
52450  --config | --confi | --conf | --con | --co | --c )
52451    $as_echo "$ac_cs_config"; exit ;;
52452  --debug | --debu | --deb | --de | --d | -d )
52453    debug=: ;;
52454  --file | --fil | --fi | --f )
52455    $ac_shift
52456    case $ac_optarg in
52457    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
52458    '') as_fn_error $? "missing file argument" ;;
52459    esac
52460    as_fn_append CONFIG_FILES " '$ac_optarg'"
52461    ac_need_defaults=false;;
52462  --he | --h |  --help | --hel | -h )
52463    $as_echo "$ac_cs_usage"; exit ;;
52464  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
52465  | -silent | --silent | --silen | --sile | --sil | --si | --s)
52466    ac_cs_silent=: ;;
52467
52468  # This is an error.
52469  -*) as_fn_error $? "unrecognized option: \`$1'
52470Try \`$0 --help' for more information." ;;
52471
52472  *) as_fn_append ac_config_targets " $1"
52473     ac_need_defaults=false ;;
52474
52475  esac
52476  shift
52477done
52478
52479ac_configure_extra_args=
52480
52481if $ac_cs_silent; then
52482  exec 6>/dev/null
52483  ac_configure_extra_args="$ac_configure_extra_args --silent"
52484fi
52485
52486_ACEOF
52487cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52488if \$ac_cs_recheck; then
52489  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
52490  shift
52491  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
52492  CONFIG_SHELL='$SHELL'
52493  export CONFIG_SHELL
52494  exec "\$@"
52495fi
52496
52497_ACEOF
52498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52499exec 5>>config.log
52500{
52501  echo
52502  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
52503## Running $as_me. ##
52504_ASBOX
52505  $as_echo "$ac_log"
52506} >&5
52507
52508_ACEOF
52509cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52510_ACEOF
52511
52512cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52513
52514# Handling of arguments.
52515for ac_config_target in $ac_config_targets
52516do
52517  case $ac_config_target in
52518    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
52519    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
52520    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
52521    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
52522    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
52523
52524  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
52525  esac
52526done
52527
52528
52529# If the user did not use the arguments to specify the items to instantiate,
52530# then the envvar interface is used.  Set only those that are not.
52531# We use the long form for the default assignment because of an extremely
52532# bizarre bug on SunOS 4.1.3.
52533if $ac_need_defaults; then
52534  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
52535fi
52536
52537# Have a temporary directory for convenience.  Make it in the build tree
52538# simply because there is no reason against having it here, and in addition,
52539# creating and moving files from /tmp can sometimes cause problems.
52540# Hook for its removal unless debugging.
52541# Note that there is a small window in which the directory will not be cleaned:
52542# after its creation but before its name has been assigned to `$tmp'.
52543$debug ||
52544{
52545  tmp= ac_tmp=
52546  trap 'exit_status=$?
52547  : "${ac_tmp:=$tmp}"
52548  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
52549' 0
52550  trap 'as_fn_exit 1' 1 2 13 15
52551}
52552# Create a (secure) tmp directory for tmp files.
52553
52554{
52555  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
52556  test -d "$tmp"
52557}  ||
52558{
52559  tmp=./conf$$-$RANDOM
52560  (umask 077 && mkdir "$tmp")
52561} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
52562ac_tmp=$tmp
52563
52564# Set up the scripts for CONFIG_FILES section.
52565# No need to generate them if there are no CONFIG_FILES.
52566# This happens for instance with `./config.status config.h'.
52567if test -n "$CONFIG_FILES"; then
52568
52569
52570ac_cr=`echo X | tr X '\015'`
52571# On cygwin, bash can eat \r inside `` if the user requested igncr.
52572# But we know of no other shell where ac_cr would be empty at this
52573# point, so we can use a bashism as a fallback.
52574if test "x$ac_cr" = x; then
52575  eval ac_cr=\$\'\\r\'
52576fi
52577ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
52578if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
52579  ac_cs_awk_cr='\\r'
52580else
52581  ac_cs_awk_cr=$ac_cr
52582fi
52583
52584echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
52585_ACEOF
52586
52587
52588{
52589  echo "cat >conf$$subs.awk <<_ACEOF" &&
52590  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
52591  echo "_ACEOF"
52592} >conf$$subs.sh ||
52593  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52594ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
52595ac_delim='%!_!# '
52596for ac_last_try in false false false false false :; do
52597  . ./conf$$subs.sh ||
52598    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52599
52600  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
52601  if test $ac_delim_n = $ac_delim_num; then
52602    break
52603  elif $ac_last_try; then
52604    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
52605  else
52606    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
52607  fi
52608done
52609rm -f conf$$subs.sh
52610
52611cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52612cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
52613_ACEOF
52614sed -n '
52615h
52616s/^/S["/; s/!.*/"]=/
52617p
52618g
52619s/^[^!]*!//
52620:repl
52621t repl
52622s/'"$ac_delim"'$//
52623t delim
52624:nl
52625h
52626s/\(.\{148\}\)..*/\1/
52627t more1
52628s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
52629p
52630n
52631b repl
52632:more1
52633s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52634p
52635g
52636s/.\{148\}//
52637t nl
52638:delim
52639h
52640s/\(.\{148\}\)..*/\1/
52641t more2
52642s/["\\]/\\&/g; s/^/"/; s/$/"/
52643p
52644b
52645:more2
52646s/["\\]/\\&/g; s/^/"/; s/$/"\\/
52647p
52648g
52649s/.\{148\}//
52650t delim
52651' <conf$$subs.awk | sed '
52652/^[^""]/{
52653  N
52654  s/\n//
52655}
52656' >>$CONFIG_STATUS || ac_write_fail=1
52657rm -f conf$$subs.awk
52658cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52659_ACAWK
52660cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
52661  for (key in S) S_is_set[key] = 1
52662  FS = ""
52663
52664}
52665{
52666  line = $ 0
52667  nfields = split(line, field, "@")
52668  substed = 0
52669  len = length(field[1])
52670  for (i = 2; i < nfields; i++) {
52671    key = field[i]
52672    keylen = length(key)
52673    if (S_is_set[key]) {
52674      value = S[key]
52675      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
52676      len += length(value) + length(field[++i])
52677      substed = 1
52678    } else
52679      len += 1 + keylen
52680  }
52681
52682  print line
52683}
52684
52685_ACAWK
52686_ACEOF
52687cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52688if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
52689  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
52690else
52691  cat
52692fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
52693  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
52694_ACEOF
52695
52696# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
52697# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
52698# trailing colons and then remove the whole line if VPATH becomes empty
52699# (actually we leave an empty line to preserve line numbers).
52700if test "x$srcdir" = x.; then
52701  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
52702h
52703s///
52704s/^/:/
52705s/[	 ]*$/:/
52706s/:\$(srcdir):/:/g
52707s/:\${srcdir}:/:/g
52708s/:@srcdir@:/:/g
52709s/^:*//
52710s/:*$//
52711x
52712s/\(=[	 ]*\).*/\1/
52713G
52714s/\n//
52715s/^[^=]*=[	 ]*$//
52716}'
52717fi
52718
52719cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52720fi # test -n "$CONFIG_FILES"
52721
52722
52723eval set X "  :F $CONFIG_FILES      "
52724shift
52725for ac_tag
52726do
52727  case $ac_tag in
52728  :[FHLC]) ac_mode=$ac_tag; continue;;
52729  esac
52730  case $ac_mode$ac_tag in
52731  :[FHL]*:*);;
52732  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
52733  :[FH]-) ac_tag=-:-;;
52734  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
52735  esac
52736  ac_save_IFS=$IFS
52737  IFS=:
52738  set x $ac_tag
52739  IFS=$ac_save_IFS
52740  shift
52741  ac_file=$1
52742  shift
52743
52744  case $ac_mode in
52745  :L) ac_source=$1;;
52746  :[FH])
52747    ac_file_inputs=
52748    for ac_f
52749    do
52750      case $ac_f in
52751      -) ac_f="$ac_tmp/stdin";;
52752      *) # Look for the file first in the build tree, then in the source tree
52753	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
52754	 # because $ac_f cannot contain `:'.
52755	 test -f "$ac_f" ||
52756	   case $ac_f in
52757	   [\\/$]*) false;;
52758	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
52759	   esac ||
52760	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
52761      esac
52762      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
52763      as_fn_append ac_file_inputs " '$ac_f'"
52764    done
52765
52766    # Let's still pretend it is `configure' which instantiates (i.e., don't
52767    # use $as_me), people would be surprised to read:
52768    #    /* config.h.  Generated by config.status.  */
52769    configure_input='Generated from '`
52770	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
52771	`' by configure.'
52772    if test x"$ac_file" != x-; then
52773      configure_input="$ac_file.  $configure_input"
52774      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
52775$as_echo "$as_me: creating $ac_file" >&6;}
52776    fi
52777    # Neutralize special characters interpreted by sed in replacement strings.
52778    case $configure_input in #(
52779    *\&* | *\|* | *\\* )
52780       ac_sed_conf_input=`$as_echo "$configure_input" |
52781       sed 's/[\\\\&|]/\\\\&/g'`;; #(
52782    *) ac_sed_conf_input=$configure_input;;
52783    esac
52784
52785    case $ac_tag in
52786    *:-:* | *:-) cat >"$ac_tmp/stdin" \
52787      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
52788    esac
52789    ;;
52790  esac
52791
52792  ac_dir=`$as_dirname -- "$ac_file" ||
52793$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
52794	 X"$ac_file" : 'X\(//\)[^/]' \| \
52795	 X"$ac_file" : 'X\(//\)$' \| \
52796	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
52797$as_echo X"$ac_file" |
52798    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
52799	    s//\1/
52800	    q
52801	  }
52802	  /^X\(\/\/\)[^/].*/{
52803	    s//\1/
52804	    q
52805	  }
52806	  /^X\(\/\/\)$/{
52807	    s//\1/
52808	    q
52809	  }
52810	  /^X\(\/\).*/{
52811	    s//\1/
52812	    q
52813	  }
52814	  s/.*/./; q'`
52815  as_dir="$ac_dir"; as_fn_mkdir_p
52816  ac_builddir=.
52817
52818case "$ac_dir" in
52819.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
52820*)
52821  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
52822  # A ".." for each directory in $ac_dir_suffix.
52823  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
52824  case $ac_top_builddir_sub in
52825  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
52826  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
52827  esac ;;
52828esac
52829ac_abs_top_builddir=$ac_pwd
52830ac_abs_builddir=$ac_pwd$ac_dir_suffix
52831# for backward compatibility:
52832ac_top_builddir=$ac_top_build_prefix
52833
52834case $srcdir in
52835  .)  # We are building in place.
52836    ac_srcdir=.
52837    ac_top_srcdir=$ac_top_builddir_sub
52838    ac_abs_top_srcdir=$ac_pwd ;;
52839  [\\/]* | ?:[\\/]* )  # Absolute name.
52840    ac_srcdir=$srcdir$ac_dir_suffix;
52841    ac_top_srcdir=$srcdir
52842    ac_abs_top_srcdir=$srcdir ;;
52843  *) # Relative name.
52844    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
52845    ac_top_srcdir=$ac_top_build_prefix$srcdir
52846    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
52847esac
52848ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
52849
52850
52851  case $ac_mode in
52852  :F)
52853  #
52854  # CONFIG_FILE
52855  #
52856
52857_ACEOF
52858
52859cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52860# If the template does not know about datarootdir, expand it.
52861# FIXME: This hack should be removed a few years after 2.60.
52862ac_datarootdir_hack=; ac_datarootdir_seen=
52863ac_sed_dataroot='
52864/datarootdir/ {
52865  p
52866  q
52867}
52868/@datadir@/p
52869/@docdir@/p
52870/@infodir@/p
52871/@localedir@/p
52872/@mandir@/p'
52873case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
52874*datarootdir*) ac_datarootdir_seen=yes;;
52875*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
52876  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
52877$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
52878_ACEOF
52879cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52880  ac_datarootdir_hack='
52881  s&@datadir@&$datadir&g
52882  s&@docdir@&$docdir&g
52883  s&@infodir@&$infodir&g
52884  s&@localedir@&$localedir&g
52885  s&@mandir@&$mandir&g
52886  s&\\\${datarootdir}&$datarootdir&g' ;;
52887esac
52888_ACEOF
52889
52890# Neutralize VPATH when `$srcdir' = `.'.
52891# Shell code in configure.ac might set extrasub.
52892# FIXME: do we really want to maintain this feature?
52893cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
52894ac_sed_extra="$ac_vpsub
52895$extrasub
52896_ACEOF
52897cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
52898:t
52899/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
52900s|@configure_input@|$ac_sed_conf_input|;t t
52901s&@top_builddir@&$ac_top_builddir_sub&;t t
52902s&@top_build_prefix@&$ac_top_build_prefix&;t t
52903s&@srcdir@&$ac_srcdir&;t t
52904s&@abs_srcdir@&$ac_abs_srcdir&;t t
52905s&@top_srcdir@&$ac_top_srcdir&;t t
52906s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
52907s&@builddir@&$ac_builddir&;t t
52908s&@abs_builddir@&$ac_abs_builddir&;t t
52909s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
52910$ac_datarootdir_hack
52911"
52912eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
52913  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52914
52915test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
52916  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
52917  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
52918      "$ac_tmp/out"`; test -z "$ac_out"; } &&
52919  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52920which seems to be undefined.  Please make sure it is defined" >&5
52921$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
52922which seems to be undefined.  Please make sure it is defined" >&2;}
52923
52924  rm -f "$ac_tmp/stdin"
52925  case $ac_file in
52926  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
52927  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
52928  esac \
52929  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
52930 ;;
52931
52932
52933
52934  esac
52935
52936done # for ac_tag
52937
52938
52939as_fn_exit 0
52940_ACEOF
52941ac_clean_files=$ac_clean_files_save
52942
52943test $ac_write_fail = 0 ||
52944  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
52945
52946
52947# configure is writing to config.log, and then calls config.status.
52948# config.status does its own redirection, appending to config.log.
52949# Unfortunately, on DOS this fails, as config.log is still kept open
52950# by configure, so config.status won't be able to write to it; its
52951# output is simply discarded.  So we exec the FD to /dev/null,
52952# effectively closing config.log, so it can be properly (re)opened and
52953# appended to by config.status.  When coming back to configure, we
52954# need to make the FD available again.
52955if test "$no_create" != yes; then
52956  ac_cs_success=:
52957  ac_config_status_args=
52958  test "$silent" = yes &&
52959    ac_config_status_args="$ac_config_status_args --quiet"
52960  exec 5>/dev/null
52961  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
52962  exec 5>>config.log
52963  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
52964  # would make configure fail if this is the last instruction.
52965  $ac_cs_success || as_fn_exit 1
52966fi
52967if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
52968  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
52969$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
52970fi
52971
52972
52973
52974# Try to move the config.log file to the output directory.
52975if test -e ./config.log; then
52976  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
52977fi
52978
52979# Make the compare script executable
52980$CHMOD +x $OUTPUT_ROOT/compare.sh
52981
52982# Finally output some useful information to the user
52983
52984  # Finally output some useful information to the user
52985
52986  printf "\n"
52987  printf "====================================================\n"
52988  if test "x$no_create" != "xyes"; then
52989    if test "x$IS_RECONFIGURE" != "xyes"; then
52990      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
52991    else
52992      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
52993    fi
52994  else
52995    if test "x$IS_RECONFIGURE" != "xyes"; then
52996      printf "A configuration has been successfully checked but not created\n"
52997    else
52998      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
52999    fi
53000  fi
53001  if test "x$CONFIGURE_COMMAND_LINE" != x; then
53002    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
53003  else
53004    printf "using default settings.\n"
53005  fi
53006
53007  printf "\n"
53008  printf "Configuration summary:\n"
53009  printf "* Debug level:    $DEBUG_LEVEL\n"
53010  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
53011  printf "* JDK variant:    $JDK_VARIANT\n"
53012  printf "* JVM variants:   $with_jvm_variants\n"
53013  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
53014
53015  printf "\n"
53016  printf "Tools summary:\n"
53017  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
53018    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
53019  fi
53020  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
53021  if test "x$TOOLCHAIN_VERSION" != "x"; then
53022    print_version=" $TOOLCHAIN_VERSION"
53023  fi
53024  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
53025  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
53026  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
53027
53028  printf "\n"
53029  printf "Build performance summary:\n"
53030  printf "* Cores to use:   $JOBS\n"
53031  printf "* Memory limit:   $MEMORY_SIZE MB\n"
53032  if test "x$CCACHE_STATUS" != "x"; then
53033    printf "* ccache status:  $CCACHE_STATUS\n"
53034  fi
53035  printf "\n"
53036
53037  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
53038    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
53039    printf "will result in longer build times.\n"
53040    printf "\n"
53041  fi
53042
53043  if test "x$FOUND_ALT_VARIABLES" != "x"; then
53044    printf "WARNING: You have old-style ALT_ environment variables set.\n"
53045    printf "These are not respected, and will be ignored. It is recommended\n"
53046    printf "that you clean your environment. The following variables are set:\n"
53047    printf "$FOUND_ALT_VARIABLES\n"
53048    printf "\n"
53049  fi
53050
53051  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
53052    printf "WARNING: Your build output directory is not on a local disk.\n"
53053    printf "This will severely degrade build performance!\n"
53054    printf "It is recommended that you create an output directory on a local disk,\n"
53055    printf "and run the configure script again from that directory.\n"
53056    printf "\n"
53057  fi
53058
53059  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
53060    printf "WARNING: The result of this configuration has overridden an older\n"
53061    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
53062    printf "proper build. Failure to do so might result in strange build problems.\n"
53063    printf "\n"
53064  fi
53065
53066  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
53067    printf "WARNING: The result of this configuration was not saved.\n"
53068    printf "You should run without '--no-create | -n' to create the configuration.\n"
53069    printf "\n"
53070  fi
53071
53072
53073
53074if test -e "$OUTPUT_ROOT/config.log"; then
53075  $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" > /dev/null 2>&1
53076  if test $? -eq 0; then
53077    printf "The following warnings were produced. Repeated here for convenience:\n"
53078    # We must quote sed expression (using []) to stop m4 from eating the [].
53079    $GREP '^configure:.*: WARNING:' "$OUTPUT_ROOT/config.log" | $SED -e  's/^configure:[0-9]*: //'
53080    printf "\n"
53081  fi
53082fi
53083
53084
53085